mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-06 16:40:47 +00:00
rtld: Add MD_OBJ_ENTRY to extend Struct_Obj_Entry
Add a macro the architectures can use to add per-arch fields to Struct_Obj_Entry. Reviewed by: kib Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D45116
This commit is contained in:
parent
a7b222db12
commit
06db20ffec
|
@ -37,6 +37,8 @@
|
|||
|
||||
struct Struct_Obj_Entry;
|
||||
|
||||
#define MD_OBJ_ENTRY
|
||||
|
||||
/* Return the address of the .dynamic section in the dynamic linker. */
|
||||
#define rtld_dynamic(obj) \
|
||||
({ \
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
|
||||
struct Struct_Obj_Entry;
|
||||
|
||||
#define MD_OBJ_ENTRY
|
||||
|
||||
/* Return the address of the .dynamic section in the dynamic linker. */
|
||||
Elf_Dyn *rtld_dynamic_addr(void);
|
||||
#define rtld_dynamic(obj) rtld_dynamic_addr()
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
|
||||
struct Struct_Obj_Entry;
|
||||
|
||||
#define MD_OBJ_ENTRY
|
||||
|
||||
/* Return the address of the .dynamic section in the dynamic linker. */
|
||||
#define rtld_dynamic(obj) (&_DYNAMIC)
|
||||
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
|
||||
struct Struct_Obj_Entry;
|
||||
|
||||
#define MD_OBJ_ENTRY
|
||||
|
||||
/* Return the address of the .dynamic section in the dynamic linker. */
|
||||
#define rtld_dynamic(obj) \
|
||||
((const Elf_Dyn *)((obj)->relocbase + (Elf_Addr)&_DYNAMIC))
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
|
||||
struct Struct_Obj_Entry;
|
||||
|
||||
#define MD_OBJ_ENTRY
|
||||
|
||||
/* Return the address of the .dynamic section in the dynamic linker. */
|
||||
#define rtld_dynamic(obj) (&_DYNAMIC)
|
||||
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
|
||||
struct Struct_Obj_Entry;
|
||||
|
||||
#define MD_OBJ_ENTRY
|
||||
|
||||
/* Return the address of the .dynamic section in the dynamic linker. */
|
||||
#define rtld_dynamic(obj) (&_DYNAMIC)
|
||||
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
|
||||
struct Struct_Obj_Entry;
|
||||
|
||||
#define MD_OBJ_ENTRY
|
||||
|
||||
uint64_t set_gp(struct Struct_Obj_Entry *obj);
|
||||
|
||||
/* Return the address of the .dynamic section in the dynamic linker. */
|
||||
|
|
|
@ -277,6 +277,8 @@ typedef struct Struct_Obj_Entry {
|
|||
bool unholdfree : 1; /* unmap upon last unhold */
|
||||
bool doomed : 1; /* Object cannot be referenced */
|
||||
|
||||
MD_OBJ_ENTRY;
|
||||
|
||||
struct link_map linkmap; /* For GDB and dlinfo() */
|
||||
Objlist dldags; /* Object belongs to these dlopened DAGs (%) */
|
||||
Objlist dagmembers; /* DAG has these members (%) */
|
||||
|
|
Loading…
Reference in a new issue