diff options
author | Alan Modra <amodra@gmail.com> | 2004-03-22 02:28:17 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2004-03-22 02:28:17 +0000 |
commit | b2a8e7660e6cb65f7370fd55ae0ece7bd78a99cb (patch) | |
tree | 32e06c038fbe4305c9209702f5c8fc046dc7123e /bfd/elf-bfd.h | |
parent | 13ef8878af38864b928a82f3ba245ea912c8f6e7 (diff) | |
download | gdb-b2a8e7660e6cb65f7370fd55ae0ece7bd78a99cb.zip gdb-b2a8e7660e6cb65f7370fd55ae0ece7bd78a99cb.tar.gz gdb-b2a8e7660e6cb65f7370fd55ae0ece7bd78a99cb.tar.bz2 |
* 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.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 103 |
1 files changed, 53 insertions, 50 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index a5e52ab..cd51e32 100644 --- a/bfd/elf-bfd.h +++ b/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_ */ |