Clear HAS_RELOC if there are no relocations
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 2 Feb 2016 11:30:21 +0000 (03:30 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 2 Feb 2016 11:30:48 +0000 (03:30 -0800)
commit14f2c699ddca1e2f706342dffc59a6c7e23e844c
tree1c139746a08e92bb640f08145d0ca4f28d696571
parenta143b0045ca8a7024a8515b5dda3ceab5f832e83
Clear HAS_RELOC if there are no relocations

The HAS_RELOC bit should be cleared when relocations are removed from
relocatable files.

bfd/

PR binutils/19547
* elf.c (assign_section_numbers): Clear HAS_RELOC if there are
no relocations in relocatable files.

binutils/

PR binutils/19547
* testsuite/binutils-all/objcopy.exp
(objcopy_test_without_global_symbol): New proc.
Run objcopy_test_without_global_symbol.
* testsuite/binutils-all/pr19547.c: New file.
bfd/ChangeLog
bfd/elf.c
binutils/ChangeLog
binutils/testsuite/binutils-all/objcopy.exp
binutils/testsuite/binutils-all/pr19547.c [new file with mode: 0644]