+2008-01-11 Tristan Gingold <gingold@adacore.com>
+ Eric Botcazou <ebotcazou@adacore.com>
+
+ * elf32-ppc.c (ppc_elf_gc_sweep_hook): Exit early if generating a
+ relocatable.
+ * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
+ * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
+ * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
+ * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
+ * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
+ * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
+ * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
+ * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
+ * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
+ * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
+ * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
+ * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Likewise.
+ * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
+ * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
+ * elflink.c (bfd_elf_gc_sections): Do not punt on relocatable output
+ or executable output with relocations.
+
2008-01-09 Nick Clifton <nickc@redhat.com>
PR gas/5552
const Elf_Internal_Rela *rel, *relend;
struct elf32_arm_link_hash_table * globals;
+ if (info->relocatable)
+ return TRUE;
+
globals = elf32_arm_hash_table (info);
elf_section_data (sec)->local_dynrel = NULL;
asection *sgot;
asection *srelgot;
+ if (info->relocatable)
+ return TRUE;
+
dynobj = elf_hash_table (info)->dynobj;
if (dynobj == NULL)
return TRUE;
bfd_signed_vma *local_plt_refcounts;
const Elf_Internal_Rela *rela, *relend;
+ if (info->relocatable)
+ return TRUE;
+
elf_section_data (sec)->local_dynrel = NULL;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
bfd_signed_vma *local_got_refcounts;
const Elf_Internal_Rela *rel, *relend;
+ if (info->relocatable)
+ return TRUE;
+
elf_section_data (sec)->local_dynrel = NULL;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
bfd_signed_vma *local_got_refcounts;
const Elf_Internal_Rela *rel, *relend;
+ if (info->relocatable)
+ return TRUE;
+
elf_section_data (sec)->local_dynrel = NULL;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
asection *sgot;
asection *srelgot;
+ if (info->relocatable)
+ return TRUE;
+
dynobj = elf_hash_table (info)->dynobj;
if (dynobj == NULL)
return TRUE;
const Elf_Internal_Rela *rel, *relend;
asection *got2;
+ if (info->relocatable)
+ return TRUE;
+
if ((sec->flags & SEC_ALLOC) == 0)
return TRUE;
bfd_signed_vma *local_got_refcounts;
const Elf_Internal_Rela *rel, *relend;
+ if (info->relocatable)
+ return TRUE;
+
elf_section_data (sec)->local_dynrel = NULL;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
bfd_signed_vma *local_got_refcounts;
const Elf_Internal_Rela *rel, *relend;
+ if (info->relocatable)
+ return TRUE;
+
elf_section_data (sec)->local_dynrel = NULL;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
const Elf_Internal_Rela *rel, *relend;
bfd *dynobj;
+ if (info->relocatable)
+ return TRUE;
+
dynobj = elf_hash_table (info)->dynobj;
if (dynobj == NULL)
return TRUE;
bfd_signed_vma *local_got_refcounts;
const Elf_Internal_Rela *rel, *relend;
+ if (info->relocatable)
+ return TRUE;
+
if ((sec->flags & SEC_ALLOC) == 0)
return TRUE;
struct got_entry **local_got_ents;
const Elf_Internal_Rela *rel, *relend;
+ if (info->relocatable)
+ return TRUE;
+
if ((sec->flags & SEC_ALLOC) == 0)
return TRUE;
bfd_signed_vma *local_got_refcounts;
const Elf_Internal_Rela *rel, *relend;
+ if (info->relocatable)
+ return TRUE;
+
elf_section_data (sec)->local_dynrel = NULL;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
bfd_signed_vma *local_got_refcounts;
const Elf_Internal_Rela *rel, *relend;
+ if (info->relocatable)
+ return TRUE;
+
elf_section_data (sec)->local_dynrel = NULL;
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
const struct elf_backend_data *bed = get_elf_backend_data (abfd);
if (!bed->can_gc_sections
- || info->relocatable
- || info->emitrelocations
|| !is_elf_hash_table (info->hash))
{
(*_bfd_error_handler)(_("Warning: gc-sections option ignored"));
unsigned long r_symndx;
struct elf_link_hash_entry *h;
+ if (info->relocatable)
+ return TRUE;
+
symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
sym_hashes = elf_sym_hashes (abfd);
local_got_refcounts = elf_local_got_refcounts (abfd);
bfd_signed_vma *local_got_refcounts;
const Elf_Internal_Rela *rel, *relend;
+ if (info->relocatable)
+ return TRUE;
+
elf_section_data (sec)->local_dynrel = NULL;
htab = _bfd_sparc_elf_hash_table (info);