From 211b0be8ce3796451393328215932f8d61091c13 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 21 Apr 1998 07:15:57 +0000 Subject: [PATCH] * elf64-alpha.c (elf64_alpha_find_reloc_at_ofs): Renamed from elf64_alpha_relax_find_reloc_ofs. Changed all callers. (elf64_alpha_add_symbol_hook): Put small commons in .scommon not .sbss. (elf64_alpha_size_got_sections): Don't merge .got sections twice. --- bfd/ChangeLog | 13 +++++++++++++ bfd/elf64-alpha.c | 32 +++++++++++++++++--------------- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ee383f1..bbd411c 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,16 @@ +Tue Apr 21 00:11:51 1998 Richard Henderson + + * archive.c (_bfd_generic_read_ar_hdr_mag): Simplify end-of-name test. + + * elf64-alpha.c (elf64_alpha_find_reloc_at_ofs): Renamed from + elf64_alpha_relax_find_reloc_ofs. Changed all callers. + (elf64_alpha_add_symbol_hook): Put small commons in .scommon not .sbss. + (elf64_alpha_size_got_sections): Don't merge .got sections twice. + +Sat Apr 18 01:21:04 1998 Stan Cox + + * config.bfd: Added sparc86x support. + Fri Apr 17 22:29:04 1998 Ian Lance Taylor * elf32-mips.c (mips_elf_relocate_section): Do not complain about diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index 243b9ed..36da889 100644 --- a/bfd/elf64-alpha.c +++ b/bfd/elf64-alpha.c @@ -888,8 +888,8 @@ elf64_alpha_do_reloc_gpdisp (abfd, gpdisp, p_ldah, p_lda) gpdisp += addend; - if ((bfd_signed_vma) gpdisp < -(bfd_signed_vma)0x80000000 - || gpdisp >= 0x7fff8000) + if ((bfd_signed_vma) gpdisp < -(bfd_signed_vma) 0x80000000 + || (bfd_signed_vma) gpdisp >= (bfd_signed_vma) 0x7fff8000) ret = bfd_reloc_overflow; /* compensate for the sign extension again. */ @@ -1062,7 +1062,7 @@ static boolean elf64_alpha_relax_section boolean *again)); static Elf_Internal_Rela * -elf64_alpha_relax_find_reloc_ofs (rel, relend, offset, type) +elf64_alpha_find_reloc_at_ofs (rel, relend, offset, type) Elf_Internal_Rela *rel, *relend; bfd_vma offset; int type; @@ -1212,7 +1212,7 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend) info->changed_relocs = true; /* Kill any HINT reloc that might exist for this insn. */ - xrel = (elf64_alpha_relax_find_reloc_ofs + xrel = (elf64_alpha_find_reloc_at_ofs (info->relocs, info->relend, urel->r_offset, R_ALPHA_HINT)); if (xrel) @@ -1732,25 +1732,25 @@ elf64_alpha_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp) /* Common symbols less than or equal to -G nn bytes are automatically put into .sbss. */ - asection *sbss = bfd_get_section_by_name (abfd, ".sbss"); + asection *scomm = bfd_get_section_by_name (abfd, ".scommon"); - if (sbss == NULL) + if (scomm == NULL) { - sbss = bfd_make_section (abfd, ".sbss"); - if (sbss == NULL - || !bfd_set_section_flags (abfd, sbss, (SEC_ALLOC | SEC_LOAD - | SEC_IS_COMMON - | SEC_LINKER_CREATED))) + scomm = bfd_make_section (abfd, ".scommon"); + if (scomm == NULL + || !bfd_set_section_flags (abfd, scomm, (SEC_ALLOC | SEC_LOAD + | SEC_IS_COMMON + | SEC_LINKER_CREATED))) return false; } - if (bfd_get_section_alignment (abfd, sbss) < sym->st_value) + if (bfd_get_section_alignment (abfd, scomm) < sym->st_value) { - if (!bfd_set_section_alignment (abfd, sbss, sym->st_value)) + if (!bfd_set_section_alignment (abfd, scomm, sym->st_value)) return false; } - *secp = sbss; + *secp = scomm; *valp = sym->st_size; } @@ -2952,7 +2952,9 @@ elf64_alpha_size_got_sections (output_bfd, info) if (cur_got_obj) { - if (elf64_alpha_can_merge_gots (cur_got_obj, i)) + if (this_got == cur_got_obj) + ; /* Some previous pass merged us already. */ + else if (elf64_alpha_can_merge_gots (cur_got_obj, i)) { elf64_alpha_merge_gots (cur_got_obj, i); *cur_got_tail = i; -- 2.7.4