]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
elf: Prune empty generic properties
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 19 Aug 2025 02:16:00 +0000 (19:16 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 19 Aug 2025 11:10:02 +0000 (04:10 -0700)
commit985bc55e998d83086c7bf9a1a71a52a2673370c7
tree18fd8d19a45ea96768f9b3f5472b5fe8e79268f0
parente067b9d0277039d04698099dc6f42d10c4a2bcb5
elf: Prune empty generic properties

Prune empty generic properties before discarding empty property note
section and leave processor specific properties to the backend.

bfd/

PR ld/33292
* elf-properties.c (elf_prune_empty_properties): New function.
(_bfd_elf_link_setup_gnu_properties): Call
elf_prune_empty_properties before discarding empty property note
section.  Move indirect_extern_access processing before
elf_prune_empty_properties call.

ld/

PR ld/33292
* testsuite/ld-x86-64/pr33292-x32.d: New file.
* testsuite/ld-x86-64/pr33292.d: Likewise.
* testsuite/ld-x86-64/pr33292.s: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run PR ld/33292 tests.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
bfd/elf-properties.c
ld/testsuite/ld-x86-64/pr33292-x32.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr33292.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/pr33292.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/x86-64.exp