* elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
and rel args. Group input and output args. Wrap to 80 columns. * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c, elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c, elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update RELOC_FOR_GLOBAL_SYMBOL invocation.
This commit is contained in:
parent
13ef8878af
commit
b2a8e7660e
@ -1,3 +1,17 @@
|
||||
2004-03-22 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
|
||||
and rel args. Group input and output args. Wrap to 80 columns.
|
||||
* elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
|
||||
elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
|
||||
elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
|
||||
elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
|
||||
elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
|
||||
elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
|
||||
elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
|
||||
elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
|
||||
RELOC_FOR_GLOBAL_SYMBOL invocation.
|
||||
|
||||
2004-03-20 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
|
||||
|
103
bfd/elf-bfd.h
103
bfd/elf-bfd.h
@ -1719,56 +1719,59 @@ extern bfd_boolean _sh_elf_set_mach_from_flags
|
||||
|
||||
/* This macro is to avoid lots of duplicated code in the body
|
||||
of xxx_relocate_section() in the various elfxx-xxxx.c files. */
|
||||
#define RELOC_FOR_GLOBAL_SYMBOL(h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned) \
|
||||
do \
|
||||
{ \
|
||||
/* It seems this can happen with erroneous or unsupported \
|
||||
input (mixing a.out and elf in an archive, for example.) */ \
|
||||
if (sym_hashes == NULL) \
|
||||
return FALSE; \
|
||||
\
|
||||
h = sym_hashes[r_symndx - symtab_hdr->sh_info]; \
|
||||
\
|
||||
while (h->root.type == bfd_link_hash_indirect \
|
||||
|| h->root.type == bfd_link_hash_warning) \
|
||||
h = (struct elf_link_hash_entry *) h->root.u.i.link; \
|
||||
\
|
||||
warned = FALSE; \
|
||||
unresolved_reloc = FALSE; \
|
||||
relocation = 0; \
|
||||
if (h->root.type == bfd_link_hash_defined \
|
||||
|| h->root.type == bfd_link_hash_defweak) \
|
||||
{ \
|
||||
sec = h->root.u.def.section; \
|
||||
if (sec == NULL \
|
||||
|| sec->output_section == NULL) \
|
||||
/* Set a flag that will be cleared later if we find a \
|
||||
relocation value for this symbol. output_section \
|
||||
is typically NULL for symbols satisfied by a shared \
|
||||
library. */ \
|
||||
unresolved_reloc = TRUE; \
|
||||
else \
|
||||
relocation = (h->root.u.def.value \
|
||||
+ sec->output_section->vma \
|
||||
+ sec->output_offset); \
|
||||
} \
|
||||
else if (h->root.type == bfd_link_hash_undefweak) \
|
||||
; \
|
||||
else if (info->unresolved_syms_in_objects == RM_IGNORE \
|
||||
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) \
|
||||
; \
|
||||
else \
|
||||
{ \
|
||||
if (! info->callbacks->undefined_symbol \
|
||||
(info, h->root.root.string, input_bfd, \
|
||||
input_section, rel->r_offset, \
|
||||
(info->unresolved_syms_in_objects == RM_GENERATE_ERROR \
|
||||
|| ELF_ST_VISIBILITY (h->other)) \
|
||||
)) \
|
||||
return FALSE; \
|
||||
warned = TRUE; \
|
||||
} \
|
||||
} \
|
||||
#define RELOC_FOR_GLOBAL_SYMBOL(info, input_bfd, input_section, rel, \
|
||||
r_symndx, symtab_hdr, sym_hashes, \
|
||||
h, sec, relocation, \
|
||||
unresolved_reloc, warned) \
|
||||
do \
|
||||
{ \
|
||||
/* It seems this can happen with erroneous or unsupported \
|
||||
input (mixing a.out and elf in an archive, for example.) */ \
|
||||
if (sym_hashes == NULL) \
|
||||
return FALSE; \
|
||||
\
|
||||
h = sym_hashes[r_symndx - symtab_hdr->sh_info]; \
|
||||
\
|
||||
while (h->root.type == bfd_link_hash_indirect \
|
||||
|| h->root.type == bfd_link_hash_warning) \
|
||||
h = (struct elf_link_hash_entry *) h->root.u.i.link; \
|
||||
\
|
||||
warned = FALSE; \
|
||||
unresolved_reloc = FALSE; \
|
||||
relocation = 0; \
|
||||
if (h->root.type == bfd_link_hash_defined \
|
||||
|| h->root.type == bfd_link_hash_defweak) \
|
||||
{ \
|
||||
sec = h->root.u.def.section; \
|
||||
if (sec == NULL \
|
||||
|| sec->output_section == NULL) \
|
||||
/* Set a flag that will be cleared later if we find a \
|
||||
relocation value for this symbol. output_section \
|
||||
is typically NULL for symbols satisfied by a shared \
|
||||
library. */ \
|
||||
unresolved_reloc = TRUE; \
|
||||
else \
|
||||
relocation = (h->root.u.def.value \
|
||||
+ sec->output_section->vma \
|
||||
+ sec->output_offset); \
|
||||
} \
|
||||
else if (h->root.type == bfd_link_hash_undefweak) \
|
||||
; \
|
||||
else if (info->unresolved_syms_in_objects == RM_IGNORE \
|
||||
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) \
|
||||
; \
|
||||
else \
|
||||
{ \
|
||||
if (! info->callbacks->undefined_symbol \
|
||||
(info, h->root.root.string, input_bfd, \
|
||||
input_section, rel->r_offset, \
|
||||
(info->unresolved_syms_in_objects == RM_GENERATE_ERROR \
|
||||
|| ELF_ST_VISIBILITY (h->other)) \
|
||||
)) \
|
||||
return FALSE; \
|
||||
warned = TRUE; \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#endif /* _LIBELF_H_ */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Matsushita 10200 specific support for 32-bit ELF
|
||||
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
||||
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -379,9 +379,10 @@ mn10200_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
bfd_boolean unresolved_reloc, warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
|
||||
relocation, sec, unresolved_reloc,
|
||||
info, warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
|
||||
r = mn10200_elf_final_link_relocate (howto, input_bfd, output_bfd,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Matsushita 10300 specific support for 32-bit ELF
|
||||
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
||||
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -1537,15 +1537,14 @@ mn10300_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
asection **local_sections;
|
||||
{
|
||||
Elf_Internal_Shdr *symtab_hdr;
|
||||
struct elf32_mn10300_link_hash_entry **sym_hashes;
|
||||
struct elf_link_hash_entry **sym_hashes;
|
||||
Elf_Internal_Rela *rel, *relend;
|
||||
|
||||
if (info->relocatable)
|
||||
return TRUE;
|
||||
|
||||
symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
|
||||
sym_hashes = (struct elf32_mn10300_link_hash_entry **)
|
||||
(elf_sym_hashes (input_bfd));
|
||||
sym_hashes = elf_sym_hashes (input_bfd);
|
||||
|
||||
rel = relocs;
|
||||
relend = relocs + input_section->reloc_count;
|
||||
@ -1584,10 +1583,10 @@ mn10300_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
bfd_boolean warned;
|
||||
struct elf_link_hash_entry *hh;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (hh, (struct elf_link_hash_entry *) sym_hashes,
|
||||
r_symndx, symtab_hdr, relocation,
|
||||
sec, unresolved_reloc, info,
|
||||
warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
hh, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
|
||||
h = (struct elf32_mn10300_link_hash_entry *) hh;
|
||||
|
||||
|
@ -2125,10 +2125,10 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
bfd_boolean warned;
|
||||
bfd_boolean unresolved_reloc;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
|
||||
symtab_hdr, relocation,
|
||||
sec, unresolved_reloc, info,
|
||||
warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
|
||||
if (unresolved_reloc || relocation != 0)
|
||||
{
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* AVR-specific support for 32-bit ELF
|
||||
Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Denis Chertykov <denisc@overta.ru>
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -760,9 +761,10 @@ elf32_avr_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
bfd_boolean unresolved_reloc, warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
|
||||
relocation, sec, unresolved_reloc,
|
||||
info, warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
|
||||
r = avr_final_link_relocate (howto, input_bfd, input_section,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* CRIS-specific support for 32-bit ELF.
|
||||
Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
Contributed by Axis Communications AB.
|
||||
Written by Hans-Peter Nilsson, based on elf32-fr30.c
|
||||
PIC and shlib bits based primarily on elf32-m68k.c and elf32-i386.c.
|
||||
@ -859,7 +859,10 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
bfd_boolean warned;
|
||||
bfd_boolean unresolved_reloc;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
|
||||
if (unresolved_reloc
|
||||
/* Perhaps we should detect the cases that
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* D10V-specific support for 32-bit ELF
|
||||
Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003
|
||||
Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Martin Hunt (hunt@cygnus.com).
|
||||
|
||||
@ -519,9 +519,10 @@ elf32_d10v_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
bfd_boolean unresolved_reloc, warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
|
||||
relocation, sec, unresolved_reloc,
|
||||
info, warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
|
||||
if (h != NULL)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* FR30-specific support for 32-bit ELF.
|
||||
Copyright 1998, 1999, 2000, 2001, 2002, 2003
|
||||
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -568,9 +568,10 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
bfd_boolean unresolved_reloc, warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
|
||||
relocation, sec, unresolved_reloc,
|
||||
info, warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
|
||||
r = fr30_final_link_relocate (howto, input_bfd, input_section,
|
||||
|
@ -441,9 +441,10 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
|
||||
{
|
||||
bfd_boolean unresolved_reloc, warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
|
||||
relocation, sec, unresolved_reloc,
|
||||
info, warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
|
||||
r = elf32_h8_final_link_relocate (r_type, input_bfd, output_bfd,
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* BFD back-end for HP PA-RISC ELF files.
|
||||
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001,
|
||||
2002, 2003 Free Software Foundation, Inc.
|
||||
2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
Original code by
|
||||
Center for Software Science
|
||||
@ -3432,10 +3432,12 @@ elf32_hppa_relocate_section (bfd *output_bfd,
|
||||
{
|
||||
struct elf_link_hash_entry *hh;
|
||||
bfd_boolean unresolved_reloc;
|
||||
struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (hh, elf_sym_hashes (input_bfd), r_symndx, symtab_hdr,
|
||||
relocation, sym_sec, unresolved_reloc, info,
|
||||
warned_undef);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
hh, sym_sec, relocation,
|
||||
unresolved_reloc, warned_undef);
|
||||
|
||||
if (relocation == 0
|
||||
&& hh->root.type != bfd_link_hash_defined
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Intel 80386/80486-specific support for 32-bit ELF
|
||||
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -2179,7 +2179,10 @@ elf_i386_relocate_section (bfd *output_bfd,
|
||||
{
|
||||
bfd_boolean warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
|
||||
switch (r_type)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Intel i860 specific support for 32-bit ELF.
|
||||
Copyright 1993, 1995, 1999, 2000, 2001, 2002, 2003
|
||||
Copyright 1993, 1995, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Full i860 support contributed by Jason Eckhardt <jle@cygnus.com>.
|
||||
@ -1114,9 +1114,10 @@ elf32_i860_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
|
||||
{
|
||||
bfd_boolean unresolved_reloc, warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
|
||||
relocation, sec, unresolved_reloc,
|
||||
info, warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
|
||||
switch (r_type)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Ubicom IP2xxx specific support for 32-bit ELF
|
||||
Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -1535,7 +1535,10 @@ ip2k_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
bfd_boolean warned;
|
||||
bfd_boolean unresolved_reloc;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
|
||||
name = h->root.root.string;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* IQ2000-specific support for 32-bit ELF.
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -621,9 +621,10 @@ iq2000_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
bfd_boolean unresolved_reloc;
|
||||
bfd_boolean warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
|
||||
symtab_hdr, relocation,
|
||||
sec, unresolved_reloc, info, warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
|
||||
name = h->root.root.string;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* Motorola 68HC11/HC12-specific support for 32-bit ELF
|
||||
Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Stephane Carrez (stcarrez@nerim.fr)
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -951,9 +952,9 @@ m68hc11_get_relocation_value (bfd *input_bfd, struct bfd_link_info *info,
|
||||
{
|
||||
bfd_boolean unresolved_reloc, warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
|
||||
*relocation, sec, unresolved_reloc,
|
||||
info, warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, *relocation, unresolved_reloc, warned);
|
||||
|
||||
*is_far = (h && (h->other & STO_M68HC12_FAR));
|
||||
stub_name = h->root.root.string;
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* Motorola 68k series support for 32-bit ELF
|
||||
Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
||||
Free Software Foundation, Inc.
|
||||
Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -1410,7 +1410,10 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
bfd_boolean warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr, relocation, sec, unresolved_reloc, info, warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
|
||||
switch (r_type)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Motorola MCore specific support for 32-bit ELF
|
||||
Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003
|
||||
Copyright 1994, 1995, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -474,9 +474,10 @@ mcore_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
bfd_boolean unresolved_reloc, warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
|
||||
relocation, sec, unresolved_reloc,
|
||||
info, warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
|
||||
switch (r_type)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* MSP430-specific support for 32-bit ELF
|
||||
Copyright (C) 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
Contributed by Dmitry Diky <diwil@mail.ru>
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -459,9 +459,10 @@ elf32_msp430_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
bfd_boolean unresolved_reloc, warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
|
||||
relocation, sec, unresolved_reloc,
|
||||
info, warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
|
||||
r = msp430_final_link_relocate (howto, input_bfd, input_section,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* OpenRISC-specific support for 32-bit ELF.
|
||||
Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
Contributed by Johan Rydberg, jrydberg@opencores.org
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -385,10 +385,10 @@ openrisc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
bfd_boolean unresolved_reloc, warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
|
||||
relocation, sec, unresolved_reloc,
|
||||
info, warned);
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
|
||||
r = openrisc_final_link_relocate (howto, input_bfd, input_section,
|
||||
|
@ -4701,10 +4701,10 @@ ppc_elf_relocate_section (bfd *output_bfd,
|
||||
}
|
||||
else
|
||||
{
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
|
||||
symtab_hdr, relocation, sec,
|
||||
unresolved_reloc, info,
|
||||
warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
|
||||
sym_name = h->root.root.string;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* IBM S/390-specific support for 32-bit ELF
|
||||
Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
Contributed by Carl B. Pedersen and Martin Schwidefsky.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -2322,10 +2322,10 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
bfd_boolean warned ATTRIBUTE_UNUSED;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
|
||||
symtab_hdr, relocation, sec,
|
||||
unresolved_reloc, info,
|
||||
warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
|
||||
switch (r_type)
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* SPARC-specific support for 32-bit ELF
|
||||
Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
2003 Free Software Foundation, Inc.
|
||||
2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -2215,10 +2215,10 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
bfd_boolean warned ATTRIBUTE_UNUSED;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
|
||||
symtab_hdr, relocation, sec,
|
||||
unresolved_reloc, info,
|
||||
warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
|
||||
switch (r_type)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* V850-specific support for 32-bit ELF
|
||||
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
||||
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -1698,9 +1698,10 @@ v850_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
bfd_boolean unresolved_reloc, warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
|
||||
relocation, sec, unresolved_reloc,
|
||||
info, warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
|
||||
/* FIXME: We should use the addend, but the COFF relocations don't. */
|
||||
|
@ -1,6 +1,6 @@
|
||||
/* VAX series support for 32-bit ELF
|
||||
Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
||||
Free Software Foundation, Inc.
|
||||
Copyright 1993, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2004 Free Software Foundation, Inc.
|
||||
Contributed by Matt Thomas <matt@3am-software.com>.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -1489,10 +1489,10 @@ elf_vax_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
bfd_boolean unresolved_reloc;
|
||||
bfd_boolean warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
|
||||
symtab_hdr, relocation, sec,
|
||||
unresolved_reloc, info,
|
||||
warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
|
||||
if ((h->root.type == bfd_link_hash_defined
|
||||
|| h->root.type == bfd_link_hash_defweak)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* XSTORMY16-specific support for 32-bit ELF.
|
||||
Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -855,9 +855,10 @@ xstormy16_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
bfd_boolean unresolved_reloc, warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
|
||||
relocation, sec, unresolved_reloc,
|
||||
info, warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
|
||||
switch (ELF32_R_TYPE (rel->r_info))
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Xtensa-specific support for 32-bit ELF.
|
||||
Copyright 2003 Free Software Foundation, Inc.
|
||||
Copyright 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
|
||||
@ -1993,10 +1993,10 @@ elf_xtensa_relocate_section (output_bfd, info, input_bfd,
|
||||
}
|
||||
else
|
||||
{
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
|
||||
symtab_hdr, relocation, sec,
|
||||
unresolved_reloc, info,
|
||||
warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
|
||||
if (relocation == 0
|
||||
&& !unresolved_reloc
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Alpha specific support for 64-bit ELF
|
||||
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
|
||||
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by Richard Henderson <rth@tamu.edu>.
|
||||
|
||||
@ -4399,12 +4399,12 @@ elf64_alpha_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
bfd_boolean warned;
|
||||
bfd_boolean unresolved_reloc;
|
||||
struct elf_link_hash_entry *hh;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (hh,
|
||||
(struct elf_link_hash_entry *) alpha_elf_sym_hashes (input_bfd),
|
||||
r_symndx, symtab_hdr, value,
|
||||
sec, unresolved_reloc, info,
|
||||
warned);
|
||||
struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
hh, sec, value,
|
||||
unresolved_reloc, warned);
|
||||
|
||||
if (warned)
|
||||
continue;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* MMIX-specific support for 64-bit ELF.
|
||||
Copyright 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
Contributed by Hans-Peter Nilsson <hp@bitrange.com>
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -1482,9 +1482,10 @@ mmix_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
bfd_boolean unresolved_reloc;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx, symtab_hdr,
|
||||
relocation, sec, unresolved_reloc,
|
||||
info, undefined_signalled);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, undefined_signalled);
|
||||
}
|
||||
|
||||
r = mmix_final_link_relocate (howto, input_section,
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* PowerPC64-specific support for 64-bit ELF.
|
||||
Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
Written by Linus Nordberg, Swox AB <info@swox.com>,
|
||||
based on elf32-ppc.c by Ian Lance Taylor.
|
||||
Largely rewritten by Alan Modra <amodra@bigpond.net.au>
|
||||
@ -7480,10 +7481,10 @@ ppc64_elf_relocate_section (bfd *output_bfd,
|
||||
}
|
||||
else
|
||||
{
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
|
||||
symtab_hdr, relocation, sec,
|
||||
unresolved_reloc, info,
|
||||
warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
sym_name = h->root.root.string;
|
||||
sym_type = h->type;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* IBM S/390-specific support for 64-bit ELF
|
||||
Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
Contributed Martin Schwidefsky (schwidefsky@de.ibm.com).
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -2292,10 +2292,10 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
bfd_boolean warned ATTRIBUTE_UNUSED;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
|
||||
symtab_hdr, relocation, sec,
|
||||
unresolved_reloc, info,
|
||||
warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
|
||||
switch (r_type)
|
||||
|
@ -2079,10 +2079,10 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
bfd_boolean warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
|
||||
symtab_hdr, relocation, sec,
|
||||
unresolved_reloc, info,
|
||||
warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
if (warned)
|
||||
{
|
||||
/* To avoid generating warning messages about truncated
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* X86-64 specific support for 64-bit ELF
|
||||
Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
Contributed by Jan Hubicka <jh@suse.cz>.
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -1820,10 +1820,10 @@ elf64_x86_64_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
|
||||
{
|
||||
bfd_boolean warned;
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, sym_hashes, r_symndx,
|
||||
symtab_hdr, relocation, sec,
|
||||
unresolved_reloc, info,
|
||||
warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sec, relocation,
|
||||
unresolved_reloc, warned);
|
||||
}
|
||||
/* When generating a shared object, the relocations handled here are
|
||||
copied into the output file to be resolved at run time. */
|
||||
|
@ -1,5 +1,6 @@
|
||||
/* IA-64 support for 64-bit ELF
|
||||
Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
|
||||
This file is part of BFD, the Binary File Descriptor library.
|
||||
@ -3974,12 +3975,12 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||
{
|
||||
bfd_boolean unresolved_reloc;
|
||||
bfd_boolean warned;
|
||||
struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd);
|
||||
|
||||
RELOC_FOR_GLOBAL_SYMBOL (h, elf_sym_hashes (input_bfd),
|
||||
r_symndx,
|
||||
symtab_hdr, value, sym_sec,
|
||||
unresolved_reloc, info,
|
||||
warned);
|
||||
RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
|
||||
r_symndx, symtab_hdr, sym_hashes,
|
||||
h, sym_sec, value,
|
||||
unresolved_reloc, warned);
|
||||
|
||||
if (h->root.type == bfd_link_hash_undefweak)
|
||||
undef_weak_ref = TRUE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user