map__rip_2objdump(9)
β¨ 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms