[Bug translator/32999] handle PIE executables with segments where file-offset is not vaddr
lijunlong at openresty dot com
sourceware-bugzilla@sourceware.org
Wed May 28 10:52:57 GMT 2025
https://sourceware.org/bugzilla/show_bug.cgi?id=32999
--- Comment #5 from lijunlong <lijunlong at openresty dot com> ---
For ET_DYN, it will return *addr -= mod->low_addr;
int
dwfl_module_relocate_address (Dwfl_Module *mod, Dwarf_Addr *addr)
{
if (unlikely (check_module (mod)))
return -1;
switch (mod->e_type)
{
case ET_REL:
return find_section (mod, addr);
case ET_DYN:
/* All relative to first and only relocation base: module start. */
*addr -= mod->low_addr;
break;
default:
/* Already absolute, dwfl_module_relocations returned zero. We
shouldn't really have been called, but it's a harmless no-op. */
break;
}
return 0;
}
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Systemtap
mailing list