diff options
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/emultempl/ppc64elf.em | 17 | ||||
-rw-r--r-- | ld/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-powerpc/tocnovar.d | 2 |
4 files changed, 20 insertions, 8 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index e58963e..de594c0 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2015-04-24 Alan Modra <amodra@gmail.com> + + * emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation): + Call gld${EMULATION_NAME}_map_segments regardless of need_laying_out. + 2015-04-24 DJ Delorie <dj@redhat.com> * Makefile.am (msp430): Rename primary emulation to msp430elf. diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index fd9a3ce..2d26a95 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -546,13 +546,16 @@ gld${EMULATION_NAME}_after_allocation (void) else if (ret > 0) need_laying_out = 1; - if (need_laying_out != -1) - { - gld${EMULATION_NAME}_map_segments (need_laying_out); - - if (!link_info.relocatable) - ppc64_elf_set_toc (&link_info, link_info.output_bfd); - } + /* Call map_segments regardless of the state of need_laying_out. + need_laying_out set to -1 means we have just laid everything out, + but ppc64_elf_size_stubs strips .branch_lt and .eh_frame if + unneeded, after ppc_layout_sections_again. Another call removes + these sections from the segment map. Their presence is + innocuous except for confusing ELF_SECTION_IN_SEGMENT. */ + gld${EMULATION_NAME}_map_segments (need_laying_out > 0); + + if (need_laying_out != -1 && !link_info.relocatable) + ppc64_elf_set_toc (&link_info, link_info.output_bfd); } diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 18516a2..db467a9 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-04-24 Alan Modra <amodra@gmail.com> + + * ld-powerpc/tocnovar.d: Revert last change. + 2015-04-24 Richard Earnshaw <rearnsha@arm.com> * ld-arm/armthumb-lib.d: Regenerate expected output. diff --git a/ld/testsuite/ld-powerpc/tocnovar.d b/ld/testsuite/ld-powerpc/tocnovar.d index 475617a..d1fd258 100644 --- a/ld/testsuite/ld-powerpc/tocnovar.d +++ b/ld/testsuite/ld-powerpc/tocnovar.d @@ -11,4 +11,4 @@ #... +00 +\.text +01 +\.opd \.got - +02 +\.opd \.got .* + +02 +\.opd \.got |