mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
* elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
updated section in case of merged section. * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration. * elf-hppa.h (elf_hppa_relocate_section): Adjust call. * elf-m10200.c (mn10200_elf_relocate_section): Likewise. * elf-m10300.c (mn10300_elf_relocate_section): Likewise. * elf32-arm.h (elf32_arm_relocate_section): Likewise. * elf32-avr.c (elf32_avr_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Likewise. * elf32-fr30.c (fr30_elf_relocate_section): Likewise. * elf32-frv.c (elf32_frv_relocate_section): Likewise. * elf32-h8300.c (elf32_h8_relocate_section): Likewise. * elf32-hppa.c (elf32_hppa_relocate_section): Likewise. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-i860.c (elf32_i860_relocate_section): Likewise. * elf32-m32r.c (m32r_elf_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-mcore.c (mcore_elf_relocate_section): Likewise. * elf32-msp430.c (elf32_msp430_relocate_section): Likewise. * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Likewise. * elf32-s390.c (elf_s390_relocate_section): Likewise. * elf32-sh.c (sh_elf_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. * elf32-v850.c (v850_elf_relocate_section) Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise. * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise. * elf64-alpha.c (elf64_alpha_relocate_section): Likewise. * elf64-mmix.c (mmix_elf_relocate_section): Likewise. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. * elf64-s390.c (elf_s390_relocate_section): Likewise. * elf64-sh64.c (sh_elf64_relocate_section): Likewise. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise. * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol section for reloc output. * elf32-i370.c (i370_elf_relocate_section): Likewise. * elf32-m68k.c (elf_m68k_relocate_section): Likewise. * elf32-sparc.c (elf32_sparc_relocate_section): Likewise. * elf32-vax.c (elf_vax_relocate_section): Likewise. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise. * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise. * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value return value. * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check sec->id.
This commit is contained in:
parent
a2b0fe9d4d
commit
8517fae7a5
@ -1,3 +1,57 @@
|
||||
2003-11-05 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
|
||||
updated section in case of merged section.
|
||||
* elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
|
||||
* elf-hppa.h (elf_hppa_relocate_section): Adjust call.
|
||||
* elf-m10200.c (mn10200_elf_relocate_section): Likewise.
|
||||
* elf-m10300.c (mn10300_elf_relocate_section): Likewise.
|
||||
* elf32-arm.h (elf32_arm_relocate_section): Likewise.
|
||||
* elf32-avr.c (elf32_avr_relocate_section): Likewise.
|
||||
* elf32-cris.c (cris_elf_relocate_section): Likewise.
|
||||
* elf32-fr30.c (fr30_elf_relocate_section): Likewise.
|
||||
* elf32-frv.c (elf32_frv_relocate_section): Likewise.
|
||||
* elf32-h8300.c (elf32_h8_relocate_section): Likewise.
|
||||
* elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
|
||||
* elf32-i370.c (i370_elf_relocate_section): Likewise.
|
||||
* elf32-i860.c (elf32_i860_relocate_section): Likewise.
|
||||
* elf32-m32r.c (m32r_elf_relocate_section): Likewise.
|
||||
* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
|
||||
* elf32-mcore.c (mcore_elf_relocate_section): Likewise.
|
||||
* elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
|
||||
* elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
|
||||
* elf32-ppc.c (ppc_elf_relocate_section): Likewise.
|
||||
* elf32-s390.c (elf_s390_relocate_section): Likewise.
|
||||
* elf32-sh.c (sh_elf_relocate_section): Likewise.
|
||||
* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
|
||||
* elf32-v850.c (v850_elf_relocate_section) Likewise.
|
||||
* elf32-vax.c (elf_vax_relocate_section): Likewise.
|
||||
* elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
|
||||
* elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
|
||||
* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
|
||||
* elf64-mmix.c (mmix_elf_relocate_section): Likewise.
|
||||
* elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
|
||||
* elf64-s390.c (elf_s390_relocate_section): Likewise.
|
||||
* elf64-sh64.c (sh_elf64_relocate_section): Likewise.
|
||||
* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
|
||||
* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
|
||||
* elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
|
||||
|
||||
* elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
|
||||
section for reloc output.
|
||||
* elf32-i370.c (i370_elf_relocate_section): Likewise.
|
||||
* elf32-m68k.c (elf_m68k_relocate_section): Likewise.
|
||||
* elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
|
||||
* elf32-vax.c (elf_vax_relocate_section): Likewise.
|
||||
* elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
|
||||
* elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
|
||||
|
||||
* elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
|
||||
for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
|
||||
return value.
|
||||
* elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
|
||||
sec->id.
|
||||
|
||||
2003-11-05 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
|
||||
|
@ -1295,7 +1295,7 @@ extern void _bfd_elf_fprintf_vma
|
||||
extern enum elf_reloc_type_class _bfd_elf_reloc_type_class
|
||||
(const Elf_Internal_Rela *);
|
||||
extern bfd_vma _bfd_elf_rela_local_sym
|
||||
(bfd *, Elf_Internal_Sym *, asection *, Elf_Internal_Rela *);
|
||||
(bfd *, Elf_Internal_Sym *, asection **, Elf_Internal_Rela *);
|
||||
extern bfd_vma _bfd_elf_rel_local_sym
|
||||
(bfd *, Elf_Internal_Sym *, asection **, bfd_vma);
|
||||
extern bfd_vma _bfd_elf_section_offset
|
||||
|
@ -1346,7 +1346,7 @@ elf_hppa_relocate_section (bfd *output_bfd,
|
||||
/* This is a local symbol. */
|
||||
sym = local_syms + r_symndx;
|
||||
sym_sec = local_sections[r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sym_sec, rel);
|
||||
|
||||
/* If this symbol has an entry in the PA64 dynamic hash
|
||||
table, then get it. */
|
||||
|
@ -373,7 +373,7 @@ mn10200_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections[r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1576,7 +1576,7 @@ mn10300_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections[r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
15
bfd/elf.c
15
bfd/elf.c
@ -7368,9 +7368,10 @@ _bfd_elf_reloc_type_class (const Elf_Internal_Rela *rela ATTRIBUTE_UNUSED)
|
||||
bfd_vma
|
||||
_bfd_elf_rela_local_sym (bfd *abfd,
|
||||
Elf_Internal_Sym *sym,
|
||||
asection *sec,
|
||||
asection **psec,
|
||||
Elf_Internal_Rela *rel)
|
||||
{
|
||||
asection *sec = *psec;
|
||||
bfd_vma relocation;
|
||||
|
||||
relocation = (sec->output_section->vma
|
||||
@ -7380,16 +7381,14 @@ _bfd_elf_rela_local_sym (bfd *abfd,
|
||||
&& ELF_ST_TYPE (sym->st_info) == STT_SECTION
|
||||
&& sec->sec_info_type == ELF_INFO_TYPE_MERGE)
|
||||
{
|
||||
asection *msec;
|
||||
|
||||
msec = sec;
|
||||
rel->r_addend =
|
||||
_bfd_merged_section_offset (abfd, &msec,
|
||||
_bfd_merged_section_offset (abfd, psec,
|
||||
elf_section_data (sec)->sec_info,
|
||||
sym->st_value + rel->r_addend,
|
||||
0)
|
||||
- relocation;
|
||||
rel->r_addend += msec->output_section->vma + msec->output_offset;
|
||||
0);
|
||||
sec = *psec;
|
||||
rel->r_addend -= relocation;
|
||||
rel->r_addend += sec->output_section->vma + sec->output_offset;
|
||||
}
|
||||
return relocation;
|
||||
}
|
||||
|
@ -2127,7 +2127,7 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
bfd_put_32 (input_bfd, value, contents + rel->r_offset);
|
||||
}
|
||||
#else
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
@ -750,7 +750,7 @@ elf32_avr_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections [r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
|
||||
name = bfd_elf_string_from_elf_section
|
||||
(input_bfd, symtab_hdr->sh_link, sym->st_name);
|
||||
|
@ -847,7 +847,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections [r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
|
||||
symname = (bfd_elf_string_from_elf_section
|
||||
(input_bfd, symtab_hdr->sh_link, sym->st_name));
|
||||
@ -1292,16 +1292,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
long indx;
|
||||
|
||||
if (h == NULL)
|
||||
sec = local_sections[r_symndx];
|
||||
else
|
||||
{
|
||||
BFD_ASSERT (h->root.type == bfd_link_hash_defined
|
||||
|| (h->root.type
|
||||
== bfd_link_hash_defweak));
|
||||
sec = h->root.u.def.section;
|
||||
}
|
||||
if (sec != NULL && bfd_is_abs_section (sec))
|
||||
if (bfd_is_abs_section (sec))
|
||||
indx = 0;
|
||||
else if (sec == NULL || sec->owner == NULL)
|
||||
{
|
||||
|
@ -552,7 +552,7 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections [r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
|
||||
name = bfd_elf_string_from_elf_section
|
||||
(input_bfd, symtab_hdr->sh_link, sym->st_name);
|
||||
|
@ -724,7 +724,7 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections [r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
|
||||
name = bfd_elf_string_from_elf_section
|
||||
(input_bfd, symtab_hdr->sh_link, sym->st_name);
|
||||
|
@ -435,7 +435,7 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections[r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -3439,7 +3439,7 @@ elf32_hppa_relocate_section (bfd *output_bfd,
|
||||
/* This is a local symbol, h defaults to NULL. */
|
||||
sym = local_syms + r_symndx;
|
||||
sym_sec = local_sections[r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sym_sec, rel);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1210,7 +1210,7 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
sec = local_sections[r_symndx];
|
||||
sym_name = "<local symbol>";
|
||||
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
addend = rel->r_addend;
|
||||
}
|
||||
else
|
||||
@ -1363,16 +1363,7 @@ i370_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
long indx;
|
||||
|
||||
if (h == NULL)
|
||||
sec = local_sections[r_symndx];
|
||||
else
|
||||
{
|
||||
BFD_ASSERT (h->root.type == bfd_link_hash_defined
|
||||
|| (h->root.type
|
||||
== bfd_link_hash_defweak));
|
||||
sec = h->root.u.def.section;
|
||||
}
|
||||
if (sec != NULL && bfd_is_abs_section (sec))
|
||||
if (bfd_is_abs_section (sec))
|
||||
indx = 0;
|
||||
else if (sec == NULL || sec->owner == NULL)
|
||||
{
|
||||
|
@ -1104,7 +1104,7 @@ elf32_i860_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections [r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
|
||||
name = bfd_elf_string_from_elf_section
|
||||
(input_bfd, symtab_hdr->sh_link, sym->st_name);
|
||||
|
@ -1107,7 +1107,7 @@ m32r_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
sec = local_sections[r_symndx];
|
||||
sym_name = "<local symbol>";
|
||||
#if !USE_REL
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
addend = rel->r_addend;
|
||||
#else
|
||||
/* FIXME: This won't handle local relocations against SEC_MERGE
|
||||
|
@ -1403,7 +1403,7 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections[r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1657,16 +1657,7 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
long indx;
|
||||
|
||||
if (h == NULL)
|
||||
sec = local_sections[r_symndx];
|
||||
else
|
||||
{
|
||||
BFD_ASSERT (h->root.type == bfd_link_hash_defined
|
||||
|| (h->root.type
|
||||
== bfd_link_hash_defweak));
|
||||
sec = h->root.u.def.section;
|
||||
}
|
||||
if (sec != NULL && bfd_is_abs_section (sec))
|
||||
if (bfd_is_abs_section (sec))
|
||||
indx = 0;
|
||||
else if (sec == NULL || sec->owner == NULL)
|
||||
{
|
||||
|
@ -467,7 +467,7 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections [r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
addend = rel->r_addend;
|
||||
}
|
||||
else
|
||||
|
@ -449,7 +449,7 @@ elf32_msp430_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections[r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
|
||||
name = bfd_elf_string_from_elf_section
|
||||
(input_bfd, symtab_hdr->sh_link, sym->st_name);
|
||||
|
@ -375,7 +375,7 @@ openrisc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections[r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
|
||||
name = bfd_elf_string_from_elf_section
|
||||
(input_bfd, symtab_hdr->sh_link, sym->st_name);
|
||||
|
@ -4715,7 +4715,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
|
||||
sec = local_sections[r_symndx];
|
||||
sym_name = bfd_elf_local_sym_name (input_bfd, sym);
|
||||
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -5441,44 +5441,9 @@ ppc_elf_relocate_section (bfd *output_bfd,
|
||||
break;
|
||||
|
||||
case R_PPC_RELAX32:
|
||||
{
|
||||
unsigned long r_symndx;
|
||||
Elf_Internal_Sym *sym;
|
||||
asection *sym_sec;
|
||||
bfd_byte *hit_addr = 0;
|
||||
bfd_vma value = 0;
|
||||
|
||||
r_symndx = ELF32_R_SYM (rel->r_info);
|
||||
|
||||
if (r_symndx < symtab_hdr->sh_info)
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sym_sec = local_sections[r_symndx];
|
||||
|
||||
value = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel);
|
||||
}
|
||||
else
|
||||
{
|
||||
bfd_boolean warned;
|
||||
bfd_boolean unresolved_reloc;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, elf_sym_hashes (input_bfd),
|
||||
r_symndx, symtab_hdr,
|
||||
value, sym_sec,
|
||||
unresolved_reloc, info,
|
||||
warned);
|
||||
if (warned)
|
||||
continue;
|
||||
}
|
||||
hit_addr = contents + rel->r_offset;
|
||||
value += rel->r_addend;
|
||||
|
||||
r = ppc_elf_install_value (output_bfd, hit_addr, value, r_type);
|
||||
if (r != bfd_reloc_ok)
|
||||
break;
|
||||
else
|
||||
continue;
|
||||
}
|
||||
ppc_elf_install_value (output_bfd, contents + rel->r_offset,
|
||||
relocation + addend, r_type);
|
||||
continue;
|
||||
|
||||
/* Indirect .sdata relocation. */
|
||||
case R_PPC_EMB_SDAI16:
|
||||
|
@ -2325,7 +2325,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections[r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4805,7 +4805,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
|
||||
}
|
||||
else if (! howto->partial_inplace)
|
||||
{
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
addend = rel->r_addend;
|
||||
}
|
||||
else if ((sec->flags & SEC_MERGE)
|
||||
|
@ -2180,7 +2180,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections[r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2457,16 +2457,8 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
|
||||
if (is_plt)
|
||||
sec = htab->splt;
|
||||
else if (h == NULL)
|
||||
sec = local_sections[r_symndx];
|
||||
else
|
||||
{
|
||||
BFD_ASSERT (h->root.type == bfd_link_hash_defined
|
||||
|| (h->root.type
|
||||
== bfd_link_hash_defweak));
|
||||
sec = h->root.u.def.section;
|
||||
}
|
||||
if (sec != NULL && bfd_is_abs_section (sec))
|
||||
|
||||
if (bfd_is_abs_section (sec))
|
||||
indx = 0;
|
||||
else if (sec == NULL || sec->owner == NULL)
|
||||
{
|
||||
|
@ -1681,7 +1681,7 @@ v850_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections[r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
#if 0
|
||||
{
|
||||
char * name;
|
||||
|
@ -1483,7 +1483,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections[r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1737,16 +1737,7 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
long indx;
|
||||
|
||||
if (h == NULL)
|
||||
sec = local_sections[r_symndx];
|
||||
else
|
||||
{
|
||||
BFD_ASSERT (h->root.type == bfd_link_hash_defined
|
||||
|| (h->root.type
|
||||
== bfd_link_hash_defweak));
|
||||
sec = h->root.u.def.section;
|
||||
}
|
||||
if (sec != NULL && bfd_is_abs_section (sec))
|
||||
if (bfd_is_abs_section (sec))
|
||||
indx = 0;
|
||||
else if (sec == NULL || sec->owner == NULL)
|
||||
{
|
||||
|
@ -845,7 +845,7 @@ xstormy16_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections [r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
|
||||
name = bfd_elf_string_from_elf_section
|
||||
(input_bfd, symtab_hdr->sh_link, sym->st_name);
|
||||
|
@ -2004,7 +2004,7 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections[r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -4338,9 +4338,11 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
|
||||
if (r_symndx < symtab_hdr->sh_info)
|
||||
{
|
||||
asection *msec;
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections[r_symndx];
|
||||
value = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
msec = sec;
|
||||
value = _bfd_elf_rela_local_sym (output_bfd, sym, &msec, rel);
|
||||
|
||||
/* If this is a tp-relative relocation against sym 0,
|
||||
this is hackery from relax_section. Force the value to
|
||||
@ -4368,7 +4370,6 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
&& !gotent->reloc_xlated)
|
||||
{
|
||||
struct alpha_elf_got_entry *ent;
|
||||
asection *msec;
|
||||
|
||||
for (ent = gotent; ent; ent = ent->next)
|
||||
{
|
||||
|
@ -1472,7 +1472,7 @@ mmix_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections [r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
|
||||
name = bfd_elf_string_from_elf_section
|
||||
(input_bfd, symtab_hdr->sh_link, sym->st_name);
|
||||
|
@ -7391,7 +7391,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
|
||||
sec = local_sections[r_symndx];
|
||||
sym_name = bfd_elf_local_sym_name (input_bfd, sym);
|
||||
sym_type = ELF64_ST_TYPE (sym->st_info);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
if (elf_section_data (sec) != NULL)
|
||||
{
|
||||
long *opd_sym_adjust;
|
||||
@ -8184,7 +8184,9 @@ ppc64_elf_relocate_section (bfd *output_bfd,
|
||||
relocation = TOCstart;
|
||||
if (r_symndx == 0)
|
||||
relocation += htab->stub_group[input_section->id].toc_off;
|
||||
else if (sec != NULL && !unresolved_reloc)
|
||||
else if (unresolved_reloc)
|
||||
;
|
||||
else if (sec != NULL && sec->id <= htab->top_id)
|
||||
relocation += htab->stub_group[sec->id].toc_off;
|
||||
else
|
||||
unresolved_reloc = TRUE;
|
||||
|
@ -2295,7 +2295,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections[r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1582,7 +1582,7 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
|
||||
}
|
||||
else if (! howto->partial_inplace)
|
||||
{
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
relocation |= ((sym->st_other & STO_SH5_ISA32) != 0);
|
||||
}
|
||||
else if ((sec->flags & SEC_MERGE)
|
||||
|
@ -2070,7 +2070,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections[r_symndx];
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2247,16 +2247,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
|
||||
if (is_plt)
|
||||
sec = splt;
|
||||
else if (h == NULL)
|
||||
sec = local_sections[r_symndx];
|
||||
else
|
||||
{
|
||||
BFD_ASSERT (h->root.type == bfd_link_hash_defined
|
||||
|| (h->root.type
|
||||
== bfd_link_hash_defweak));
|
||||
sec = h->root.u.def.section;
|
||||
}
|
||||
if (sec != NULL && bfd_is_abs_section (sec))
|
||||
|
||||
if (bfd_is_abs_section (sec))
|
||||
indx = 0;
|
||||
else if (sec == NULL || sec->owner == NULL)
|
||||
{
|
||||
|
@ -1821,7 +1821,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
|
||||
sym = local_syms + r_symndx;
|
||||
sec = local_sections[r_symndx];
|
||||
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
|
||||
relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2046,16 +2046,7 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
|
||||
{
|
||||
long sindx;
|
||||
|
||||
if (h == NULL)
|
||||
sec = local_sections[r_symndx];
|
||||
else
|
||||
{
|
||||
BFD_ASSERT (h->root.type == bfd_link_hash_defined
|
||||
|| (h->root.type
|
||||
== bfd_link_hash_defweak));
|
||||
sec = h->root.u.def.section;
|
||||
}
|
||||
if (sec != NULL && bfd_is_abs_section (sec))
|
||||
if (bfd_is_abs_section (sec))
|
||||
sindx = 0;
|
||||
else if (sec == NULL || sec->owner == NULL)
|
||||
{
|
||||
|
@ -3846,9 +3846,11 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
if (r_symndx < symtab_hdr->sh_info)
|
||||
{
|
||||
/* Reloc against local symbol. */
|
||||
asection *msec;
|
||||
sym = local_syms + r_symndx;
|
||||
sym_sec = local_sections[r_symndx];
|
||||
value = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel);
|
||||
msec = sym_sec;
|
||||
value = _bfd_elf_rela_local_sym (output_bfd, sym, &msec, rel);
|
||||
if ((sym_sec->flags & SEC_MERGE)
|
||||
&& ELF_ST_TYPE (sym->st_info) == STT_SECTION
|
||||
&& sym_sec->sec_info_type == ELF_INFO_TYPE_MERGE)
|
||||
@ -3859,7 +3861,6 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
if (loc_h && ! loc_h->sec_merge_done)
|
||||
{
|
||||
struct elfNN_ia64_dyn_sym_info *dynent;
|
||||
asection *msec;
|
||||
|
||||
for (dynent = loc_h->info; dynent; dynent = dynent->next)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user