mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-10 05:52:21 +08:00
x86: Remove empty X86_FEATURE_1_AND property
There is no need to generate .note.gnu.property section with empty X86_FEATURE_1_AND property. This patch adds fixup_gnu_properties to ELF linker backend so that x86 backend can remove it. bfd/ PR ld/23515 * elf-bfd.h (elf_backend_data): Add fixup_gnu_properties. * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Call backend fixup_gnu_properties if it isn't NULL. Discard .note.gnu.property section if all properties have been removed. * elfxx-target.h (elf_backend_fixup_gnu_properties): New. (elfNN_bed): Initialize fixup_gnu_properties. * elfxx-x86.c (_bfd_x86_elf_link_fixup_gnu_properties): New function. * elfxx-x86.h (_bfd_x86_elf_link_fixup_gnu_properties): New prototype. (elf_backend_fixup_gnu_properties): New. ld/ PR ld/23515 * testsuite/ld-i386/ibt-plt-2a.d: Updated. * testsuite/ld-i386/ibt-plt-2b.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2a-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2a.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2b-x32.d: Likewise. * testsuite/ld-x86-64/ibt-plt-2b.d: Likewise.
This commit is contained in:
@ -1479,6 +1479,10 @@ struct elf_backend_data
|
||||
/* Set up GNU properties. */
|
||||
bfd *(*setup_gnu_properties) (struct bfd_link_info *);
|
||||
|
||||
/* Fix up GNU properties. */
|
||||
void (*fixup_gnu_properties) (struct bfd_link_info *,
|
||||
elf_property_list **);
|
||||
|
||||
/* Encoding used for compact EH tables. */
|
||||
int (*compact_eh_encoding) (struct bfd_link_info *);
|
||||
|
||||
|
Reference in New Issue
Block a user