+2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/21626
+ * elf-properties.c (_bfd_elf_link_setup_gnu_properties): Check
+ the DYNAMIC bit instead of bfd_count_sections.
+
2017-06-19 Nick Clifton <nickc@redhat.com>
PR binutils/21618
/* Find the first relocatable ELF input with GNU properties. */
for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link.next)
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
- && bfd_count_sections (abfd) != 0
+ && (abfd->flags & DYNAMIC) == 0
&& elf_properties (abfd) != NULL)
{
has_properties = TRUE;
/* Merge .note.gnu.property sections. */
for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link.next)
- if (abfd != first_pbfd && bfd_count_sections (abfd) != 0)
+ if (abfd != first_pbfd && (abfd->flags & DYNAMIC) == 0)
{
elf_property_list *null_ptr = NULL;
elf_property_list **listp = &null_ptr;
+2017-06-19 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/21626
+ * testsuite/ld-i386/i386.exp: Run ld/21626 tests.
+ * testsuite/ld-x86-64/x86-64.exp: Likewise.
+
2017-06-18 Alan Modra <amodra@gmail.com>
* testsuite/lib/ld-lib.exp (is_underscore_target): New.
{{objdump -dwr plt-pic2.dd}} \
"plt-pic2.so" \
] \
+ [list \
+ "Build pr21626.so" \
+ "-shared -melf_i386" \
+ "" \
+ "--32" \
+ {property-x86-3.s} \
+ "" \
+ "pr21626.so" \
+ ] \
+ [list \
+ "Build pr21626" \
+ "-melf_i386 tmpdir/pr21626.so" \
+ "" \
+ "--32" \
+ {start.s foo.s} \
+ "" \
+ "pr21626" \
+ ] \
]
# Linux only tests
{{readelf -SW plt2.rd} {objdump -dwr plt2.dd}} \
"plt2" \
] \
+ [list \
+ "Build pr21626.so" \
+ "-shared -melf_x86_64" \
+ "" \
+ "--64 -defsym __64_bit__=1" \
+ {property-x86-3.s} \
+ "" \
+ "pr21626.so" \
+ ] \
+ [list \
+ "Build pr21626" \
+ "-melf_x86_64 tmpdir/pr21626.so" \
+ "" \
+ "--64" \
+ {start.s foo.s} \
+ "" \
+ "pr21626" \
+ ] \
]
# Linux only tests