Don't add PHDR for objcopy/strip or ld script specifying PHDRS
authorAlan Modra <amodra@gmail.com>
Mon, 12 Dec 2016 23:00:06 +0000 (09:30 +1030)
committerAlan Modra <amodra@gmail.com>
Mon, 12 Dec 2016 23:07:59 +0000 (09:37 +1030)
commit22b05d33b4c870d65972ff8aefdd297ddc66d139
tree2d8a77b9ee451188f674ed380f0d228393233267
parent6392030005291f7c783da2247b63ae31dc8352e0
Don't add PHDR for objcopy/strip or ld script specifying PHDRS

HPPA64 needs to add a DT_PHDR header for shared libs.  That's fine
when linking but shouldn't happen for strip/objcopy.  Also PHDR must
come first so there's no need to look at all program headers.

bfd/
* elf64-hppa.c (elf64_hppa_modify_segment_map): Don't add PHDR
for objcopy/strip or when a ld script specifies PHDRS.
ld/
* testsuite/ld-elf/nobits-1.d: Remove xfail for hppa64.
* testsuite/ld-elf/note-1.d: Likewise.
* testsuite/ld-elf/note-2.d: Likewise.
bfd/ChangeLog
bfd/elf64-hppa.c
ld/ChangeLog
ld/testsuite/ld-elf/nobits-1.d
ld/testsuite/ld-elf/note-1.d
ld/testsuite/ld-elf/note-2.d