* bfd-in.h: Remove "taken from the source" comment.
authorAlan Modra <amodra@gmail.com>
Wed, 5 Jun 2002 03:43:11 +0000 (03:43 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 5 Jun 2002 03:43:11 +0000 (03:43 +0000)
* libbfd-in.h: Likewise.
* libcoff-in.h: Likewise.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
* libcoff.h: Regenerate.

* elf.c (bfd_elf_discard_group): Return true.
* elf-bfd.h (bfd_elf_discard_group): Declare.
* bfd-in.h (bfd_elf_discard_group): Don't declare here.
* section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
* bfd.c (bfd_discard_group): Define.
* targets.c (struct bfd_target): Add _bfd_discard_group.
(BFD_JUMP_TABLE_LINK): Here too.
* libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
* aout-adobe.c (aout_32_bfd_discard_group): Define.
* aout-target.h (MY_bfd_discard_group): Define.
* aout-tic30.c (MY_bfd_discard_group): Define.
* binary.c (binary_bfd_discard_group): Define.
* bout.c (b_out_bfd_discard_group): Define.
* coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
* coffcode.h (coff_bfd_discard_group): Define.
* coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
* elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
* i386msdos.c (msdos_bfd_discard_group): Define.
* i386os9k.c (os9k_bfd_discard_group): Define.
* ieee.c (ieee_bfd_discard_group): Define.
* ihex.c (ihex_bfd_discard_group): Define.
* mmo.c (mmo_bfd_discard_group): Define.
* nlm-target.h (nlm_bfd_discard_group): Define.
* oasys.c (oasys_bfd_discard_group): Define.
* ppcboot.c (ppcboot_bfd_discard_group): Define.
* som.c (som_bfd_discard_group): Define.
* srec.c (srec_bfd_discard_group): Define.
* tekhex.c (tekhex_bfd_discard_group): Define.
* versados.c (versados_bfd_discard_group): Define.
* vms.c (vms_bfd_discard_group): Define.
* xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
* coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
(aix5coff64_vec): Likewise.
* coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.

37 files changed:
bfd/ChangeLog
bfd/aout-adobe.c
bfd/aout-target.h
bfd/aout-tic30.c
bfd/bfd-in.h
bfd/bfd-in2.h
bfd/bfd.c
bfd/binary.c
bfd/bout.c
bfd/coff-alpha.c
bfd/coff-mips.c
bfd/coff-rs6000.c
bfd/coff64-rs6000.c
bfd/coffcode.h
bfd/elf-bfd.h
bfd/elf.c
bfd/elfxx-target.h
bfd/i386msdos.c
bfd/i386os9k.c
bfd/ieee.c
bfd/ihex.c
bfd/libbfd-in.h
bfd/libbfd.h
bfd/libcoff-in.h
bfd/libcoff.h
bfd/mmo.c
bfd/nlm-target.h
bfd/oasys.c
bfd/ppcboot.c
bfd/section.c
bfd/som.c
bfd/srec.c
bfd/targets.c
bfd/tekhex.c
bfd/versados.c
bfd/vms.c
bfd/xcoff-target.h

index d04c40943be0a77451abdb72ae87ef8bdd6fa727..ab52bca481b170cafec404a29bd7be522d0e772b 100644 (file)
@@ -1,3 +1,47 @@
+2002-06-05  Alan Modra  <amodra@bigpond.net.au>
+
+       * bfd-in.h: Remove "taken from the source" comment.
+       * libbfd-in.h: Likewise.
+       * libcoff-in.h: Likewise.
+       * bfd-in2.h: Regenerate.
+       * libbfd.h: Regenerate.
+       * libcoff.h: Regenerate.
+
+       * elf.c (bfd_elf_discard_group): Return true.
+       * elf-bfd.h (bfd_elf_discard_group): Declare.
+       * bfd-in.h (bfd_elf_discard_group): Don't declare here.
+       * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
+       * bfd.c (bfd_discard_group): Define.
+       * targets.c (struct bfd_target): Add _bfd_discard_group.
+       (BFD_JUMP_TABLE_LINK): Here too.
+       * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
+       * aout-adobe.c (aout_32_bfd_discard_group): Define.
+       * aout-target.h (MY_bfd_discard_group): Define.
+       * aout-tic30.c (MY_bfd_discard_group): Define.
+       * binary.c (binary_bfd_discard_group): Define.
+       * bout.c (b_out_bfd_discard_group): Define.
+       * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
+       * coffcode.h (coff_bfd_discard_group): Define.
+       * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
+       * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
+       * i386msdos.c (msdos_bfd_discard_group): Define.
+       * i386os9k.c (os9k_bfd_discard_group): Define.
+       * ieee.c (ieee_bfd_discard_group): Define.
+       * ihex.c (ihex_bfd_discard_group): Define.
+       * mmo.c (mmo_bfd_discard_group): Define.
+       * nlm-target.h (nlm_bfd_discard_group): Define.
+       * oasys.c (oasys_bfd_discard_group): Define.
+       * ppcboot.c (ppcboot_bfd_discard_group): Define.
+       * som.c (som_bfd_discard_group): Define.
+       * srec.c (srec_bfd_discard_group): Define.
+       * tekhex.c (tekhex_bfd_discard_group): Define.
+       * versados.c (versados_bfd_discard_group): Define.
+       * vms.c (vms_bfd_discard_group): Define.
+       * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
+       * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
+       (aix5coff64_vec): Likewise.
+       * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
+
 2002-06-04  Jason Thorpe  <thorpej@wasabisystems.com>
 
        * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
index c11c504c5842c121857826940376cc28f160c042..83983398aa77078f610e513cd4acdc5ff5fae360 100644 (file)
@@ -510,6 +510,7 @@ aout_adobe_sizeof_headers (ignore_abfd, ignore)
 #define aout_32_bfd_relax_section       bfd_generic_relax_section
 #define aout_32_bfd_gc_sections         bfd_generic_gc_sections
 #define aout_32_bfd_merge_sections     bfd_generic_merge_sections
+#define aout_32_bfd_discard_group      bfd_generic_discard_group
 #define aout_32_bfd_link_hash_table_create \
   _bfd_generic_link_hash_table_create
 #define aout_32_bfd_link_hash_table_free \
index 15a25687692c8efe1a118ec321ff7b8f736f8e92..75299fa81803b062291a408938ac10a2eb8a4c0c 100644 (file)
@@ -513,6 +513,9 @@ MY_bfd_final_link (abfd, info)
 #ifndef MY_bfd_merge_sections
 #define MY_bfd_merge_sections bfd_generic_merge_sections
 #endif
+#ifndef MY_bfd_discard_group
+#define MY_bfd_discard_group bfd_generic_discard_group
+#endif
 #ifndef MY_bfd_reloc_type_lookup
 #define MY_bfd_reloc_type_lookup NAME(aout,reloc_type_lookup)
 #endif
index e00c1379e87eb48a3e7806de9936579db9d79b25..a39a5b1fb885398251d032e9222fdd40682ed754 100644 (file)
@@ -965,6 +965,9 @@ tic30_aout_set_arch_mach (abfd, arch, machine)
 #ifndef MY_bfd_merge_sections
 #define MY_bfd_merge_sections bfd_generic_merge_sections
 #endif
+#ifndef MY_bfd_discard_group
+#define MY_bfd_discard_group bfd_generic_discard_group
+#endif
 #ifndef MY_bfd_reloc_type_lookup
 #define MY_bfd_reloc_type_lookup tic30_aout_reloc_type_lookup
 #endif
index 0ba88985292bd00d04dbc2979ec0bb52a22478ab..19fd107208490a511346f578b217109fdf39ef91 100644 (file)
@@ -657,8 +657,6 @@ extern boolean bfd_elf32_discard_info
   PARAMS ((bfd *, struct bfd_link_info *));
 extern boolean bfd_elf64_discard_info
   PARAMS ((bfd *, struct bfd_link_info *));
-extern void bfd_elf_discard_group
-  PARAMS ((bfd *, struct sec *));
 
 /* Return an upper bound on the number of bytes required to store a
    copy of ABFD's program header table entries.  Return -1 if an error
@@ -815,4 +813,3 @@ extern void bfd_ticoff_set_section_load_page
 extern int bfd_ticoff_get_section_load_page
   PARAMS ((struct sec *));
 
-/* And more from the source.  */
index afaefef40d481f72e25c9fe43746c2c2c4e14b2f..e4319ff91d7a4646f9f8a7640ee8b7fb5f88f458 100644 (file)
@@ -663,8 +663,6 @@ extern boolean bfd_elf32_discard_info
   PARAMS ((bfd *, struct bfd_link_info *));
 extern boolean bfd_elf64_discard_info
   PARAMS ((bfd *, struct bfd_link_info *));
-extern void bfd_elf_discard_group
-  PARAMS ((bfd *, struct sec *));
 
 /* Return an upper bound on the number of bytes required to store a
    copy of ABFD's program header table entries.  Return -1 if an error
@@ -821,10 +819,11 @@ extern void bfd_ticoff_set_section_load_page
 extern int bfd_ticoff_get_section_load_page
   PARAMS ((struct sec *));
 
-/* And more from the source.  */
+/* Extracted from init.c.  */
 void
 bfd_init PARAMS ((void));
 
+/* Extracted from opncls.c.  */
 bfd *
 bfd_openr PARAMS ((const char *filename, const char *target));
 
@@ -852,6 +851,7 @@ bfd_make_writable PARAMS ((bfd *abfd));
 boolean
 bfd_make_readable PARAMS ((bfd *abfd));
 
+/* Extracted from libbfd.c.  */
 
 /* Byte swapping macros for user section data.  */
 
@@ -992,6 +992,7 @@ bfd_make_readable PARAMS ((bfd *abfd));
 #define H_GET_S8 bfd_h_get_signed_8
 
 
+/* Extracted from section.c.  */
 /* This structure is used for a comdat section, as in PE.  A comdat
    section is associated with a particular symbol.  When the linker
    sees a comdat section, it keeps only one of the sections with a
@@ -1452,9 +1453,10 @@ bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec,
 void
 _bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section));
 
-void
-bfd_discard_group PARAMS ((bfd *abfd, asection *group));
+boolean
+bfd_generic_discard_group PARAMS ((bfd *abfd, asection *group));
 
+/* Extracted from archures.c.  */
 enum bfd_architecture
 {
   bfd_arch_unknown,   /* File arch not known.  */
@@ -1728,6 +1730,7 @@ unsigned int
 bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch,
     unsigned long machine));
 
+/* Extracted from reloc.c.  */
 typedef enum bfd_reloc_status
 {
   /* No errors detected.  */
@@ -3090,6 +3093,7 @@ bfd_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
 const char *
 bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code));
 
+/* Extracted from syms.c.  */
 
 typedef struct symbol_cache_entry
 {
@@ -3262,6 +3266,7 @@ bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymb
      BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
                (ibfd, isymbol, obfd, osymbol))
 
+/* Extracted from bfd.c.  */
 struct _bfd
 {
   /* The filename the application opened the BFD with.  */
@@ -3561,6 +3566,9 @@ bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
 #define bfd_merge_sections(abfd, link_info) \
        BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
 
+#define bfd_discard_group(abfd, sec) \
+       BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
+
 #define bfd_link_hash_table_create(abfd) \
        BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
 
@@ -3602,6 +3610,7 @@ extern bfd_byte *bfd_get_relocated_section_contents
 boolean
 bfd_alt_mach_code PARAMS ((bfd *abfd, int index));
 
+/* Extracted from archive.c.  */
 symindex
 bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
 
@@ -3611,6 +3620,7 @@ bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head));
 bfd *
 bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous));
 
+/* Extracted from corefile.c.  */
 const char *
 bfd_core_file_failing_command PARAMS ((bfd *abfd));
 
@@ -3620,6 +3630,7 @@ bfd_core_file_failing_signal PARAMS ((bfd *abfd));
 boolean
 core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd));
 
+/* Extracted from targets.c.  */
 #define BFD_SEND(bfd, message, arglist) \
                ((*((bfd)->xvec->message)) arglist)
 
@@ -3901,7 +3912,8 @@ CONCAT2 (NAME,_bfd_link_just_syms), \
 CONCAT2 (NAME,_bfd_final_link), \
 CONCAT2 (NAME,_bfd_link_split_section), \
 CONCAT2 (NAME,_bfd_gc_sections), \
-CONCAT2 (NAME,_bfd_merge_sections)
+CONCAT2 (NAME,_bfd_merge_sections), \
+CONCAT2 (NAME,_bfd_discard_group)
   int      (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
   bfd_byte *(*_bfd_get_relocated_section_contents)
     PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
@@ -3936,6 +3948,9 @@ CONCAT2 (NAME,_bfd_merge_sections)
   /* Attempt to merge SEC_MERGE sections.  */
   boolean  (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
 
+  /* Discard members of a group.  */
+  boolean  (*_bfd_discard_group) PARAMS ((bfd *, struct sec *));
+
   /* Routines to handle dynamic symbols and relocs.  */
 #define BFD_JUMP_TABLE_DYNAMIC(NAME) \
 CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
@@ -3974,6 +3989,7 @@ bfd_target_list PARAMS ((void));
 const bfd_target *
 bfd_search_for_target PARAMS ((int (* search_func) (const bfd_target *, void *), void *));
 
+/* Extracted from format.c.  */
 boolean
 bfd_check_format PARAMS ((bfd *abfd, bfd_format format));
 
index 0e72b0ba99f72829611f936cb1a1ac49cea43ae1..d230aac5af66366cefbc3d1589b04941c4d0d001 100644 (file)
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -1185,6 +1185,9 @@ DESCRIPTION
 .#define bfd_merge_sections(abfd, link_info) \
 .      BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
 .
+.#define bfd_discard_group(abfd, sec) \
+.      BFD_SEND (abfd, _bfd_discard_group, (abfd, sec))
+.
 .#define bfd_link_hash_table_create(abfd) \
 .      BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
 .
index 3a0390131e46a2974a582b7d7d88e18e0baa9ecd..fc972b22d133ac80200379656f31fa29d9f3565b 100644 (file)
@@ -337,6 +337,7 @@ binary_sizeof_headers (abfd, exec)
 #define binary_bfd_relax_section bfd_generic_relax_section
 #define binary_bfd_gc_sections bfd_generic_gc_sections
 #define binary_bfd_merge_sections bfd_generic_merge_sections
+#define binary_bfd_discard_group bfd_generic_discard_group
 #define binary_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define binary_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define binary_bfd_link_just_syms _bfd_generic_link_just_syms
index d02364ee77cf36fc501ecb8e5cdcb5894b9d1fbb..9550956e0897ed7c9c0b84315a7d46e82331bfce 100644 (file)
@@ -1456,6 +1456,7 @@ b_out_bfd_get_relocated_section_contents (output_bfd, link_info, link_order,
 #define b_out_bfd_link_split_section  _bfd_generic_link_split_section
 #define b_out_bfd_gc_sections  bfd_generic_gc_sections
 #define b_out_bfd_merge_sections  bfd_generic_merge_sections
+#define b_out_bfd_discard_group bfd_generic_discard_group
 
 #define aout_32_get_section_contents_in_window \
   _bfd_generic_get_section_contents_in_window
index 4056e2ce6e7de1b5803e6371ed4a145b7d9d1a2a..5c02c3a7f155bc65d384716995609d4be4a9e1b5 100644 (file)
@@ -2356,6 +2356,7 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data =
 #define _bfd_ecoff_bfd_relax_section bfd_generic_relax_section
 #define _bfd_ecoff_bfd_gc_sections bfd_generic_gc_sections
 #define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections
+#define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group
 
 const bfd_target ecoffalpha_little_vec =
 {
index 672b07f7762b08f003a58fa1d3103edd62c91548..f9975e3f91ec9f23a0f513af1952a9a0c1623364 100644 (file)
@@ -2602,6 +2602,8 @@ static const struct ecoff_backend_data mips_ecoff_backend_data =
 /* Merging of sections is not done.  */
 #define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections
 
+#define _bfd_ecoff_bfd_discard_group bfd_generic_discard_group
+
 extern const bfd_target ecoff_big_vec;
 
 const bfd_target ecoff_little_vec =
index 6d5597875aa2e16292e8c1723381ba7289f9b25d..fdf3162bb7c9ca48263fcae009efdcdceee7484d 100644 (file)
@@ -4189,6 +4189,7 @@ const bfd_target rs6000coff_vec =
   _bfd_generic_link_split_section,         /* _bfd_link_split_section */
   bfd_generic_gc_sections,                 /* _bfd_gc_sections */
   bfd_generic_merge_sections,              /* _bfd_merge_sections */
+  bfd_generic_discard_group,               /* _bfd_discard_group */
 
   /* Dynamic */
                                           /* _get_dynamic_symtab_upper_bound */
@@ -4450,7 +4451,8 @@ const bfd_target pmac_xcoff_vec =
   _bfd_xcoff_bfd_final_link,               /* _bfd_final_link */
   _bfd_generic_link_split_section,         /* _bfd_link_split_section */
   bfd_generic_gc_sections,                 /* _bfd_gc_sections */
-  bfd_generic_merge_sections,               /* _bfd_merge_sections */
+  bfd_generic_merge_sections,              /* _bfd_merge_sections */
+  bfd_generic_discard_group,               /* _bfd_discard_group */
 
   /* Dynamic */
                                           /* _get_dynamic_symtab_upper_bound */
index 068b2c20aa1a4486bc58a75342ef10f05887f0d1..16b63d4f8ab5fafd48261a8cab0c60d759a27c2a 100644 (file)
@@ -2735,6 +2735,7 @@ const bfd_target rs6000coff64_vec =
   _bfd_generic_link_split_section,     /* _bfd_link_split_section */
   bfd_generic_gc_sections,             /* _bfd_gc_sections */
   bfd_generic_merge_sections,          /* _bfd_merge_sections */
+  bfd_generic_discard_group,           /* _bfd_discard_group */
 
   /* Dynamic */
   /* _get_dynamic_symtab_upper_bound */
@@ -2988,6 +2989,7 @@ const bfd_target aix5coff64_vec =
   _bfd_generic_link_split_section,     /* _bfd_link_split_section */
   bfd_generic_gc_sections,             /* _bfd_gc_sections */
   bfd_generic_merge_sections,          /* _bfd_merge_sections */
+  bfd_generic_discard_group,           /* _bfd_discard_group */
 
   /* Dynamic */
   /* _get_dynamic_symtab_upper_bound */
index cea516f61726d22ef4f68fb4ec4ff75ae9c495b6..ece19a2ecad6728eabaf481b53f76ce153055deb 100644 (file)
@@ -5372,6 +5372,10 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table =
 #define coff_bfd_merge_sections                    bfd_generic_merge_sections
 #endif
 
+#ifndef coff_bfd_discard_group
+#define coff_bfd_discard_group             bfd_generic_discard_group
+#endif
+
 #define CREATE_BIG_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE)        \
 const bfd_target VAR =                                                 \
 {                                                                      \
index 47bb6891b5d1b11918fe8fb39f7c624639d5abfc..1dd03b24051caf8bf6c554e0d8f4f651e9ce1c15 100644 (file)
@@ -1261,6 +1261,8 @@ extern boolean _bfd_elf_slurp_version_tables
   PARAMS ((bfd *));
 extern boolean _bfd_elf_merge_sections
   PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean bfd_elf_discard_group
+  PARAMS ((bfd *, struct sec *));
 extern void _bfd_elf_link_just_syms
   PARAMS ((asection *, struct bfd_link_info *));
 extern boolean _bfd_elf_copy_private_symbol_data
index e1e929f275079204f49b91ac4cb2d13289556209..8125ed7a4dc4de535c371205e423f5cd23f72248 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -553,7 +553,7 @@ setup_group (abfd, hdr, newsect)
   return true;
 }
 
-void
+boolean
 bfd_elf_discard_group (abfd, group)
      bfd *abfd ATTRIBUTE_UNUSED;
      asection *group;
@@ -569,6 +569,7 @@ bfd_elf_discard_group (abfd, group)
       if (s == first)
        break;
     }
+  return true;
 }
 
 /* Make a BFD section from an ELF section.  We store a pointer to the
index f7736989dbfe13894e07a0b5f78a54a3fedcdf22..369a44e01058e69557385043509af06a41b584f3 100644 (file)
@@ -128,6 +128,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
   _bfd_elf_merge_sections
 #endif
 
+#ifndef bfd_elfNN_bfd_discard_group
+#define bfd_elfNN_bfd_discard_group bfd_elf_discard_group
+#endif
+
 #ifndef bfd_elfNN_bfd_make_debug_symbol
 #define bfd_elfNN_bfd_make_debug_symbol \
   ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
index 0edb90e34864b312c03b2e0a53aeb2d87b98f99b..5c060ecf58e4a0d8f76fafdabf6e79b6819cda4a 100644 (file)
@@ -173,6 +173,7 @@ msdos_set_section_contents (abfd, section, location, offset, count)
 #define msdos_bfd_relax_section bfd_generic_relax_section
 #define msdos_bfd_gc_sections bfd_generic_gc_sections
 #define msdos_bfd_merge_sections bfd_generic_merge_sections
+#define msdos_bfd_discard_group bfd_generic_discard_group
 #define msdos_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define msdos_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define msdos_bfd_link_add_symbols _bfd_generic_link_add_symbols
index 47f9ef3a1a84cddf7751d19c142fdff9aee67972..5ae994bfd6f91192b316c4974fa8e8cf6c5472d3 100644 (file)
@@ -329,6 +329,7 @@ os9k_sizeof_headers (ignore_abfd, ignore)
 #define os9k_bfd_relax_section bfd_generic_relax_section
 #define os9k_bfd_gc_sections bfd_generic_gc_sections
 #define os9k_bfd_merge_sections bfd_generic_merge_sections
+#define os9k_bfd_discard_group bfd_generic_discard_group
 #define os9k_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define os9k_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define os9k_bfd_link_add_symbols _bfd_generic_link_add_symbols
index 8439f6daafbebc062d41dc44f0a29d062ea5e2a6..4e7f3a3ed7c8f51ac8d54c2701937bba883c5ad5 100644 (file)
@@ -4010,6 +4010,7 @@ ieee_bfd_debug_info_accumulate (abfd, section)
 #define ieee_bfd_relax_section bfd_generic_relax_section
 #define ieee_bfd_gc_sections bfd_generic_gc_sections
 #define ieee_bfd_merge_sections bfd_generic_merge_sections
+#define ieee_bfd_discard_group bfd_generic_discard_group
 #define ieee_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define ieee_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define ieee_bfd_link_add_symbols _bfd_generic_link_add_symbols
index cee736ace7d84418a26fb4befe52f72084066903..4cba29bf7bb938170dbd9c4fbbdd3fca16b18051 100644 (file)
@@ -977,6 +977,7 @@ ihex_sizeof_headers (abfd, exec)
 #define ihex_bfd_relax_section bfd_generic_relax_section
 #define ihex_bfd_gc_sections bfd_generic_gc_sections
 #define ihex_bfd_merge_sections bfd_generic_merge_sections
+#define ihex_bfd_discard_group bfd_generic_discard_group
 #define ihex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define ihex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define ihex_bfd_link_add_symbols _bfd_generic_link_add_symbols
index 106ba8d924779aa639a38dd49caf537d30399657..776dcd62f910ce620da3e11c5504c001a1178446 100644 (file)
@@ -322,6 +322,10 @@ extern boolean _bfd_generic_set_section_contents
   ((boolean (*) \
     PARAMS ((bfd *, struct bfd_link_info *))) \
    bfd_false)
+#define _bfd_nolink_bfd_discard_group \
+  ((boolean (*) \
+    PARAMS ((bfd *, struct sec *))) \
+   bfd_false)
 #define _bfd_nolink_bfd_link_hash_table_create \
   ((struct bfd_link_hash_table *(*) PARAMS ((bfd *))) bfd_nullvoidptr)
 #define _bfd_nolink_bfd_link_hash_table_free \
@@ -589,5 +593,3 @@ extern boolean _bfd_sh_align_load_span
           boolean (*) (bfd *, asection *, PTR, bfd_byte *, bfd_vma),
           PTR, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, boolean *));
 
-/* And more follows */
-
index 0322f8b531031685d5832e782b9ab5925e5dedf4..fa9873f35bc60ac1d0efb9b207f504aaf38ee2a3 100644 (file)
@@ -327,6 +327,10 @@ extern boolean _bfd_generic_set_section_contents
   ((boolean (*) \
     PARAMS ((bfd *, struct bfd_link_info *))) \
    bfd_false)
+#define _bfd_nolink_bfd_discard_group \
+  ((boolean (*) \
+    PARAMS ((bfd *, struct sec *))) \
+   bfd_false)
 #define _bfd_nolink_bfd_link_hash_table_create \
   ((struct bfd_link_hash_table *(*) PARAMS ((bfd *))) bfd_nullvoidptr)
 #define _bfd_nolink_bfd_link_hash_table_free \
@@ -594,14 +598,15 @@ extern boolean _bfd_sh_align_load_span
           boolean (*) (bfd *, asection *, PTR, bfd_byte *, bfd_vma),
           PTR, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, boolean *));
 
-/* And more follows */
-
+/* Extracted from init.c.  */
+/* Extracted from libbfd.c.  */
 boolean
 bfd_write_bigendian_4byte_int PARAMS ((bfd *, unsigned int));
 
 unsigned int
 bfd_log2 PARAMS ((bfd_vma x));
 
+/* Extracted from cache.c.  */
 #define BFD_CACHE_MAX_OPEN 10
 extern bfd *bfd_last_cache;
 
@@ -621,6 +626,7 @@ bfd_open_file PARAMS ((bfd *abfd));
 FILE *
 bfd_cache_lookup_worker PARAMS ((bfd *abfd));
 
+/* Extracted from reloc.c.  */
 #ifdef _BFD_MAKE_TABLE_bfd_reloc_code_real
 
 static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
@@ -1277,6 +1283,7 @@ bfd_generic_get_relocated_section_contents PARAMS ((bfd *abfd,
     boolean relocateable,
     asymbol **symbols));
 
+/* Extracted from archures.c.  */
 extern const bfd_arch_info_type bfd_default_arch_struct;
 boolean
 bfd_default_set_arch_mach PARAMS ((bfd *abfd,
@@ -1290,6 +1297,7 @@ bfd_default_compatible PARAMS ((const bfd_arch_info_type *a,
 boolean
 bfd_default_scan PARAMS ((const struct bfd_arch_info *info, const char *string));
 
+/* Extracted from elf.c.  */
 struct elf_internal_shdr *
 bfd_elf_find_section PARAMS ((bfd *abfd, char *name));
 
index 618dddaee4572dd42e5c48bf8621d6e5bb3b5248..efc2fee268bd3f1a7f82c929d2bda8894089ac6b 100644 (file)
@@ -598,5 +598,3 @@ extern boolean ppc_allocate_toc_section
 extern boolean ppc_process_before_allocation
   PARAMS ((bfd *, struct bfd_link_info *));
 
-/* And more taken from the source .. */
-
index 2e9a7d8c2ee14823d0cdebb9d2c60a2473e1f83b..88b0909829610e5f4db50973d8ec3736d8939c2b 100644 (file)
@@ -602,8 +602,7 @@ extern boolean ppc_allocate_toc_section
 extern boolean ppc_process_before_allocation
   PARAMS ((bfd *, struct bfd_link_info *));
 
-/* And more taken from the source .. */
-
+/* Extracted from coffcode.h.  */
 typedef struct coff_ptr_struct
 {
   /* Remembers the offset from the first symbol in the file for
index 94593830151804fecc42e08edbbf87a41237f412..85adcaa7762683df9d76b89b73ccd10987891a46 100644 (file)
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -3256,6 +3256,7 @@ mmo_canonicalize_reloc (abfd, section, relptr, symbols)
 #define mmo_set_arch_mach bfd_default_set_arch_mach
 #define mmo_bfd_relax_section bfd_generic_relax_section
 #define mmo_bfd_merge_sections bfd_generic_merge_sections
+#define mmo_bfd_discard_group bfd_generic_discard_group
 
 /* objcopy will be upset if we return -1 from bfd_get_reloc_upper_bound by
    using BFD_JUMP_TABLE_RELOCS (_bfd_norelocs) rather than 0.  FIXME: Most
index e8f46261299229ad99694f8298118eb56d4d38f0..e0a83044e91584ab7630230949a5ed56fad87367 100644 (file)
@@ -44,6 +44,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #define nlm_bfd_relax_section bfd_generic_relax_section
 #define nlm_bfd_gc_sections bfd_generic_gc_sections
 #define nlm_bfd_merge_sections bfd_generic_merge_sections
+#define nlm_bfd_discard_group bfd_generic_discard_group
 #define nlm_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define nlm_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define nlm_bfd_link_add_symbols _bfd_generic_link_add_symbols
index 5c2bf5e1ceba8992491aa8c0ea92504fc3323a04..17fc735d77975e83dfad35608380408a437da784 100644 (file)
@@ -1490,6 +1490,7 @@ oasys_sizeof_headers (abfd, exec)
 #define oasys_bfd_relax_section bfd_generic_relax_section
 #define oasys_bfd_gc_sections bfd_generic_gc_sections
 #define oasys_bfd_merge_sections bfd_generic_merge_sections
+#define oasys_bfd_discard_group bfd_generic_discard_group
 #define oasys_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define oasys_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define oasys_bfd_link_add_symbols _bfd_generic_link_add_symbols
index 22043b5f34751715095cbdcf586719965dd62757..5b153bdff0886985fab16dbdb2111294750e95c5 100644 (file)
@@ -469,6 +469,7 @@ ppcboot_bfd_print_private_bfd_data (abfd, farg)
 #define ppcboot_bfd_relax_section bfd_generic_relax_section
 #define ppcboot_bfd_gc_sections bfd_generic_gc_sections
 #define ppcboot_bfd_merge_sections bfd_generic_merge_sections
+#define ppcboot_bfd_discard_group bfd_generic_discard_group
 #define ppcboot_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define ppcboot_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define ppcboot_bfd_link_add_symbols _bfd_generic_link_add_symbols
index 70c7f27d029c5e6f38027da3d705026b9871b1a4..96130b9d3fb2a3e6d2e5b130ad8da75b0f51ec26 100644 (file)
@@ -1378,21 +1378,19 @@ _bfd_strip_section_from_output (info, s)
 
 /*
 FUNCTION
-       bfd_discard_group
+       bfd_generic_discard_group
 
 SYNOPSIS
-       void bfd_discard_group (bfd *abfd, asection *group);
+       boolean bfd_generic_discard_group (bfd *abfd, asection *group);
 
 DESCRIPTION
        Remove all members of @var{group} from the output.
 */
 
-void
-bfd_discard_group (abfd, group)
-     bfd *abfd;
-     asection *group;
+boolean
+bfd_generic_discard_group (abfd, group)
+     bfd *abfd ATTRIBUTE_UNUSED;
+     asection *group ATTRIBUTE_UNUSED;
 {
-  if ((group->flags & SEC_GROUP) != 0
-      && abfd->xvec->flavour == bfd_target_elf_flavour)
-    bfd_elf_discard_group (abfd, group);
+  return true;
 }
index 55c9013572a18e9103819e1cc47723b222a4531b..6bb27f7a22064eccbde0ed9ac3e3b60e72ccf291 100644 (file)
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -6340,6 +6340,7 @@ som_bfd_link_split_section (abfd, sec)
 
 #define som_bfd_gc_sections            bfd_generic_gc_sections
 #define som_bfd_merge_sections         bfd_generic_merge_sections
+#define som_bfd_discard_group          bfd_generic_discard_group
 
 const bfd_target som_vec = {
   "som",                       /* name */
index b556f267379d958874116b6b1fa855e7a9e4856f..e7a27be2ce67c9f4c4efa7e847cf171e0400c0da 100644 (file)
@@ -1270,6 +1270,7 @@ srec_print_symbol (abfd, afile, symbol, how)
 #define srec_bfd_relax_section bfd_generic_relax_section
 #define srec_bfd_gc_sections bfd_generic_gc_sections
 #define srec_bfd_merge_sections bfd_generic_merge_sections
+#define srec_bfd_discard_group bfd_generic_discard_group
 #define srec_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define srec_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define srec_bfd_link_add_symbols _bfd_generic_link_add_symbols
index 7f7f485afc6956a93081648c27f3b8a246a54c6a..6902f4126b623ab416153b5d4e0314e6f616a32e 100644 (file)
@@ -400,7 +400,8 @@ the tokens.
 .CONCAT2 (NAME,_bfd_final_link), \
 .CONCAT2 (NAME,_bfd_link_split_section), \
 .CONCAT2 (NAME,_bfd_gc_sections), \
-.CONCAT2 (NAME,_bfd_merge_sections)
+.CONCAT2 (NAME,_bfd_merge_sections), \
+.CONCAT2 (NAME,_bfd_discard_group)
 .  int      (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
 .  bfd_byte *(*_bfd_get_relocated_section_contents)
 .    PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
@@ -435,6 +436,9 @@ the tokens.
 .  {* Attempt to merge SEC_MERGE sections.  *}
 .  boolean  (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
 .
+.  {* Discard members of a group.  *}
+.  boolean  (*_bfd_discard_group) PARAMS ((bfd *, struct sec *));
+.
 .  {* Routines to handle dynamic symbols and relocs.  *}
 .#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
 .CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
index 4391da1844121576524680e625c24778bf775004..8efd401dbda2e4ffcfc05adeb8a04c23896311b2 100644 (file)
@@ -1005,6 +1005,7 @@ tekhex_print_symbol (abfd, filep, symbol, how)
 #define tekhex_bfd_relax_section bfd_generic_relax_section
 #define tekhex_bfd_gc_sections bfd_generic_gc_sections
 #define tekhex_bfd_merge_sections bfd_generic_merge_sections
+#define tekhex_bfd_discard_group bfd_generic_discard_group
 #define tekhex_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define tekhex_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define tekhex_bfd_link_add_symbols _bfd_generic_link_add_symbols
index e1cd9f7dc5ef261e40aef1115621a2e5095a94bf..297bbe60a4a415f0d0e6846df9c61188de2f883a 100644 (file)
@@ -867,6 +867,7 @@ versados_canonicalize_reloc (abfd, section, relptr, symbols)
 #define versados_bfd_relax_section bfd_generic_relax_section
 #define versados_bfd_gc_sections bfd_generic_gc_sections
 #define versados_bfd_merge_sections bfd_generic_merge_sections
+#define versados_bfd_discard_group bfd_generic_discard_group
 #define versados_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
 #define versados_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
 #define versados_bfd_link_add_symbols _bfd_generic_link_add_symbols
index d2fb16b645da631c19af970027ea3e886ecfe427..60326179b324b6e4e379cec0d0b7edf8bbebf66c 100644 (file)
--- a/bfd/vms.c
+++ b/bfd/vms.c
@@ -133,6 +133,7 @@ static boolean vms_bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
 
 #define vms_make_empty_symbol _bfd_generic_make_empty_symbol
 #define vms_bfd_link_just_syms _bfd_generic_link_just_syms
+#define vms_bfd_discard_group bfd_generic_discard_group
 \f
 /*===========================================================================*/
 
index 0787b8de3e26289e6acb7eda08c43f094f10dfc2..adbc9a1cc3d9542ea5b31b8b889cc68bfd7f72cf 100644 (file)
@@ -98,6 +98,7 @@ extern int lynx_core_file_failing_signal PARAMS ((bfd *abfd));
 #define _bfd_xcoff_bfd_relax_section coff_bfd_relax_section
 #define _bfd_xcoff_bfd_gc_sections coff_bfd_gc_sections
 #define _bfd_xcoff_bfd_merge_sections coff_bfd_merge_sections
+#define _bfd_xcoff_bfd_discard_group bfd_generic_discard_group
 #define _bfd_xcoff_bfd_link_split_section coff_bfd_link_split_section
 
 /* XCOFF archives do not have anything which corresponds to an