diff options
| author | kamil <kamil@NetBSD.org> | 2020-09-21 16:08:57 +0000 |
|---|---|---|
| committer | kamil <kamil@NetBSD.org> | 2020-09-21 16:08:57 +0000 |
| commit | 4eb7209a01c4fe2b46d816965fdd7bc2ae54ae25 (patch) | |
| tree | 263316b3b95bf46038a83969853a4f971b3b0b16 /include | |
| parent | e337c009fca2f7418ca5d7938c396ff1e50e4e79 (diff) | |
Upgrade the SVR4 RTLD r_debug protocol to version 1
Changes:
- Add a new field r_ldbase in the r_debug struct.
- Set r_version to 1.
This harmonizes the support with OpenBSD and Linux.
FreeBSD uses version 0 (or no version).
Solaris uses version 2 that is not implemented elsewhere and relies on
SVR4 specific design and interfaces.
Update the code comments as r_debug and link_map is used by other software
than GDB, namely: sanitizers, rump, LLDB.
Diffstat (limited to 'include')
| -rw-r--r-- | include/link_elf.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/link_elf.h b/include/link_elf.h index badebb182a2..dcc8918fa13 100644 --- a/include/link_elf.h +++ b/include/link_elf.h @@ -1,4 +1,4 @@ -/* $NetBSD: link_elf.h,v 1.11 2020/09/21 02:20:27 kamil Exp $ */ +/* $NetBSD: link_elf.h,v 1.12 2020/09/21 16:08:57 kamil Exp $ */ #ifndef _LINK_ELF_H_ #define _LINK_ELF_H_ @@ -6,6 +6,8 @@ #include <sys/types.h> #include <sys/exec_elf.h> +#define R_DEBUG_VERSION 1 /* SVR4 Protocol version */ + typedef struct link_map { caddr_t l_addr; /* Base Address of library */ #ifdef __mips__ @@ -43,6 +45,7 @@ struct r_debug { RT_ADD, /* adding a shared library */ RT_DELETE /* removing a shared library */ } r_state; + void *r_ldbase; /* base address of RTLD */ }; struct dl_phdr_info |
