aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-ip2k.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2006-09-28 13:27:33 +0000
committerAlan Modra <amodra@gmail.com>2006-09-28 13:27:33 +0000
commit07adf1816db141e2cc9c0cd5d9a6aa1a712bc979 (patch)
tree4541ebcbccb2a18eacf746119e3f2b13cfc0359e /bfd/elf32-ip2k.c
parentd8ad03e99d4018acd2e20787cf9b772bf80966f0 (diff)
downloadgdb-07adf1816db141e2cc9c0cd5d9a6aa1a712bc979.zip
gdb-07adf1816db141e2cc9c0cd5d9a6aa1a712bc979.tar.gz
gdb-07adf1816db141e2cc9c0cd5d9a6aa1a712bc979.tar.bz2
* elflink.c (_bfd_elf_gc_mark_hook): New function.
* elf-bfd.h (_bfd_elf_gc_mark_hook): Declare. * elfxx-target.h (elf_backend_gc_mark_hook): Default to above. * elf-m10300.c (mn10300_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook. * elf32-arm.c (elf32_arm_gc_mark_hook): Likewise. * elf32-cris.c (cris_elf_gc_mark_hook): Likewise. * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise. * elf32-i386.c (elf_i386_gc_mark_hook): Likewise. * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise. * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise. * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise. * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise. * elf32-s390.c (elf_s390_gc_mark_hook): Likewise. * elf32-score.c (_bfd_score_elf_gc_mark_hook): Likewise. * elf32-sh.c (sh_elf_gc_mark_hook): Likewise. * elf32-vax.c (elf_vax_gc_mark_hook): Likewise. * elf32-xtensa.c (elf_xtensa_gc_mark_hook): Likewise. * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise. * elf64-s390.c (elf_s390_gc_mark_hook): Likewise. * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise. * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise. * elfxx-sparc.c (_bfd_sparc_elf_gc_mark_hook): Likewise. * elf32-bfin.c (bfin_gc_mark_hook): Likewise. (bfinfdpic_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define for elf32-bfinfdpic. * elf32-d10v.c (elf32_d10v_gc_mark_hook): Use _bfd_elf_gc_mark_hook. (elf32_d10v_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define. * elf32-fr30.c (fr30_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook. (fr30_elf_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define. * elf32-frv.c (elf32_frv_gc_mark_hook): Use _bfd_elf_gc_mark_hook. (elf32_frv_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define. * elf32-iq2000.c (iq2000_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook. (iq2000_elf_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define. * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook. (openrisc_elf_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define. * elf32-v850.c (v850_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook. (v850_elf_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define. * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Use _bfd_elf_gc_mark_hook. (xstormy16_elf_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define. * elf64-sh64.c (sh_elf64_gc_mark_hook): Use _bfd_elf_gc_mark_hook. (sh_elf64_gc_sweep_hook): Delete. (elf_backend_gc_sweep_hook): Don't define. * elf32-avr.c (elf32_avr_gc_mark_hook): Delete. (elf32_avr_gc_sweep_hook): Delete. (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define. * elf32-cr16c.c (elf32_cr16c_gc_mark_hook): Delete. (elf32_cr16c_gc_sweep_hook): Delete. (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define. * elf32-crx.c (elf32_crx_gc_mark_hook): Delete. (elf32_crx_gc_sweep_hook): Delete. (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define. * elf32-h8300.c (elf32_h8_gc_mark_hook): Delete. (elf32_h8_gc_sweep_hook): Delete. (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define. * elf32-ip2k.c (ip2k_elf_gc_mark_hook): Delete. (ip2k_elf_gc_sweep_hook): Delete. (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define. * elf32-m32c.c (m32c_elf_gc_mark_hook, m32c_elf_gc_sweep_hook): Delete. (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define. * elf32-m68hc11.c (elf_backend_gc_mark_hook): Don't define. (elf_backend_gc_sweep_hook): Don't define. * elf32-m68hc12.c (elf_backend_gc_mark_hook): Don't define. (elf_backend_gc_sweep_hook): Don't define. * elf32-m68hc1x.c (elf32_m68hc11_gc_mark_hook): Delete. (elf32_m68hc11_gc_sweep_hook): Delete. * elf32-m68hc1x.h (elf32_m68hc11_gc_mark_hook): Delete. (elf32_m68hc11_gc_sweep_hook): Delete. * elf32-msp430.c (elf32_msp430_gc_mark_hook): Delete. (elf32_msp430_gc_sweep_hook): Delete. (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define. * elf32-mt.c (mt_elf_gc_mark_hook, mt_elf_gc_sweep_hook): Delete. (elf_backend_gc_mark_hook, elf_backend_gc_mark_hook): Don't define.
Diffstat (limited to 'bfd/elf32-ip2k.c')
-rw-r--r--bfd/elf32-ip2k.c51
1 files changed, 1 insertions, 50 deletions
diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c
index 135ef13..fd26188 100644
--- a/bfd/elf32-ip2k.c
+++ b/bfd/elf32-ip2k.c
@@ -1,5 +1,5 @@
/* Ubicom IP2xxx specific support for 32-bit ELF
- Copyright 2000, 2001, 2002, 2003, 2004, 2005
+ Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -1502,53 +1502,6 @@ ip2k_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
return TRUE;
}
-static asection *
-ip2k_elf_gc_mark_hook (asection *sec,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
- Elf_Internal_Rela *rel,
- struct elf_link_hash_entry *h,
- Elf_Internal_Sym *sym)
-{
- if (h != NULL)
- {
- switch (ELF32_R_TYPE (rel->r_info))
- {
- default:
- switch (h->root.type)
- {
- case bfd_link_hash_defined:
- case bfd_link_hash_defweak:
- return h->root.u.def.section;
-
- case bfd_link_hash_common:
- return h->root.u.c.p->section;
-
- default:
- break;
- }
- }
- }
- else
- {
- if (!(elf_bad_symtab (sec->owner)
- && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
- && ! ((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
- && sym->st_shndx != SHN_COMMON))
- return bfd_section_from_elf_index (sec->owner, sym->st_shndx);
- }
- return NULL;
-}
-
-static bfd_boolean
-ip2k_elf_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
- struct bfd_link_info *info ATTRIBUTE_UNUSED,
- asection *sec ATTRIBUTE_UNUSED,
- const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED)
-{
- /* We don't use got and plt entries for ip2k. */
- return TRUE;
-}
-
#define TARGET_BIG_SYM bfd_elf32_ip2k_vec
#define TARGET_BIG_NAME "elf32-ip2k"
@@ -1562,8 +1515,6 @@ ip2k_elf_gc_sweep_hook (bfd *abfd ATTRIBUTE_UNUSED,
#define elf_backend_can_gc_sections 1
#define elf_backend_rela_normal 1
-#define elf_backend_gc_mark_hook ip2k_elf_gc_mark_hook
-#define elf_backend_gc_sweep_hook ip2k_elf_gc_sweep_hook
#define elf_backend_relocate_section ip2k_elf_relocate_section
#define elf_symbol_leading_char '_'