diff options
author | Alan Modra <amodra@gmail.com> | 2002-05-02 09:48:15 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-05-02 09:48:15 +0000 |
commit | 805fc79928c2c14c9223a18e8e1e0b94ccb58f16 (patch) | |
tree | 00ce7db8e460367f2ddcaed91548e9154dd8a2d9 /ld/emultempl | |
parent | 358b94bdb1b02dbc21a19719fbaa9fbe9c93c61a (diff) | |
download | gdb-805fc79928c2c14c9223a18e8e1e0b94ccb58f16.zip gdb-805fc79928c2c14c9223a18e8e1e0b94ccb58f16.tar.gz gdb-805fc79928c2c14c9223a18e8e1e0b94ccb58f16.tar.bz2 |
* elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
(ppc64_elf_ha_reloc): New function.
(ppc64_elf_brtaken_reloc): New function.
(ppc64_elf_sectoff_reloc): New function.
(ppc64_elf_sectoff_ha_reloc): New function.
(ppc64_elf_toc_reloc): New function.
(ppc64_elf_toc_ha_reloc): New function.
(ppc64_elf_toc64_reloc): New function.
(ppc64_elf_unhandled_reloc): New function.
(ppc64_elf_howto_raw): Use the above.
<R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
<R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
<R_PPC64_SECTOFF_DS>: Likewise.
(IS_ABSOLUTE_RELOC): Update.
(struct ppc_link_hash_table): Add have_undefweak.
(ppc64_elf_link_hash_table_create): Init.
(func_desc_adjust): Set have_undefweak.
(ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
add the .sfpr blr when have_undefweak.
(ppc64_elf_setup_section_lists): Check hash table flavour.
(ppc64_elf_next_input_section): Move output_section->owner test to
ppc64elf.em.
(ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
and relocatable test. Return TOCstart and don't set elf_gp.
(ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
offset calculation. Add assert on weak sym branch tweaks.
* elf64-ppc.h (ppc64_elf_set_toc): Delete.
(ppc64_elf_toc): Declare.
(ppc64_elf_next_input_section): Update.
* emultempl/ppc64elf.em (gld${EMULATION_NAME}_after_allocation):
Adjust for ppc64_elf_set_toc change. #include libbfd.h.
(build_section_lists): Do output_section tests here.
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/ppc64elf.em | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ld/emultempl/ppc64elf.em b/ld/emultempl/ppc64elf.em index a96bb22..a280804 100644 --- a/ld/emultempl/ppc64elf.em +++ b/ld/emultempl/ppc64elf.em @@ -24,6 +24,7 @@ cat >>e${EMULATION_NAME}.c <<EOF #include "ldctor.h" +#include "libbfd.h" #include "elf64-ppc.h" /* Fake input file for stubs. */ @@ -222,8 +223,8 @@ ppc_layout_sections_again () static void gld${EMULATION_NAME}_after_allocation () { - if (!ppc64_elf_set_toc (output_bfd, &link_info)) - einfo ("%X%P: can not set TOC base: %E\n"); + if (!link_info.relocateable) + _bfd_set_gp_value (output_bfd, ppc64_elf_toc (output_bfd)); } @@ -232,9 +233,11 @@ build_section_lists (statement) lang_statement_union_type *statement; { if (statement->header.type == lang_input_section_enum - && !statement->input_section.ifile->just_syms_flag) + && !statement->input_section.ifile->just_syms_flag + && statement->input_section.section->output_section != NULL + && statement->input_section.section->output_section->owner == output_bfd) { - ppc64_elf_next_input_section (output_bfd, &link_info, + ppc64_elf_next_input_section (&link_info, statement->input_section.section); } } |