map__rip_2objdump(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ map__rip_2objdump ✨

okay so real talk bestie, we're deep in the Kernel API Manual today and this one is a little baby function that does exactly one (1) glow-up: it takes a symbol start address and turns it into the kind of address objdump actually understands. it's giving translator era πŸ’…


πŸŽ€ NAME πŸŽ€

map__rip_2objdump β€” convert symbol start address to objdump address.

like, literally just a glow-up service for addresses. no cap. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

u64 map__rip_2objdump (const struct map *map , u64 rip );

she takes two things and gives you back a u64, that's the whole vibe 🫢


🌸 ARGUMENTS 🌸

  • map β€” memory map. the whole memory map, bestie. she needs the context, she's not doing guesswork πŸ™ˆ
  • rip β€” symbol start address. the address you're trying to translate, the main character of this operation πŸ‘‘

πŸ’– DESCRIPTION πŸ’–

okay so here's the tea, and it's actually important so listen up πŸ“

objdump wants/reports absolute IPs for ET_EXEC, and RIPs for ET_DYN. so depending on what kind of binary you're dealing with, objdump is speaking a different dialect and someone has to translate. that someone is this function. she's bilingual, we stan 🌈

also, map->dso->adjust_symbols==1 for ET_EXEC-like cases β€” except ET_REL, which is relative to section start. so like, ET_REL is the exception, the one who refuses to follow the dress code πŸ’€ keep that straight or you'll get nonsense addresses and then you'll be sad, and i don't want that for you 😭

no fr, the ET_REL exception is not a vibe-check-optional detail. relative to section start, periodt.

⭐ RETURN ⭐

Address suitable for passing to "objdump --start-address="

that's it. that's the return value. she hands you back something and you go plug it straight into "objdump --start-address=" and it just works 🧚 obsessed


πŸ”₯ SEE ALSO πŸ”₯

  • Kernel file ./tools/perf/util/map.c
  • map__objdump_2mem(9) β€” the other direction of this whole situation, iykyk πŸ‘€

so yeah, that's map__rip_2objdump from the ./tools/perf/util directory, October 2026 era β€” go forth, translate your addresses, and slay πŸ’œπŸŽ€βœ¨

πŸ“¦ where this page comes from