diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-06-17 12:35:18 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-07-08 18:11:53 -0700 |
commit | 6320fd00dc374f74658c7e4b7dffbe1d71723284 (patch) | |
tree | 95d9ca4603d3b066d511280d66ee384062c52853 /ld | |
parent | ce8fea3651a6050d5089b6d90068733f4cb9f686 (diff) | |
download | gdb-6320fd00dc374f74658c7e4b7dffbe1d71723284.zip gdb-6320fd00dc374f74658c7e4b7dffbe1d71723284.tar.gz gdb-6320fd00dc374f74658c7e4b7dffbe1d71723284.tar.bz2 |
elf: Add GNU_PROPERTY_1_NEEDED
Add GNU_PROPERTY_1_NEEDED:
#define GNU_PROPERTY_1_NEEDED GNU_PROPERTY_UINT32_OR_LO
to indicate the needed properties by the object file.
Add GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS:
#define GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS (1U << 0)
to indicate that the object file requires canonical function pointers and
cannot be used with copy relocation.
binutils/
* readelf.c (decode_1_needed): New.
(print_gnu_property_note): Handle GNU_PROPERTY_1_NEEDED.
include/
* elf/common.h (GNU_PROPERTY_1_NEEDED): New.
(GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS): Likewise.
ld/
* testsuite/ld-elf/property-1_needed-1a.d: New file.
* testsuite/ld-elf/property-1_needed-1.s: Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ld-elf/property-1_needed-1.s | 15 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/property-1_needed-1a.d | 17 |
2 files changed, 32 insertions, 0 deletions
diff --git a/ld/testsuite/ld-elf/property-1_needed-1.s b/ld/testsuite/ld-elf/property-1_needed-1.s new file mode 100644 index 0000000..5d5cdc8 --- /dev/null +++ b/ld/testsuite/ld-elf/property-1_needed-1.s @@ -0,0 +1,15 @@ + .section ".note.gnu.property", "a" + .p2align ALIGN + .long 1f - 0f /* name length */ + .long 5f - 2f /* data length */ + .long 5 /* note type */ +0: .asciz "GNU" /* vendor name */ +1: + .p2align ALIGN +2: .long 0xb0008000 /* pr_type. */ + .long 4f - 3f /* pr_datasz. */ +3: + .long 0x3 +4: + .p2align ALIGN +5: diff --git a/ld/testsuite/ld-elf/property-1_needed-1a.d b/ld/testsuite/ld-elf/property-1_needed-1a.d new file mode 100644 index 0000000..d994e6e --- /dev/null +++ b/ld/testsuite/ld-elf/property-1_needed-1a.d @@ -0,0 +1,17 @@ +#source: empty.s +#source: property-1_needed-1.s +#as: +#ld: -shared +#readelf: -n +#xfail: ![check_shared_lib_support] +#notarget: am33_2.0-*-* hppa*-*-hpux* mn10300-*-* +# Assembly source file for the HPPA assembler is renamed and modifed by +# sed. mn10300 has relocations in .note.gnu.property section which +# elf_parse_notes doesn't support. + +#... +Displaying notes found in: .note.gnu.property +[ ]+Owner[ ]+Data size[ ]+Description + GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0 + Properties: 1_needed: indirect external access, <unknown: 2> +#pass |