Changeset View
Changeset View
Standalone View
Standalone View
lib/libc/gen/dlinfo.3
Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | |||||
example 1. | example 1. | ||||
.Pp | .Pp | ||||
The | The | ||||
.Vt Link_map | .Vt Link_map | ||||
structure is defined in | structure is defined in | ||||
.In link.h | .In link.h | ||||
and has the following members: | and has the following members: | ||||
.Bd -literal -offset indent | .Bd -literal -offset indent | ||||
caddr_t l_addr; /* Load Offset of library */ | caddr_t l_base; /* Base Address of library */ | ||||
const char *l_name; /* Absolute Path to Library */ | const char *l_name; /* Absolute Path to Library */ | ||||
const void *l_ld; /* Pointer to .dynamic in memory */ | const void *l_ld; /* Pointer to .dynamic in memory */ | ||||
struct link_map *l_next, /* linked list of mapped libs */ | struct link_map *l_next, /* linked list of mapped libs */ | ||||
*l_prev; | *l_prev; | ||||
caddr_t l_addr; /* Load Offset of library */ | |||||
.Ed | .Ed | ||||
.Bl -tag -width ".Va l_addr" | .Bl -tag -width ".Va l_addr" | ||||
.It Va l_addr | .It Va l_base | ||||
The load offset of the object, that is, the difference between | The base address of the object loaded into memory. | ||||
the actual load address and the base virtual address the object | |||||
was linked at. | |||||
.It Va l_name | .It Va l_name | ||||
The full name of the loaded shared object. | The full name of the loaded shared object. | ||||
.It Va l_ld | .It Va l_ld | ||||
The address of the dynamic linking information segment | The address of the dynamic linking information segment | ||||
.Pq Dv PT_DYNAMIC | .Pq Dv PT_DYNAMIC | ||||
loaded into memory. | loaded into memory. | ||||
.It Va l_next | .It Va l_next | ||||
The next | The next | ||||
.Vt Link_map | .Vt Link_map | ||||
structure on the link-map list. | structure on the link-map list. | ||||
.It Va l_prev | .It Va l_prev | ||||
The previous | The previous | ||||
.Vt Link_map | .Vt Link_map | ||||
structure on the link-map list. | 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 | .El | ||||
emaste: I wonder if it's worth a note here about other operating systems? I wouldn't want to say "Linux… | |||||
Done Inline ActionsI verified that Linux does the same as our 'new' l_addr, but I am not sure about Solaris. I was not able to find a Solaris box with fresh clang/lld to test (I cannot easily build a specific dso needed for test with GNU ld, and I do not have Solaris available at all). I do not block this fix while searching for a way to test Solaris. kib: I verified that Linux does the same as our 'new' l_addr, but I am not sure about Solaris.
This… | |||||
Not Done Inline ActionsExactly, I don't want to have a treatise on these fields in all operating systems - primarily a caution that these may behave differently on different operating systems so pay careful attention to the descriptions. emaste: Exactly, I don't want to have a treatise on these fields in all operating systems - primarily a… | |||||
.It Dv RTLD_DI_SERINFO | .It Dv RTLD_DI_SERINFO | ||||
Retrieve the library search paths associated with the given | Retrieve the library search paths associated with the given | ||||
.Fa handle | .Fa handle | ||||
argument. | argument. | ||||
The | The | ||||
.Fa p | .Fa p | ||||
argument should point to | argument should point to | ||||
.Vt Dl_serinfo | .Vt Dl_serinfo | ||||
▲ Show 20 Lines • Show All 140 Lines • Show Last 20 Lines |
I wonder if it's worth a note here about other operating systems? I wouldn't want to say "Linux does this, Solaris does this" because it's not our place and might get out of date. But maybe a note that other operating systems implement these perhaps with different semantics? I don't mind taking a stab at a suitable note after you commit this.