rtld: Add arch_digest_dynamic

This will be used to handle the DT_AARCH64_VARIANT_PCS tag.

Reviewed by:	kib
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45117
This commit is contained in:
Andrew Turner 2024-05-07 17:14:47 +01:00
parent 06db20ffec
commit dd4155bec7
8 changed files with 24 additions and 0 deletions

View File

@ -47,6 +47,9 @@ struct Struct_Obj_Entry;
(const Elf_Dyn *)_dynamic_addr; \
})
/* No arch-specific dynamic tags */
#define arch_digest_dynamic(obj, dynp) false
bool arch_digest_note(struct Struct_Obj_Entry *obj, const Elf_Note *note);
Elf_Addr reloc_jmpslot(Elf_Addr *where, Elf_Addr target,

View File

@ -41,6 +41,9 @@ struct Struct_Obj_Entry;
Elf_Dyn *rtld_dynamic_addr(void);
#define rtld_dynamic(obj) rtld_dynamic_addr()
/* No arch-specific dynamic tags */
#define arch_digest_dynamic(obj, dynp) false
/* No architecture specific notes */
#define arch_digest_note(obj, note) false

View File

@ -41,6 +41,9 @@ struct Struct_Obj_Entry;
/* Return the address of the .dynamic section in the dynamic linker. */
#define rtld_dynamic(obj) (&_DYNAMIC)
/* No arch-specific dynamic tags */
#define arch_digest_dynamic(obj, dynp) false
/* No architecture specific notes */
#define arch_digest_note(obj, note) false

View File

@ -41,6 +41,9 @@ struct Struct_Obj_Entry;
#define rtld_dynamic(obj) \
((const Elf_Dyn *)((obj)->relocbase + (Elf_Addr)&_DYNAMIC))
/* No arch-specific dynamic tags */
#define arch_digest_dynamic(obj, dynp) false
/* No architecture specific notes */
#define arch_digest_note(obj, note) false

View File

@ -40,6 +40,9 @@ struct Struct_Obj_Entry;
/* Return the address of the .dynamic section in the dynamic linker. */
#define rtld_dynamic(obj) (&_DYNAMIC)
/* No arch-specific dynamic tags */
#define arch_digest_dynamic(obj, dynp) false
/* No architecture specific notes */
#define arch_digest_note(obj, note) false

View File

@ -40,6 +40,9 @@ struct Struct_Obj_Entry;
/* Return the address of the .dynamic section in the dynamic linker. */
#define rtld_dynamic(obj) (&_DYNAMIC)
/* No arch-specific dynamic tags */
#define arch_digest_dynamic(obj, dynp) false
/* No architecture specific notes */
#define arch_digest_note(obj, note) false

View File

@ -54,6 +54,9 @@ uint64_t set_gp(struct Struct_Obj_Entry *obj);
(const Elf_Dyn *)_dynamic_addr; \
})
/* No arch-specific dynamic tags */
#define arch_digest_dynamic(obj, dynp) false
/* No architecture specific notes */
#define arch_digest_note(obj, note) false

View File

@ -1554,6 +1554,9 @@ digest_dynamic1(Obj_Entry *obj, int early, const Elf_Dyn **dyn_rpath,
break;
default:
if (arch_digest_dynamic(obj, dynp))
break;
if (!early) {
dbg("Ignoring d_tag %ld = %#lx", (long)dynp->d_tag,
(long)dynp->d_tag);