Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F137050977
D24918.id72001.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D24918.id72001.diff
View Options
Index: lib/libc/gen/dlinfo.3
===================================================================
--- lib/libc/gen/dlinfo.3
+++ lib/libc/gen/dlinfo.3
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd February 14, 2003
+.Dd May 19, 2020
.Dt DLINFO 3
.Os
.Sh NAME
@@ -105,14 +105,15 @@
.In link.h
and has the following members:
.Bd -literal -offset indent
-caddr_t l_addr; /* Base Address of library */
+caddr_t l_base; /* Base Address of library */
const char *l_name; /* Absolute Path to Library */
const void *l_ld; /* Pointer to .dynamic in memory */
struct link_map *l_next, /* linked list of mapped libs */
*l_prev;
+caddr_t l_addr; /* Load Offset of library */
.Ed
.Bl -tag -width ".Va l_addr"
-.It Va l_addr
+.It Va l_base
The base address of the object loaded into memory.
.It Va l_name
The full name of the loaded shared object.
@@ -128,6 +129,10 @@
The previous
.Vt Link_map
structure on the link-map list.
+.It Va l_addr
+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
@@ -4032,12 +4032,9 @@
struct link_map *prev;
obj->linkmap.l_name = obj->path;
- obj->linkmap.l_addr = obj->mapbase;
+ obj->linkmap.l_base = 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
+ obj->linkmap.l_addr = obj->relocbase;
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
@@ -57,13 +57,11 @@
#define LA_SER_SECURE 0x80 /* default (secure) path prepended */
typedef struct link_map {
- caddr_t l_addr; /* Base Address of library */
-#ifdef __mips__
- caddr_t l_offs; /* Load Offset of library */
-#endif
+ caddr_t l_base; /* Base Address of library */
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_addr; /* Load Offset of library */
} Link_map;
struct r_debug {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 22, 1:30 AM (21 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25860212
Default Alt Text
D24918.id72001.diff (2 KB)
Attached To
Mode
D24918: Add load offset value to struct link_map.
Attached
Detach File
Event Timeline
Log In to Comment