Discussion:
[PATCH] elf: Don't merge .note.gnu.property section in IR
H.J. Lu
2018-11-28 19:13:00 UTC
Permalink
.note.gnu.property section in IR inputs should be ignored. Don't
merge them.

PR ld/23929
* elf-properties.c (_bfd_elf_link_setup_gnu_properties): Don't
merge .note.gnu.property section in IR inputs.
---
bfd/elf-properties.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bfd/elf-properties.c b/bfd/elf-properties.c
index 861db73170..cd44ed6194 100644
--- a/bfd/elf-properties.c
+++ b/bfd/elf-properties.c
@@ -446,7 +446,8 @@ _bfd_elf_link_setup_gnu_properties (struct bfd_link_info *info)

/* Merge .note.gnu.property sections. */
for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link.next)
- if (abfd != first_pbfd && (abfd->flags & DYNAMIC) == 0)
+ if (abfd != first_pbfd
+ && (abfd->flags & (DYNAMIC | BFD_PLUGIN)) == 0)
{
elf_property_list *null_ptr = NULL;
elf_property_list **listp = &null_ptr;
--
2.19.1
Alan Modra
2018-11-29 13:30:24 UTC
Permalink
Post by H.J. Lu
.note.gnu.property section in IR inputs should be ignored. Don't
merge them.
PR ld/23929
* elf-properties.c (_bfd_elf_link_setup_gnu_properties): Don't
merge .note.gnu.property section in IR inputs.
Looks fine to me.
--
Alan Modra
Australia Development Lab, IBM
H.J. Lu
2018-12-01 16:53:14 UTC
Permalink
Post by Alan Modra
Post by H.J. Lu
.note.gnu.property section in IR inputs should be ignored. Don't
merge them.
PR ld/23929
* elf-properties.c (_bfd_elf_link_setup_gnu_properties): Don't
merge .note.gnu.property section in IR inputs.
Looks fine to me.
I am backporting it to binutils 2.31.
--
H.J.
Loading...