Keep link_map l_addr binary layout compatible, rename l_addr to l_base where rtld returns map base.
Provide relocbase in newly added l_addr.
Reported by: antoine (portmgr)
Differential D24946
Revert to the initial version of D24918 kib on May 21 2020, 5:30 PM. Authored by Tags None Referenced Files
Details Keep link_map l_addr binary layout compatible, rename l_addr to l_base where rtld returns map base. Reported by: antoine (portmgr)
Diff Detail
Event Timeline
Comment Actions This fixes the problem for me.
Comment Actions Recompiled gdb would use new l_addr, isn't it ?
Comment Actions No, it doesn't use the source layout. Instead, it uses functions that determine the binary layout so that it works for cross-debugging. This is part of why removing l_offs (now l_xxx) for MIPS would be such a PITA. For example, all of the non-MIPS architectures on FreeBSD use these functions to describe the layout of 'struct link_map': https://github.com/bsdjhb/gdb/blob/master/gdb/solib-svr4.c#L3160 and https://github.com/bsdjhb/gdb/blob/master/gdb/solib-svr4.c#L3192 MIPS on FreeBSD uses its own versions of these functions that account for l_offs: https://github.com/bsdjhb/gdb/blob/master/gdb/mips-fbsd-tdep.c#L465 Note that these files are all "non-native" meaning they get compiled on FreeBSD/amd64 hosts as well as Linux or OS X or Windows hosts to permit cross-debugging of process cores which is why they do not use the native structure at all, but instead hardcode knowledge about the layout of those structures. |