]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR ld/13991
authorNick Clifton <nickc@redhat.com>
Fri, 11 May 2012 12:24:39 +0000 (12:24 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 11 May 2012 12:24:39 +0000 (12:24 +0000)
    bfd/
    * bfd/elf-bfd.h (_bfd_elf_link_just_syms): Define as
    _bfd_generic_link_just_syms.
    * bfd/elflink.c (_bfd_elf_link_just_syms): Delete.
    * bfd/linker.c (_bfd_generic_link_just_syms): Set sec_info_type.

    * bfd/bfd-in.h (discarded_section): Renamed from elf_discarded_section.
    * bfd/section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS,
    SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME,
    SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE.
    * bfd/elf-eh-frame.c, * bfd/elf-m10200.c, * bfd/elf-m10300.c,
    * bfd/elf.c, * bfd/elf32-arm.c, * bfd/elf32-avr.c, * bfd/elf32-bfin.c,
    * bfd/elf32-cr16.c, * bfd/elf32-cr16c.c, * bfd/elf32-cris.c,
    * bfd/elf32-crx.c, * bfd/elf32-d10v.c, * bfd/elf32-epiphany.c,
    * bfd/elf32-fr30.c, * bfd/elf32-frv.c, * bfd/elf32-h8300.c,
    * bfd/elf32-hppa.c, * bfd/elf32-i370.c, * bfd/elf32-i386.c,
    * bfd/elf32-i860.c, * bfd/elf32-ip2k.c, * bfd/elf32-iq2000.c,
    * bfd/elf32-lm32.c, * bfd/elf32-m32c.c, * bfd/elf32-m32r.c,
    * bfd/elf32-m68hc1x.c, * bfd/elf32-m68k.c, * bfd/elf32-mcore.c,
    * bfd/elf32-mep.c, * bfd/elf32-moxie.c, * bfd/elf32-msp430.c,
    * bfd/elf32-mt.c, * bfd/elf32-openrisc.c, * bfd/elf32-ppc.c,
    * bfd/elf32-rl78.c, * bfd/elf32-rx.c, * bfd/elf32-s390.c,
    * bfd/elf32-score.c, * bfd/elf32-score7.c, * bfd/elf32-sh.c,
    * bfd/elf32-spu.c, * bfd/elf32-tic6x.c, * bfd/elf32-tilepro.c,
    * bfd/elf32-v850.c, * bfd/elf32-vax.c, * bfd/elf32-xc16x.c,
    * bfd/elf32-xstormy16.c, * bfd/elf32-xtensa.c, * bfd/elf64-alpha.c,
    * bfd/elf64-hppa.c, * bfd/elf64-ia64-vms.c, * bfd/elf64-mmix.c,
    * bfd/elf64-ppc.c, * bfd/elf64-s390.c, * bfd/elf64-sh64.c,
    * bfd/elf64-x86-64.c, * bfd/elflink.c, * bfd/elfnn-ia64.c,
    * bfd/elfxx-mips.c, * bfd/elfxx-sparc.c, * bfd/elfxx-tilegx.c,
    * bfd/reloc.c: Update all references.
    * bfd/bfd-in2.h: Regenerate.
    ld/
    * ld/ldlang.c (size_input_section): Use sec_info_type rather than
    usrdata->flags.just_syms.
    * ld/ldwrite.c (build_link_order): Likewise.
    * ld/emultempl/hppaelf.em (build_section_lists): Likewise.
    * ld/emultempl/ppc64elf.em (build_toc_list): Likewise.
    * ld/emultempl/armelf.em (build_section_lists): Likewise.
    (after_allocation): Update for renamed sec_info_type value.
    * ld/emultempl/tic6xdsbt.em: Likewise.

72 files changed:
bfd/ChangeLog
bfd/bfd-in.h
bfd/bfd-in2.h
bfd/elf-bfd.h
bfd/elf-eh-frame.c
bfd/elf-m10200.c
bfd/elf-m10300.c
bfd/elf.c
bfd/elf32-arm.c
bfd/elf32-avr.c
bfd/elf32-bfin.c
bfd/elf32-cr16.c
bfd/elf32-cr16c.c
bfd/elf32-cris.c
bfd/elf32-crx.c
bfd/elf32-d10v.c
bfd/elf32-fr30.c
bfd/elf32-frv.c
bfd/elf32-h8300.c
bfd/elf32-hppa.c
bfd/elf32-i370.c
bfd/elf32-i386.c
bfd/elf32-i860.c
bfd/elf32-ip2k.c
bfd/elf32-iq2000.c
bfd/elf32-lm32.c
bfd/elf32-m32c.c
bfd/elf32-m32r.c
bfd/elf32-m68hc1x.c
bfd/elf32-m68k.c
bfd/elf32-mcore.c
bfd/elf32-mep.c
bfd/elf32-moxie.c
bfd/elf32-msp430.c
bfd/elf32-mt.c
bfd/elf32-openrisc.c
bfd/elf32-ppc.c
bfd/elf32-rx.c
bfd/elf32-s390.c
bfd/elf32-score.c
bfd/elf32-score7.c
bfd/elf32-sh.c
bfd/elf32-spu.c
bfd/elf32-tic6x.c
bfd/elf32-tilepro.c
bfd/elf32-v850.c
bfd/elf32-vax.c
bfd/elf32-xc16x.c
bfd/elf32-xstormy16.c
bfd/elf32-xtensa.c
bfd/elf64-alpha.c
bfd/elf64-hppa.c
bfd/elf64-mmix.c
bfd/elf64-ppc.c
bfd/elf64-s390.c
bfd/elf64-sh64.c
bfd/elf64-x86-64.c
bfd/elflink.c
bfd/elfnn-ia64.c
bfd/elfxx-mips.c
bfd/elfxx-sparc.c
bfd/elfxx-tilegx.c
bfd/linker.c
bfd/reloc.c
bfd/section.c
ld/ChangeLog
ld/emultempl/armelf.em
ld/emultempl/hppaelf.em
ld/emultempl/ppc64elf.em
ld/emultempl/tic6xdsbt.em
ld/ldlang.c
ld/ldwrite.c

index 4ec85245eecf426f87f8dc7e88655ffa6a309b56..a568f1b33eb77692a7fc3cc1cbec8dd8c13f7eb3 100644 (file)
@@ -1,3 +1,41 @@
+2012-05-11  Ralf Corsépius  <ralf.corsepius@rtems.org>
+
+       Backport from mainline:
+
+       2012-04-24  Alan Modra  <amodra@gmail.com>
+       PR ld/13991
+       * bfd/elf-bfd.h (_bfd_elf_link_just_syms): Define as
+       _bfd_generic_link_just_syms.
+       * bfd/elflink.c (_bfd_elf_link_just_syms): Delete.
+       * bfd/linker.c (_bfd_generic_link_just_syms): Set sec_info_type.
+
+       * bfd/bfd-in.h (discarded_section): Renamed from elf_discarded_section.
+       * bfd/section.c (SEC_INFO_TYPE_NONE, SEC_INFO_TYPE_STABS,
+       SEC_INFO_TYPE_MERGE, SEC_INFO_TYPE_EH_FRAME,
+       SEC_INFO_TYPE_JUST_SYMS): Renamed from corresponding ELF_INFO_TYPE.
+       * bfd/elf-eh-frame.c, * bfd/elf-m10200.c, * bfd/elf-m10300.c,
+       * bfd/elf.c, * bfd/elf32-arm.c, * bfd/elf32-avr.c, * bfd/elf32-bfin.c,
+       * bfd/elf32-cr16.c, * bfd/elf32-cr16c.c, * bfd/elf32-cris.c,
+       * bfd/elf32-crx.c, * bfd/elf32-d10v.c, * bfd/elf32-epiphany.c,
+       * bfd/elf32-fr30.c, * bfd/elf32-frv.c, * bfd/elf32-h8300.c,
+       * bfd/elf32-hppa.c, * bfd/elf32-i370.c, * bfd/elf32-i386.c,
+       * bfd/elf32-i860.c, * bfd/elf32-ip2k.c, * bfd/elf32-iq2000.c,
+       * bfd/elf32-lm32.c, * bfd/elf32-m32c.c, * bfd/elf32-m32r.c,
+       * bfd/elf32-m68hc1x.c, * bfd/elf32-m68k.c, * bfd/elf32-mcore.c,
+       * bfd/elf32-mep.c, * bfd/elf32-moxie.c, * bfd/elf32-msp430.c,
+       * bfd/elf32-mt.c, * bfd/elf32-openrisc.c, * bfd/elf32-ppc.c,
+       * bfd/elf32-rl78.c, * bfd/elf32-rx.c, * bfd/elf32-s390.c,
+       * bfd/elf32-score.c, * bfd/elf32-score7.c, * bfd/elf32-sh.c,
+       * bfd/elf32-spu.c, * bfd/elf32-tic6x.c, * bfd/elf32-tilepro.c,
+       * bfd/elf32-v850.c, * bfd/elf32-vax.c, * bfd/elf32-xc16x.c,
+       * bfd/elf32-xstormy16.c, * bfd/elf32-xtensa.c, * bfd/elf64-alpha.c,
+       * bfd/elf64-hppa.c, * bfd/elf64-ia64-vms.c, * bfd/elf64-mmix.c,
+       * bfd/elf64-ppc.c, * bfd/elf64-s390.c, * bfd/elf64-sh64.c,
+       * bfd/elf64-x86-64.c, * bfd/elflink.c, * bfd/elfnn-ia64.c,
+       * bfd/elfxx-mips.c, * bfd/elfxx-sparc.c, * bfd/elfxx-tilegx.c,
+       * bfd/reloc.c: Update all references.
+       * bfd/bfd-in2.h: Regenerate.
+
 2012-04-20  Nick Clifton  <nickc@redhat.com>
 
        Import this patch from the mainline:
index a477b49e393876f60af26d1e4feeafd4376097e9..7c5298af0d9fe59440a9938fa1852c2d4658543e 100644 (file)
@@ -295,11 +295,11 @@ typedef struct bfd_section *sec_ptr;
     ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd))
 
 /* Return TRUE if input section SEC has been discarded.  */
-#define elf_discarded_section(sec)                             \
+#define discarded_section(sec)                                 \
   (!bfd_is_abs_section (sec)                                   \
    && bfd_is_abs_section ((sec)->output_section)               \
-   && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE              \
-   && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
+   && (sec)->sec_info_type != SEC_INFO_TYPE_MERGE              \
+   && (sec)->sec_info_type != SEC_INFO_TYPE_JUST_SYMS)
 
 /* Forward define.  */
 struct stat;
index cd90740269a8faa082473f5c15957206d8887947..34f96281cb2d678ee4e432fa418dc5baf731c3f0 100644 (file)
@@ -302,11 +302,11 @@ typedef struct bfd_section *sec_ptr;
     ? (sec)->rawsize : (sec)->size) / bfd_octets_per_byte (bfd))
 
 /* Return TRUE if input section SEC has been discarded.  */
-#define elf_discarded_section(sec)                             \
+#define discarded_section(sec)                                 \
   (!bfd_is_abs_section (sec)                                   \
    && bfd_is_abs_section ((sec)->output_section)               \
-   && (sec)->sec_info_type != ELF_INFO_TYPE_MERGE              \
-   && (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
+   && (sec)->sec_info_type != SEC_INFO_TYPE_MERGE              \
+   && (sec)->sec_info_type != SEC_INFO_TYPE_JUST_SYMS)
 
 /* Forward define.  */
 struct stat;
@@ -1384,11 +1384,11 @@ typedef struct bfd_section
 
   /* Type of sec_info information.  */
   unsigned int sec_info_type:3;
-#define ELF_INFO_TYPE_NONE      0
-#define ELF_INFO_TYPE_STABS     1
-#define ELF_INFO_TYPE_MERGE     2
-#define ELF_INFO_TYPE_EH_FRAME  3
-#define ELF_INFO_TYPE_JUST_SYMS 4
+#define SEC_INFO_TYPE_NONE      0
+#define SEC_INFO_TYPE_STABS     1
+#define SEC_INFO_TYPE_MERGE     2
+#define SEC_INFO_TYPE_EH_FRAME  3
+#define SEC_INFO_TYPE_JUST_SYMS 4
 
   /* Nonzero if this section uses RELA relocations, rather than REL.  */
   unsigned int use_rela_p:1;
index d6e2ab29ce4d8282a1d719c81eea3e46ce201acd..2cfe2bad7f1cb406059b926566cf9fa84c90c0a4 100644 (file)
@@ -1807,8 +1807,7 @@ extern void bfd_elf_set_group_contents
   (bfd *, asection *, void *);
 extern asection *_bfd_elf_check_kept_section
   (asection *, struct bfd_link_info *);
-extern void _bfd_elf_link_just_syms
-  (asection *, struct bfd_link_info *);
+#define _bfd_elf_link_just_syms _bfd_generic_link_just_syms
 extern void _bfd_elf_copy_link_hash_symbol_type
   (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *);
 extern bfd_boolean _bfd_elf_size_group_sections
index 54142b295266a6f1d750917b1eabc0c969d042ed..7b5cf7adda77db704402babb39be590b42eb1d10 100644 (file)
@@ -491,7 +491,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info,
     return;
 
   if (sec->size == 0
-      || sec->sec_info_type != ELF_INFO_TYPE_NONE)
+      || sec->sec_info_type != SEC_INFO_TYPE_NONE)
     {
       /* This file does not contain .eh_frame information.  */
       return;
@@ -904,7 +904,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info,
   BFD_ASSERT (cie_count == num_cies);
 
   elf_section_data (sec)->sec_info = sec_info;
-  sec->sec_info_type = ELF_INFO_TYPE_EH_FRAME;
+  sec->sec_info_type = SEC_INFO_TYPE_EH_FRAME;
   if (hdr_info->merge_cies)
     {
       sec_info->cies = local_cies;
@@ -1137,7 +1137,7 @@ _bfd_elf_discard_section_eh_frame
   struct eh_frame_hdr_info *hdr_info;
   unsigned int ptr_size, offset;
 
-  if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
+  if (sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME)
     return FALSE;
 
   sec_info = (struct eh_frame_sec_info *) elf_section_data (sec)->sec_info;
@@ -1307,7 +1307,7 @@ _bfd_elf_eh_frame_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED,
   struct eh_frame_sec_info *sec_info;
   unsigned int lo, hi, mid;
 
-  if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
+  if (sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME)
     return offset;
   sec_info = (struct eh_frame_sec_info *) elf_section_data (sec)->sec_info;
 
@@ -1395,7 +1395,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd,
   unsigned int ptr_size;
   struct eh_cie_fde *ent;
 
-  if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
+  if (sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME)
     /* FIXME: octets_per_byte.  */
     return bfd_set_section_contents (abfd, sec->output_section, contents,
                                     sec->output_offset, sec->size);
index a38f4db8a0a4a8d5d4366c782904f249044e2bac..d58c75c7f8ba931aa84f991362d44c2f7a03924a 100644 (file)
@@ -401,7 +401,7 @@ mn10200_elf_relocate_section (output_bfd, info, input_bfd, input_section,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 8276a2fb0bfdff24a07d475fd21d58c9a0655aa9..876ff4a88ab9f13107f3128d76bc7c3fefd62d7a 100644 (file)
@@ -1509,7 +1509,7 @@ mn10300_elf_relocate_section (bfd *output_bfd,
               h->root.root.root.string);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
@@ -2763,7 +2763,7 @@ mn10300_elf_relax_section (bfd *abfd,
                                                      isym->st_name);
 
          if ((sym_sec->flags & SEC_MERGE)
-             && sym_sec->sec_info_type == ELF_INFO_TYPE_MERGE)
+             && sym_sec->sec_info_type == SEC_INFO_TYPE_MERGE)
            {
              symval = isym->st_value;
 
index aa40c339086c4a660a98b195b2c0a9681d70b9ac..9e23bee01b07f051c7c76489f86cd9e2db54b078 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -3071,7 +3071,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info)
              if (link_info != NULL)
                {
                  /* Check discarded linkonce section.  */
-                 if (elf_discarded_section (s))
+                 if (discarded_section (s))
                    {
                      asection *kept;
                      (*_bfd_error_handler)
@@ -9390,7 +9390,7 @@ _bfd_elf_rela_local_sym (bfd *abfd,
                + sym->st_value);
   if ((sec->flags & SEC_MERGE)
       && ELF_ST_TYPE (sym->st_info) == STT_SECTION
-      && sec->sec_info_type == ELF_INFO_TYPE_MERGE)
+      && sec->sec_info_type == SEC_INFO_TYPE_MERGE)
     {
       rel->r_addend =
        _bfd_merged_section_offset (abfd, psec,
@@ -9421,7 +9421,7 @@ _bfd_elf_rel_local_sym (bfd *abfd,
 {
   asection *sec = *psec;
 
-  if (sec->sec_info_type != ELF_INFO_TYPE_MERGE)
+  if (sec->sec_info_type != SEC_INFO_TYPE_MERGE)
     return sym->st_value + addend;
 
   return _bfd_merged_section_offset (abfd, psec,
@@ -9437,10 +9437,10 @@ _bfd_elf_section_offset (bfd *abfd,
 {
   switch (sec->sec_info_type)
     {
-    case ELF_INFO_TYPE_STABS:
+    case SEC_INFO_TYPE_STABS:
       return _bfd_stab_section_offset (sec, elf_section_data (sec)->sec_info,
                                       offset);
-    case ELF_INFO_TYPE_EH_FRAME:
+    case SEC_INFO_TYPE_EH_FRAME:
       return _bfd_elf_eh_frame_section_offset (abfd, info, sec, offset);
     default:
       if ((sec->flags & SEC_ELF_REVERSE_COPY) != 0)
index 1f6c1a07e40e9fe4a2b26504624eb2faa815e1ad..9355f6651d507eccf685ef1f0b8ef34237a836ad 100644 (file)
@@ -4485,7 +4485,7 @@ cortex_a8_erratum_scan (bfd *input_bfd,
       if (elf_section_type (section) != SHT_PROGBITS
           || (elf_section_flags (section) & SHF_EXECINSTR) == 0
           || (section->flags & SEC_EXCLUDE) != 0
-          || (section->sec_info_type == ELF_INFO_TYPE_JUST_SYMS)
+          || (section->sec_info_type == SEC_INFO_TYPE_JUST_SYMS)
           || (section->output_section == bfd_abs_section_ptr))
         continue;
 
@@ -6556,7 +6556,7 @@ bfd_elf32_arm_vfp11_erratum_scan (bfd *abfd, struct bfd_link_info *link_info)
       if (elf_section_type (sec) != SHT_PROGBITS
           || (elf_section_flags (sec) & SHF_EXECINSTR) == 0
           || (sec->flags & SEC_EXCLUDE) != 0
-         || sec->sec_info_type == ELF_INFO_TYPE_JUST_SYMS
+         || sec->sec_info_type == SEC_INFO_TYPE_JUST_SYMS
          || sec->output_section == bfd_abs_section_ptr
           || strcmp (sec->name, VFP11_ERRATUM_VENEER_SECTION_NAME) == 0)
         continue;
@@ -10305,7 +10305,7 @@ elf32_arm_relocate_section (bfd *                  output_bfd,
          sym_type = h->type;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index a7f92174136773dbe88b67be0eb649fc5e057c4f..97dc268f066be0094b6beed11fa71a7eec1c1f44 100644 (file)
@@ -1189,7 +1189,7 @@ elf32_avr_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
          name = h->root.root.string;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index b112dfc267f5fad95d85f98d2c6821c77524f73c..4941f4012492432d78d2f13cefe20a5daa7ee12e 100644 (file)
@@ -1444,7 +1444,7 @@ bfin_relocate_section (bfd * output_bfd,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
@@ -2663,7 +2663,7 @@ bfinfdpic_relocate_section (bfd * output_bfd,
          osec = sec;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
@@ -4429,7 +4429,7 @@ bfinfdpic_elf_discard_info (bfd *ibfd,
 
   /* Account for relaxation of .eh_frame section.  */
   for (s = ibfd->sections; s; s = s->next)
-    if (s->sec_info_type == ELF_INFO_TYPE_EH_FRAME)
+    if (s->sec_info_type == SEC_INFO_TYPE_EH_FRAME)
       {
        if (!_bfinfdpic_check_discarded_relocs (ibfd, s, info, &changed))
          return FALSE;
index 0118131bead1730a0a46c4a93ccaa2689d199a8c..38af05fe7ae4cb19693f14f2c921aea3b784992f 100644 (file)
@@ -1431,7 +1431,7 @@ elf32_cr16_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                                    unresolved_reloc, warned);
         }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index ca2d7cbb4a355409523707363f702a307568416d..109936b4d7c7c89990d644d41bbae29ada155edf 100644 (file)
@@ -723,7 +723,7 @@ elf32_cr16c_relocate_section (bfd *output_bfd,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 310f6d1e6708946412ced6ae02bc0cf5821b27c2..ec23f03d718f689e8f21eebb719f3643446562cf 100644 (file)
@@ -1180,7 +1180,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
            }
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index d48932d5e00b0aae37b7ee8e0ef3eb75b331a6a8..fd13447b398ed9df82b1917299dc9ca3c4c2abfa 100644 (file)
@@ -873,7 +873,7 @@ elf32_crx_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 7d6539524acbf0adefc8f9696be711df811fd164..e39a9b59a5c464a1b4d40cca407d68c68b9aac25 100644 (file)
@@ -463,7 +463,7 @@ elf32_d10v_relocate_section (bfd *output_bfd,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 97b0d299f7f079791f33c0559efb481301550a52..57be6ae25ff57c6941725985252138ecc21ae694 100644 (file)
@@ -577,7 +577,7 @@ fr30_elf_relocate_section (output_bfd, info, input_bfd, input_section,
          name = h->root.root.string;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 7f3c4dd23ebcca41d3aa4c83d1e09c722734b5fa..513f811cd7dd0457ef51e4e7de42c46b64cf2428 100644 (file)
@@ -2812,7 +2812,7 @@ elf32_frv_relocate_section (output_bfd, info, input_bfd, input_section,
          name = h->root.root.string;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
@@ -5678,7 +5678,7 @@ frvfdpic_elf_discard_info (bfd *ibfd,
 
   /* Account for relaxation of .eh_frame section.  */
   for (s = ibfd->sections; s; s = s->next)
-    if (s->sec_info_type == ELF_INFO_TYPE_EH_FRAME)
+    if (s->sec_info_type == SEC_INFO_TYPE_EH_FRAME)
       {
        if (!_frvfdpic_check_discarded_relocs (ibfd, s, info, &changed))
          return FALSE;
index 95d398356d910c6cb5c998487e9125dd4ce71b4a..ff1ee701199af2b753551e2244eb1d3aa949615a 100644 (file)
@@ -460,7 +460,7 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index dcf6df089124e485ca7c868e51e6ae8c9774803e..044b6fa812b58e8326dc49836585268c6f10508f 100644 (file)
@@ -3741,7 +3741,7 @@ elf32_hppa_relocate_section (bfd *output_bfd,
          hh = hppa_elf_hash_entry (eh);
        }
 
-      if (sym_sec != NULL && elf_discarded_section (sym_sec))
+      if (sym_sec != NULL && discarded_section (sym_sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rela, relend,
                                         elf_hppa_howto_table + r_type,
index 808292703313f8c3d4da447d4fca0f580fab8bd5..516511fb09b9f63ec545a1acc72051e55e165123 100644 (file)
@@ -1138,7 +1138,7 @@ i370_elf_relocate_section (bfd *output_bfd,
            }
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index d518d014772dea1ebcf1207a175e03e09342ae2e..b925ca6448a62cc13e41737aa7586d4f492d0877 100644 (file)
@@ -3178,7 +3178,7 @@ elf_i386_relocate_section (bfd *output_bfd,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
@@ -4846,7 +4846,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd,
                             + PLT_FDE_START_OFFSET);
        }
       if (htab->plt_eh_frame->sec_info_type
-         == ELF_INFO_TYPE_EH_FRAME)
+         == SEC_INFO_TYPE_EH_FRAME)
        {
          if (! _bfd_elf_write_section_eh_frame (output_bfd, info,
                                                 htab->plt_eh_frame,
index 00c8ca79e8b97af2275bd44e36d5b2df6f50c4d3..88f426554e30838d71871e38c9c4a89ece6bbec5 100644 (file)
@@ -1128,7 +1128,7 @@ elf32_i860_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 0a251b8458913880211149e13d57d65fa00ed9cd..43c7b1cd0ffd1ea3ef789969e4f3330fa0a2ebbc 100644 (file)
@@ -1436,7 +1436,7 @@ ip2k_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
          name = h->root.root.string;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 63ef3dcfc828f47511cd951f6ff5ffb246d9ceb9..3954616084fcc174bb41b662e48210332fc29000 100644 (file)
@@ -633,7 +633,7 @@ iq2000_elf_relocate_section (bfd *               output_bfd ATTRIBUTE_UNUSED,
          name = h->root.root.string;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 07add20c478aa22b52983acbceada4b176e660a0..a2b1003ceca60fef5c6e7d00834f77da31c2ce3e 100644 (file)
@@ -893,7 +893,7 @@ lm32_elf_relocate_section (bfd *output_bfd,
          name = h->root.root.string;
         }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
@@ -2372,7 +2372,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd,
                           /* Don't generate entries for weak symbols.  */
                           if (!h || (h && h->root.type != bfd_link_hash_undefweak))
                             {
-                              if (!elf_discarded_section (s) && !((bfd_get_section_flags (ibfd, s) & SEC_ALLOC) == 0))
+                              if (!discarded_section (s) && !((bfd_get_section_flags (ibfd, s) & SEC_ALLOC) == 0))
                                 {
                                   switch (ELF32_R_TYPE (internal_relocs->r_info))
                                     {
@@ -2394,7 +2394,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd,
                                   if (!strcmp (current->name, h->root.root.string))
                                     break;
                                 }
-                              if (!current && !elf_discarded_section (s) && (bfd_get_section_flags (ibfd, s) & SEC_ALLOC))
+                              if (!current && !discarded_section (s) && (bfd_get_section_flags (ibfd, s) & SEC_ALLOC))
                                 {
                                   /* Will this have an entry in the GOT.  */
                                   if (ELF32_R_TYPE (internal_relocs->r_info) == R_LM32_16_GOT)
index cf7ad99ccffe2b828f8f1b5aca817542f54380b7..bcdb55dfb8a1c9f7aa2f9380796de32e4a560b29 100644 (file)
@@ -434,7 +434,7 @@ m32c_elf_relocate_section
            }
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 51ef61e6b4980b1165628a3e747ada923a2692c2..b151a8a70672f41ba23506388ee7de58607ad8f8 100644 (file)
@@ -2616,7 +2616,7 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
            }
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 961dce482e63f1c47b2f3867aaa79424763f49f7..4b9a1c0ba30734af74c06e12955fc9b0db8baeaa 100644 (file)
@@ -970,7 +970,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
          is_far = (h && (h->other & STO_M68HC12_FAR));
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 3e9ada92865a4650b8260b6b90812d0439267d2a..518a41a27f037c19ec5b69d17c97af1f51467f7d 100644 (file)
@@ -3717,7 +3717,7 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 31cc095372b4ae6024511afb599587c86f392b89..02aef53dd51c863ead9158e78cbbcb1377505341 100644 (file)
@@ -466,7 +466,7 @@ mcore_elf_relocate_section (bfd * output_bfd,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 6fecb2502d36d0e28e5c7099ea8f74fb835574e7..e5104b3f50a3f8331c389f51b53756ccc6b595e5 100644 (file)
@@ -500,7 +500,7 @@ mep_elf_relocate_section
          name = h->root.root.string;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 8463599775c060829d249881ab50c99313d8cddb..c340826a099f77fa0d678974b18caaad1e24944f 100644 (file)
@@ -250,7 +250,7 @@ moxie_elf_relocate_section (bfd *output_bfd,
          name = h->root.root.string;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 9a5fb2a910408703dd76d77478f8d43bda7034d6..2fa70d9bd300b9f25df30d65e830477aba2bd74a 100644 (file)
@@ -454,7 +454,7 @@ elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 1be5d00cc3b517de4efaf39ce65a50afddc85469..b87995e705d0ec5c1da63c8a5985940e378b6781 100644 (file)
@@ -354,7 +354,7 @@ mt_elf_relocate_section
          name = h->root.root.string;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index ada738e066fc94622b780ccaab597b4bd0c021ed..e441f4db12e828473366d1f81107454d1cd8075d 100644 (file)
@@ -373,7 +373,7 @@ openrisc_elf_relocate_section (bfd *output_bfd,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 574cd9891c8851f9cbfaf4ad3c0a9eacb92ac87e..d3925afcb84ad3127b2a1bfe87d40f29f03fbdee 100644 (file)
@@ -6231,7 +6231,7 @@ ppc_elf_relax_section (bfd *abfd,
         attribute for a code section, and we are only looking at
         branches.  However, implement it correctly here as a
         reference for other target relax_section functions.  */
-      if (0 && tsec->sec_info_type == ELF_INFO_TYPE_MERGE)
+      if (0 && tsec->sec_info_type == SEC_INFO_TYPE_MERGE)
        {
          /* At this stage in linking, no SEC_MERGE symbol has been
             adjusted, so all references to such symbols need to be
@@ -6886,7 +6886,7 @@ ppc_elf_relocate_section (bfd *output_bfd,
          sym_name = h->root.root.string;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        {
          /* For relocs against symbols from removed linkonce sections,
             or sections discarded by a linker script, we just want the
@@ -9054,7 +9054,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd,
       BFD_ASSERT ((bfd_vma) ((p + 3 - htab->glink_eh_frame->contents) & -4)
                  == htab->glink_eh_frame->size);
 
-      if (htab->glink_eh_frame->sec_info_type == ELF_INFO_TYPE_EH_FRAME
+      if (htab->glink_eh_frame->sec_info_type == SEC_INFO_TYPE_EH_FRAME
          && !_bfd_elf_write_section_eh_frame (output_bfd, info,
                                               htab->glink_eh_frame,
                                               htab->glink_eh_frame->contents))
index f049f6e3390f448eee7090b9a21533f990449991..32820b4724831e54b08c9d233ded6893be6fc982 100644 (file)
@@ -510,7 +510,7 @@ rx_elf_relocate_section
          name = h->root.root.string;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
@@ -1588,7 +1588,7 @@ rx_offset_for_reloc (bfd *                    abfd,
          if (ssec)
            {
              if ((ssec->flags & SEC_MERGE)
-                 && ssec->sec_info_type == ELF_INFO_TYPE_MERGE)
+                 && ssec->sec_info_type == SEC_INFO_TYPE_MERGE)
                symval = _bfd_merged_section_offset (abfd, & ssec,
                                                     elf_section_data (ssec)->sec_info,
                                                     symval);
index 98437d0df903af2b533930ec91acb398b7c54aad..11fb07265dc61610d5690af1a55f6889c11831a6 100644 (file)
@@ -2282,7 +2282,7 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index b4376242c94e648ef9f9ed26e5adfe6822bfe067..ef849aa237a87a3f0d728069feb0491c00ebd7e1 100644 (file)
@@ -2672,7 +2672,7 @@ s3_bfd_score_elf_relocate_section (bfd *output_bfd,
             }
         }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 3e98bfc45ac2fc8038b5cbe7589c04f5b96a56c4..3d228f3a5db82b77373affaae1c7426f6f4b2b43 100644 (file)
@@ -2443,7 +2443,7 @@ s7_bfd_score_elf_relocate_section (bfd *output_bfd,
             }
         }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index ca2c4af9058d8c518ffac0768df8fab084ee17ad..e56c3b5dbb5b7318be1b8ac32f02aed8577ff9a9 100644 (file)
@@ -4048,7 +4048,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
              _("Unexpected STO_SH5_ISA32 on local symbol is not handled"),
              input_bfd, input_section, rel->r_offset));
 
-         if (sec != NULL && elf_discarded_section (sec))
+         if (sec != NULL && discarded_section (sec))
            /* Handled below.  */
            ;
          else if (info->relocatable)
@@ -4236,7 +4236,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            }
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index ae3ed10c4ed1b066d7f1d21f17c755abc201046c..40a9da2777802777f26389bc2ae9e7c072ae56f8 100644 (file)
@@ -4895,7 +4895,7 @@ spu_elf_relocate_section (bfd *output_bfd,
          sym_name = h->root.root.string;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 44042eb1ae3a4f577eda9784759f85557e4b8c28..a879d3c2211f71046e59ed20371da699c289277d 100644 (file)
@@ -2334,7 +2334,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index f2aed9cf1e15af0bb8cac652cecd12079fc7980d..a4e565df87714d7a5e49931ee321dd21b883c30d 100644 (file)
@@ -2594,7 +2594,7 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            }
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 9e6f77d22f63cedd172af2057b2e0dd022debbb5..0fbe08036c7590ddca4b25abee3010443e68c9d6 100644 (file)
@@ -2093,7 +2093,7 @@ v850_elf_relocate_section (bfd *output_bfd,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 643381c5c43b8311f232c272df395e8610c727a1..fc3cb7cec54f59e93a886c7aa9ac4c272b2146c0 100644 (file)
@@ -1450,7 +1450,7 @@ elf_vax_relocate_section (bfd *output_bfd,
            relocation = 0;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 11d984002b31b5cdae0dbb7eb62a283cd2c25473..00c7841b446428d7d9dc32547f9d360c81333e58 100644 (file)
@@ -381,7 +381,7 @@ elf32_xc16x_relocate_section (bfd *output_bfd,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        {
          /* For relocs against symbols from removed linkonce sections,
             or sections discarded by a linker script, we just want the
index 614178337e9a86c82d4808aa2133bf136c9354c8..86e1d5beafd5d637ec1c103163d9895e7bb7026a 100644 (file)
@@ -825,7 +825,7 @@ xstormy16_elf_relocate_section (bfd *                   output_bfd ATTRIBUTE_UNU
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index c6e4fb43a01cd26fbc4ceafce5e10f219a21cdff..5a51eae76b7415a0626986c86fe5ebaacf3a38e2 100644 (file)
@@ -1712,7 +1712,7 @@ elf_xtensa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
            continue;
          for (s = abfd->sections; s != NULL; s = s->next)
            {
-             if (! elf_discarded_section (s)
+             if (! discarded_section (s)
                  && xtensa_is_littable_section (s)
                  && s != spltlittbl)
                sgotloc->size += s->size;
@@ -2656,7 +2656,7 @@ elf_xtensa_relocate_section (bfd *output_bfd,
          sym_type = h->type;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
@@ -8960,9 +8960,9 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info)
             that here and adjust things accordingly.  */
          if (! elf_xtensa_ignore_discarded_relocs (sec)
              && elf_xtensa_action_discarded (sec) == PRETEND
-             && sec->sec_info_type != ELF_INFO_TYPE_STABS
+             && sec->sec_info_type != SEC_INFO_TYPE_STABS
              && target_sec != NULL
-             && elf_discarded_section (target_sec))
+             && discarded_section (target_sec))
            {
              /* It would be natural to call _bfd_elf_check_kept_section
                 here, but it's not exported from elflink.c.  It's also a
index 60767099c6b165f5203601edbfc10c60e01878b5..ddb1cd7b4d5f0d51cadba7751b837b61a54f6090 100644 (file)
@@ -4106,7 +4106,7 @@ elf64_alpha_relocate_section_r (bfd *output_bfd ATTRIBUTE_UNUSED,
          sec = h->root.u.def.section;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend,
                                         elf64_alpha_howto_table + r_type,
@@ -4263,7 +4263,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
             unless it has been done already.  */
          if ((sec->flags & SEC_MERGE)
              && ELF_ST_TYPE (sym->st_info) == STT_SECTION
-             && sec->sec_info_type == ELF_INFO_TYPE_MERGE
+             && sec->sec_info_type == SEC_INFO_TYPE_MERGE
              && gotent
              && !gotent->reloc_xlated)
            {
@@ -4315,7 +4315,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
          gotent = h->got_entries;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
@@ -4717,7 +4717,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
 
            if (r_symndx < symtab_hdr->sh_info
                && sec != NULL && howto->pc_relative
-               && elf_discarded_section (sec))
+               && discarded_section (sec))
              break;
 
            if (h != NULL)
index 057a92de9a9efd84124eda55d541da036bcc1293..9d2dfcf64ea340f40a7b8daf7eae96f7af85194a 100644 (file)
@@ -3919,7 +3919,7 @@ elf64_hppa_relocate_section (bfd *output_bfd,
             }
        }
 
-      if (sym_sec != NULL && elf_discarded_section (sym_sec))
+      if (sym_sec != NULL && discarded_section (sym_sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index ecc9ad07d5cb3045b981e76737e453aa6d002bec..9cc407f4fdb9565a5bb02133088c606c3e4c0c22 100644 (file)
@@ -1475,7 +1475,7 @@ mmix_elf_relocate_section (output_bfd, info, input_bfd, input_section,
          name = h->root.root.string;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 32a343028249dd0275be34cfa67a0f8bf98ad5bd..52e9ce9b490e39dce7176900d434bade6d88e008 100644 (file)
@@ -6852,7 +6852,7 @@ adjust_opd_syms (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED)
          if (dsec == NULL)
            {
              for (dsec = sym_sec->owner->sections; dsec; dsec = dsec->next)
-               if (elf_discarded_section (dsec))
+               if (discarded_section (dsec))
                  {
                    ppc64_elf_tdata (sym_sec->owner)->deleted_section = dsec;
                    break;
@@ -7033,7 +7033,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info, bfd_boolean non_overlapping)
       if (sec == NULL || sec->size == 0)
        continue;
 
-      if (sec->sec_info_type == ELF_INFO_TYPE_JUST_SYMS)
+      if (sec->sec_info_type == SEC_INFO_TYPE_JUST_SYMS)
        continue;
 
       if (sec->output_section == bfd_abs_section_ptr)
@@ -8077,8 +8077,8 @@ ppc64_elf_edit_toc (struct bfd_link_info *info)
       toc = bfd_get_section_by_name (ibfd, ".toc");
       if (toc == NULL
          || toc->size == 0
-         || toc->sec_info_type == ELF_INFO_TYPE_JUST_SYMS
-         || elf_discarded_section (toc))
+         || toc->sec_info_type == SEC_INFO_TYPE_JUST_SYMS
+         || discarded_section (toc))
        continue;
 
       toc_relocs = NULL;
@@ -8091,7 +8091,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info)
       for (sec = ibfd->sections; sec != NULL; sec = sec->next)
        {
          if (sec->reloc_count == 0
-             || !elf_discarded_section (sec)
+             || !discarded_section (sec)
              || get_opd_info (sec)
              || (sec->flags & SEC_ALLOC) == 0
              || (sec->flags & SEC_DEBUGGING) != 0)
@@ -8201,7 +8201,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info)
                goto error_ret;
 
              if (sym_sec == NULL
-                 || elf_discarded_section (sym_sec))
+                 || discarded_section (sym_sec))
                continue;
 
              if (!SYMBOL_CALLS_LOCAL (info, h))
@@ -8281,7 +8281,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info)
          int repeat;
 
          if (sec->reloc_count == 0
-             || elf_discarded_section (sec)
+             || discarded_section (sec)
              || get_opd_info (sec)
              || (sec->flags & SEC_ALLOC) == 0
              || (sec->flags & SEC_DEBUGGING) != 0)
@@ -8503,7 +8503,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info)
          for (sec = ibfd->sections; sec != NULL; sec = sec->next)
            {
              if (sec->reloc_count == 0
-                 || elf_discarded_section (sec))
+                 || discarded_section (sec))
                continue;
 
              relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL,
@@ -12036,7 +12036,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
        }
       h = (struct ppc_link_hash_entry *) h_elf;
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend,
                                         ppc64_elf_howto_table[r_type],
@@ -13865,7 +13865,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd,
 
 
   if (htab->glink_eh_frame != NULL
-      && htab->glink_eh_frame->sec_info_type == ELF_INFO_TYPE_EH_FRAME
+      && htab->glink_eh_frame->sec_info_type == SEC_INFO_TYPE_EH_FRAME
       && !_bfd_elf_write_section_eh_frame (output_bfd, info,
                                           htab->glink_eh_frame,
                                           htab->glink_eh_frame->contents))
index 9884da03b61482c907c93756193f375dfbfa613b..e9138a6860866f0384b3cb1031c63a4ec67e06b0 100644 (file)
@@ -2270,7 +2270,7 @@ elf_s390_relocate_section (bfd *output_bfd,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index bbef2a216cf86bbc111584d14259d8e4bd0e8d25..d8f21204c23ecf6e9e7635e7d6b8cab6a59dd7e1 100644 (file)
@@ -1514,7 +1514,7 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
              _("Unexpected STO_SH5_ISA32 on local symbol is not handled"),
              input_bfd, input_section, rel->r_offset));
 
-         if (sec != NULL && elf_discarded_section (sec))
+         if (sec != NULL && discarded_section (sec))
            /* Handled below.  */
            ;
          else if (info->relocatable)
@@ -1657,7 +1657,7 @@ sh_elf64_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED,
            }
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index bdb3ae6b757802776b17b1acba17fec359eb14ea..9d826e721e08cf03f65e025cf344e2afd0abc719 100644 (file)
@@ -3062,7 +3062,7 @@ elf_x86_64_relocate_section (bfd *output_bfd,
                                   unresolved_reloc, warned);
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
@@ -4625,7 +4625,7 @@ elf_x86_64_finish_dynamic_sections (bfd *output_bfd,
                             + PLT_FDE_START_OFFSET);
        }
       if (htab->plt_eh_frame->sec_info_type
-         == ELF_INFO_TYPE_EH_FRAME)
+         == SEC_INFO_TYPE_EH_FRAME)
        {
          if (! _bfd_elf_write_section_eh_frame (output_bfd, info,
                                                 htab->plt_eh_frame,
index 8556cec953265ca5053653957b34e6e3810f53ec..da6be480a0f462faaac80422f24bc67c0d8253d0 100644 (file)
@@ -1,6 +1,6 @@
 /* ELF linking support for BFD.
    Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-   2005, 2006, 2007, 2008, 2009, 2010, 2011
+   2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
    Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -937,7 +937,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
   /* Silently discard TLS symbols from --just-syms.  There's no way to
      combine a static TLS block with a new TLS block for this executable.  */
   if (ELF_ST_TYPE (sym->st_info) == STT_TLS
-      && sec->sec_info_type == ELF_INFO_TYPE_JUST_SYMS)
+      && sec->sec_info_type == SEC_INFO_TYPE_JUST_SYMS)
     {
       *skip = TRUE;
       return TRUE;
@@ -2708,7 +2708,7 @@ _bfd_elf_link_sec_merge_syms (struct elf_link_hash_entry *h, void *data)
   if ((h->root.type == bfd_link_hash_defined
        || h->root.type == bfd_link_hash_defweak)
       && ((sec = h->root.u.def.section)->flags & SEC_MERGE)
-      && sec->sec_info_type == ELF_INFO_TYPE_MERGE)
+      && sec->sec_info_type == SEC_INFO_TYPE_MERGE)
     {
       bfd *output_bfd = (bfd *) data;
 
@@ -3499,7 +3499,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
       /* ld --just-symbols and dynamic objects don't mix very well.
         ld shouldn't allow it.  */
       if ((s = abfd->sections) != NULL
-         && s->sec_info_type == ELF_INFO_TYPE_JUST_SYMS)
+         && s->sec_info_type == SEC_INFO_TYPE_JUST_SYMS)
        abort ();
 
       /* If this dynamic lib was specified on the command line with
@@ -3896,7 +3896,7 @@ error_free_dyn:
          sec = bfd_section_from_elf_index (abfd, isym->st_shndx);
          if (sec == NULL)
            sec = bfd_abs_section_ptr;
-         else if (elf_discarded_section (sec))
+         else if (discarded_section (sec))
            {
              /* Symbols from discarded section are undefined.  We keep
                 its visibility.  */
@@ -4861,7 +4861,7 @@ error_free_dyn:
                                               &string_offset))
                  goto error_return;
                if (secdata->sec_info)
-                 stab->sec_info_type = ELF_INFO_TYPE_STABS;
+                 stab->sec_info_type = SEC_INFO_TYPE_STABS;
            }
        }
     }
@@ -6644,25 +6644,14 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info)
   return TRUE;
 }
 \f
-/* Indicate that we are only retrieving symbol values from this
-   section.  */
-
-void
-_bfd_elf_link_just_syms (asection *sec, struct bfd_link_info *info)
-{
-  if (is_elf_hash_table (info->hash))
-    sec->sec_info_type = ELF_INFO_TYPE_JUST_SYMS;
-  _bfd_generic_link_just_syms (sec, info);
-}
-
 /* Make sure sec_info_type is cleared if sec_info is cleared too.  */
 
 static void
 merge_sections_remove_hook (bfd *abfd ATTRIBUTE_UNUSED,
                            asection *sec)
 {
-  BFD_ASSERT (sec->sec_info_type == ELF_INFO_TYPE_MERGE);
-  sec->sec_info_type = ELF_INFO_TYPE_NONE;
+  BFD_ASSERT (sec->sec_info_type == SEC_INFO_TYPE_MERGE);
+  sec->sec_info_type = SEC_INFO_TYPE_NONE;
 }
 
 /* Finish SHF_MERGE section merging.  */
@@ -6690,7 +6679,7 @@ _bfd_elf_merge_sections (bfd *abfd, struct bfd_link_info *info)
                                          sec, &secdata->sec_info))
              return FALSE;
            else if (secdata->sec_info)
-             sec->sec_info_type = ELF_INFO_TYPE_MERGE;
+             sec->sec_info_type = SEC_INFO_TYPE_MERGE;
          }
 
   if (elf_hash_table (info)->merge_info != NULL)
@@ -8708,7 +8697,7 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data)
   else if ((h->root.type == bfd_link_hash_defined
            || h->root.type == bfd_link_hash_defweak)
           && ((finfo->info->strip_discarded
-               && elf_discarded_section (h->root.u.def.section))
+               && discarded_section (h->root.u.def.section))
               || (h->root.u.def.section->owner != NULL
                   && (h->root.u.def.section->owner->flags & BFD_PLUGIN) != 0)))
     strip = TRUE;
@@ -9007,8 +8996,8 @@ elf_section_ignore_discarded_relocs (asection *sec)
 
   switch (sec->sec_info_type)
     {
-    case ELF_INFO_TYPE_STABS:
-    case ELF_INFO_TYPE_EH_FRAME:
+    case SEC_INFO_TYPE_STABS:
+    case SEC_INFO_TYPE_EH_FRAME:
       return TRUE;
     default:
       break;
@@ -9193,7 +9182,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
              *ppsection = NULL;
              continue;
            }
-         else if (isec->sec_info_type == ELF_INFO_TYPE_MERGE
+         else if (isec->sec_info_type == SEC_INFO_TYPE_MERGE
                   && ELF_ST_TYPE (isym->st_info) != STT_SECTION)
            isym->st_value =
              _bfd_merged_section_offset (output_bfd, &isec,
@@ -9537,7 +9526,7 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
                {
                  /* Complain if the definition comes from a
                     discarded section.  */
-                 if ((sec = *ps) != NULL && elf_discarded_section (sec))
+                 if ((sec = *ps) != NULL && discarded_section (sec))
                    {
                      BFD_ASSERT (r_symndx != STN_UNDEF);
                      if (action_discarded & COMPLAIN)
@@ -9874,19 +9863,19 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
        }
       else switch (o->sec_info_type)
        {
-       case ELF_INFO_TYPE_STABS:
+       case SEC_INFO_TYPE_STABS:
          if (! (_bfd_write_section_stabs
                 (output_bfd,
                  &elf_hash_table (finfo->info)->stab_info,
                  o, &elf_section_data (o)->sec_info, contents)))
            return FALSE;
          break;
-       case ELF_INFO_TYPE_MERGE:
+       case SEC_INFO_TYPE_MERGE:
          if (! _bfd_write_merged_section (output_bfd, o,
                                           elf_section_data (o)->sec_info))
            return FALSE;
          break;
-       case ELF_INFO_TYPE_EH_FRAME:
+       case SEC_INFO_TYPE_EH_FRAME:
          {
            if (! _bfd_elf_write_section_eh_frame (output_bfd, finfo->info,
                                                   o, contents))
@@ -12415,7 +12404,7 @@ bfd_elf_reloc_symbol_deleted_p (bfd_vma offset, void *cookie)
 
          if ((h->root.type == bfd_link_hash_defined
               || h->root.type == bfd_link_hash_defweak)
-             && elf_discarded_section (h->root.u.def.section))
+             && discarded_section (h->root.u.def.section))
            return TRUE;
          else
            return FALSE;
@@ -12431,7 +12420,7 @@ bfd_elf_reloc_symbol_deleted_p (bfd_vma offset, void *cookie)
          /* Need to: get the symbol; get the section.  */
          isym = &rcookie->locsyms[r_symndx];
          isec = bfd_section_from_elf_index (rcookie->abfd, isym->st_shndx);
-         if (isec != NULL && elf_discarded_section (isec))
+         if (isec != NULL && discarded_section (isec))
            return TRUE;
        }
       return FALSE;
@@ -12482,7 +12471,7 @@ bfd_elf_discard_info (bfd *output_bfd, struct bfd_link_info *info)
       if (stab != NULL
          && (stab->size == 0
              || bfd_is_abs_section (stab->output_section)
-             || stab->sec_info_type != ELF_INFO_TYPE_STABS))
+             || stab->sec_info_type != SEC_INFO_TYPE_STABS))
        stab = NULL;
 
       if (stab == NULL
index 3e2ee0b030f1881e8e4090df5777aecb028b62a0..0f6b7200381e8607db583308fcc1490bdb60b85c 100644 (file)
@@ -530,7 +530,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec,
          symtype = h->type;
        }
 
-      if (tsec->sec_info_type == ELF_INFO_TYPE_MERGE)
+      if (tsec->sec_info_type == SEC_INFO_TYPE_MERGE)
        {
          /* At this stage in linking, no SEC_MERGE symbol has been
             adjusted, so all references to such symbols need to be
@@ -3861,7 +3861,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
          if (!info->relocatable
              && (sym_sec->flags & SEC_MERGE) != 0
              && ELF_ST_TYPE (sym->st_info) == STT_SECTION
-             && sym_sec->sec_info_type == ELF_INFO_TYPE_MERGE)
+             && sym_sec->sec_info_type == SEC_INFO_TYPE_MERGE)
            {
              struct elfNN_ia64_local_hash_entry *loc_h;
 
@@ -3919,7 +3919,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd,
            continue;
        }
 
-      if (sym_sec != NULL && elf_discarded_section (sym_sec))
+      if (sym_sec != NULL && discarded_section (sym_sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index fa906cde4a5fc10c096b7b78718eab0c793efc50..791105059aeecd012f9545f5e40620218af43d3a 100644 (file)
@@ -9385,7 +9385,7 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            sec = h->root.u.def.section;
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 9a151247d1b40e369ec519d8241dac5935d0f5c8..f3c631e86bc8072a7c818a8a63a451d6d666176c 100644 (file)
@@ -2970,7 +2970,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd,
            }
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index c484562da922e8eac44fca3dadc13e697bb1e23d..e1c89460a36b4a088fd99ac3cbc8c25e9532db66 100644 (file)
@@ -2908,7 +2908,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
            }
        }
 
-      if (sec != NULL && elf_discarded_section (sec))
+      if (sec != NULL && discarded_section (sec))
        RELOC_AGAINST_DISCARDED_SECTION (info, input_bfd, input_section,
                                         rel, relend, howto, contents);
 
index 7a01e114a21a268e58768859c85342e7740a0316..e5d20b2dddedb1a092a82e0329a94a02e580f454 100644 (file)
@@ -1,6 +1,6 @@
 /* linker.c -- BFD linker routines
    Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
    Free Software Foundation, Inc.
    Written by Steve Chamberlain and Ian Lance Taylor, Cygnus Support
 
@@ -810,6 +810,7 @@ void
 _bfd_generic_link_just_syms (asection *sec,
                             struct bfd_link_info *info ATTRIBUTE_UNUSED)
 {
+  sec->sec_info_type = SEC_INFO_TYPE_JUST_SYMS;
   sec->output_section = bfd_abs_section_ptr;
   sec->output_offset = sec->vma;
 }
index ef55cc3c9980923e2ec11b39386e4255e1fc1771..e3f0343c8f59ffcf7fc0a457ca4935d298589e0d 100644 (file)
@@ -6235,7 +6235,7 @@ bfd_generic_get_relocated_section_contents (bfd *abfd,
          bfd_reloc_status_type r;
 
          symbol = *(*parent)->sym_ptr_ptr;
-         if (symbol->section && elf_discarded_section (symbol->section))
+         if (symbol->section && discarded_section (symbol->section))
            {
              bfd_byte *p;
              static reloc_howto_type none_howto
index 7c1f75048318f5df7b99e4ae829365a1c150f4f7..e60f247e4e0c0d3281a0444f085aa91c6b554c71 100644 (file)
@@ -382,11 +382,11 @@ CODE_FRAGMENT
 .
 .  {* Type of sec_info information.  *}
 .  unsigned int sec_info_type:3;
-.#define ELF_INFO_TYPE_NONE      0
-.#define ELF_INFO_TYPE_STABS     1
-.#define ELF_INFO_TYPE_MERGE     2
-.#define ELF_INFO_TYPE_EH_FRAME  3
-.#define ELF_INFO_TYPE_JUST_SYMS 4
+.#define SEC_INFO_TYPE_NONE      0
+.#define SEC_INFO_TYPE_STABS     1
+.#define SEC_INFO_TYPE_MERGE     2
+.#define SEC_INFO_TYPE_EH_FRAME  3
+.#define SEC_INFO_TYPE_JUST_SYMS 4
 .
 .  {* Nonzero if this section uses RELA relocations, rather than REL.  *}
 .  unsigned int use_rela_p:1;
index c290a68aa5cdce0317a9bfddee340fd49ddb5863..98fd7782590da25992b2be997fae6caf889b3111 100644 (file)
@@ -1,3 +1,18 @@
+2012-05-11  Ralf Corsépius  <ralf.corsepius@rtems.org>
+
+       PR ld/13991
+       Backport from mainline:
+       2012-04-24  Alan Modra  <amodra@gmail.com>
+
+       * ld/ldlang.c (size_input_section): Use sec_info_type rather than
+       usrdata->flags.just_syms.
+       * ld/ldwrite.c (build_link_order): Likewise.
+       * ld/emultempl/hppaelf.em (build_section_lists): Likewise.
+       * ld/emultempl/ppc64elf.em (build_toc_list): Likewise.
+       * ld/emultempl/armelf.em (build_section_lists): Likewise.
+       (after_allocation): Update for renamed sec_info_type value.
+       * ld/emultempl/tic6xdsbt.em: Likewise.
+
 2011-12-20  Joseph Myers  <joseph@codesourcery.com>
 
        * emulparams/elf32bmip.sh (OTHER_SECTIONS): Put .mdebug.* and
index d29da59a61110598eda6165cd70b89cbe3da3fcb..76314745c5c6a0d70b39c410b55266982f1fe3b5 100644 (file)
@@ -240,7 +240,7 @@ build_section_lists (lang_statement_union_type *statement)
     {
       asection *i = statement->input_section.section;
 
-      if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
+      if (i->sec_info_type != SEC_INFO_TYPE_JUST_SYMS
          && (i->flags & SEC_EXCLUDE) == 0
          && i->output_section != NULL
          && i->output_section->owner == link_info.output_bfd)
@@ -299,7 +299,7 @@ gld${EMULATION_NAME}_after_allocation (void)
                  && elf_section_type (sec) == SHT_PROGBITS
                  && (elf_section_flags (sec) & SHF_EXECINSTR) != 0
                  && (sec->flags & SEC_EXCLUDE) == 0
-                 && sec->sec_info_type != ELF_INFO_TYPE_JUST_SYMS
+                 && sec->sec_info_type != SEC_INFO_TYPE_JUST_SYMS
                  && out_sec != bfd_abs_section_ptr)
                {
                  if (sec_count == list_size)
index 1137ba2cd6f080f6288064941a18cd4b98e5beb7..6258bf4c23af13d22f124fdf0034d8b45fbb16dd 100644 (file)
@@ -229,7 +229,7 @@ build_section_lists (lang_statement_union_type *statement)
     {
       asection *i = statement->input_section.section;
 
-      if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
+      if (i->sec_info_type != SEC_INFO_TYPE_JUST_SYMS
          && (i->flags & SEC_EXCLUDE) == 0
          && i->output_section != NULL
          && i->output_section->owner == link_info.output_bfd)
index 92a468fb6681b069bd9844471c4d9c45906a7c44..52b9f05b4e773d085c7df27a2e7332038fa5c55d 100644 (file)
@@ -428,7 +428,7 @@ build_toc_list (lang_statement_union_type *statement)
     {
       asection *i = statement->input_section.section;
 
-      if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
+      if (i->sec_info_type != SEC_INFO_TYPE_JUST_SYMS
          && (i->flags & SEC_EXCLUDE) == 0
          && i->output_section == toc_section)
        {
@@ -446,7 +446,7 @@ build_section_lists (lang_statement_union_type *statement)
     {
       asection *i = statement->input_section.section;
 
-      if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
+      if (i->sec_info_type != SEC_INFO_TYPE_JUST_SYMS
          && (i->flags & SEC_EXCLUDE) == 0
          && i->output_section != NULL
          && i->output_section->owner == link_info.output_bfd)
index e2870053d75647e378985a2b9ae8ced888b19400..fd7a12b379068b589a52be6392238c1793ef12e7 100644 (file)
@@ -122,7 +122,7 @@ gld${EMULATION_NAME}_after_allocation (void)
                  && elf_section_type (sec) == SHT_PROGBITS
                  && (elf_section_flags (sec) & SHF_EXECINSTR) != 0
                  && (sec->flags & SEC_EXCLUDE) == 0
-                 && sec->sec_info_type != ELF_INFO_TYPE_JUST_SYMS
+                 && sec->sec_info_type != SEC_INFO_TYPE_JUST_SYMS
                  && out_sec != bfd_abs_section_ptr)
                {
                  if (sec_count == list_size)
index 2c56b564559e3a30683d5168854856c569112299..7ecbae219e2584aa130c9290c751d10f85ea154c 100644 (file)
@@ -4648,7 +4648,7 @@ size_input_section
   lang_input_section_type *is = &((*this_ptr)->input_section);
   asection *i = is->section;
 
-  if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
+  if (i->sec_info_type != SEC_INFO_TYPE_JUST_SYMS
       && (i->flags & SEC_EXCLUDE) == 0)
     {
       unsigned int alignment_needed;
index b7a1469c06a3696fd2efeac437f58f18e2f09eeb..2503d1f6bd0d162aa000a11b5dce2971c13cc66e 100644 (file)
@@ -1,6 +1,6 @@
 /* ldwrite.c -- write out the linked file
    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002,
-   2003, 2004, 2005, 2006, 2007, 2008, 2010
+   2003, 2004, 2005, 2006, 2007, 2008, 2010, 2012
    Free Software Foundation, Inc.
    Written by Steve Chamberlain sac@cygnus.com
 
@@ -240,7 +240,7 @@ build_link_order (lang_statement_union_type *statement)
           attached */
        asection *i = statement->input_section.section;
 
-       if (!((lang_input_statement_type *) i->owner->usrdata)->just_syms_flag
+       if (i->sec_info_type != SEC_INFO_TYPE_JUST_SYMS
            && (i->flags & SEC_EXCLUDE) == 0)
          {
            asection *output_section = i->output_section;