summaryrefslogtreecommitdiffstats
path: root/bfd/section.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-06-08 14:06:38 +0000
committerAlan Modra <amodra@gmail.com>2003-06-08 14:06:38 +0000
commitad8e1ba5991e63b07ebd3a33cd3de072dd8aeca4 (patch)
tree45c7866982d92e689be835784645c1cb69530420 /bfd/section.c
parentb5ca37229df68e9f14e491e25a47cc5b61a04e04 (diff)
downloadppe42-binutils-ad8e1ba5991e63b07ebd3a33cd3de072dd8aeca4.tar.gz
ppe42-binutils-ad8e1ba5991e63b07ebd3a33cd3de072dd8aeca4.zip
* elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
elfxx-target.h so that we can use elf_backend_got_header_size. (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete. (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and associated macros. (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct dst_mask. (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and ppc_stub_plt_branch_r2off. (struct ppc_stub_hash_entry): Reorganize. (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed, toc_curr, toc_off and emit_stub_syms. (ppc64_elf_link_hash_table_create): Init them. (ppc_stub_name): Correct string size. (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs. (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries used. (ppc_type_of_stub): Tweak root.type test. (build_plt_stub): Remove glink code. Adjust for insn macro changes. (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and ppc_stub_plt_branch_r2off. (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi range test. Use toc_off to calculte r2 values. Handle emit_stub_syms. (ppc64_elf_setup_section_lists): Remove htab creator flavour test. Initialize elf_gp and toc_curr. (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions. (ppc64_elf_next_input_section): Set toc_off. (group_sections): Ensure groups have the same TOC. (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub. (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab. Build new glink stub. (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments. (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK. * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype. (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare. * section.c (struct sec): Rename flag12 to has_gp_reloc. (STD_SECTION): Update. * ecoff.c (bfd_debug_section): Update comment. * bfd-in2.h: Regenerate.
Diffstat (limited to 'bfd/section.c')
-rw-r--r--bfd/section.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/bfd/section.c b/bfd/section.c
index 04f439e9b4..6facfe2066 100644
--- a/bfd/section.c
+++ b/bfd/section.c
@@ -399,8 +399,10 @@ CODE_FRAGMENT
. {* Nonzero if this section needs the relax finalize pass. *}
. unsigned int need_finalize_relax:1;
.
+. {* Nonzero if this section has a gp reloc. *}
+. unsigned int has_gp_reloc:1;
+.
. {* Usused bits. *}
-. unsigned int flag12:1;
. unsigned int flag13:1;
. unsigned int flag14:1;
. unsigned int flag15:1;
@@ -617,8 +619,11 @@ static const asymbol global_syms[] =
/* linker_mark, linker_has_input, gc_mark, segment_mark, */ \
0, 0, 1, 0, \
\
- /* sec_info_type, use_rela_p, has_tls_reloc, need_finalize_relax, flag12, */ \
- 0, 0, 0, 0, 0, \
+ /* sec_info_type, use_rela_p, has_tls_reloc, */ \
+ 0, 0, 0, \
+ \
+ /* need_finalize_relax, has_gp_reloc, */ \
+ 0, 0, \
\
/* flag13, flag14, flag15, flag16, flag20, flag24, */ \
0, 0, 0, 0, 0, 0, \
OpenPOWER on IntegriCloud