Index: lib/libc/gen/dlinfo.3 =================================================================== --- lib/libc/gen/dlinfo.3 +++ lib/libc/gen/dlinfo.3 @@ -110,6 +110,7 @@ const void *l_ld; /* Pointer to .dynamic in memory */ struct link_map *l_next, /* linked list of mapped libs */ *l_prev; +caddr_t l_offs /* Load Offset of library */ .Ed .Bl -tag -width ".Va l_addr" .It Va l_addr @@ -128,6 +129,10 @@ The previous .Vt Link_map structure on the link-map list. +.It Va l_offs +The load offset of the object, that is, the difference between +the actual load address and the base virtual address the object +was linked at. .El .It Dv RTLD_DI_SERINFO Retrieve the library search paths associated with the given Index: libexec/rtld-elf/rtld.c =================================================================== --- libexec/rtld-elf/rtld.c +++ libexec/rtld-elf/rtld.c @@ -4034,10 +4034,7 @@ obj->linkmap.l_name = obj->path; obj->linkmap.l_addr = obj->mapbase; obj->linkmap.l_ld = obj->dynamic; -#ifdef __mips__ - /* GDB needs load offset on MIPS to use the symbols */ obj->linkmap.l_offs = obj->relocbase; -#endif if (r_debug.r_map == NULL) { r_debug.r_map = l; Index: sys/sys/link_elf.h =================================================================== --- sys/sys/link_elf.h +++ sys/sys/link_elf.h @@ -58,12 +58,10 @@ typedef struct link_map { caddr_t l_addr; /* Base Address of library */ -#ifdef __mips__ - caddr_t l_offs; /* Load Offset of library */ -#endif const char *l_name; /* Absolute Path to Library */ const void *l_ld; /* Pointer to .dynamic in memory */ struct link_map *l_next, *l_prev; /* linked list of of mapped libs */ + caddr_t l_offs; /* Load Offset of library */ } Link_map; struct r_debug {