public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Remove bfd_elf_discard_group?
@ 2005-01-31  5:40 Ben Elliston
  2005-01-31 10:56 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Elliston @ 2005-01-31  5:40 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 2754 bytes --]

A discovery while removing #if 0'd code: bfd_elf_discard_group()
collapsed to an unconditional call to abort().  I grepped around the
src/ tree and discovered that no BFD users call this function.

Okay for mainline?

2005-01-31  Ben Elliston  <bje@au.ibm.com>

	* elf-bfd.h (bfd_elf_discard_group): Remove.
	* elf.c (bfd_elf_discard_group): Likewise.
	* elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.

Index: elf-bfd.h
===================================================================
RCS file: /home/bje/src-cvs/src/bfd/elf-bfd.h,v
retrieving revision 1.168
diff -u -p -u -r1.168 elf-bfd.h
--- elf-bfd.h	28 Jan 2005 17:58:23 -0000	1.168
+++ elf-bfd.h	31 Jan 2005 05:39:10 -0000
@@ -1430,8 +1430,6 @@ extern bfd_boolean _bfd_elf_merge_sectio
   (bfd *, struct bfd_link_info *);
 extern bfd_boolean bfd_elf_is_group_section
   (bfd *, const struct bfd_section *);
-extern bfd_boolean bfd_elf_discard_group
-  (bfd *, struct bfd_section *);
 extern void _bfd_elf_section_already_linked
   (bfd *, struct bfd_section *);
 extern void bfd_elf_set_group_contents
Index: elf.c
===================================================================
RCS file: /home/bje/src-cvs/src/bfd/elf.c,v
retrieving revision 1.261
diff -u -p -u -r1.261 elf.c
--- elf.c	25 Jan 2005 10:33:52 -0000	1.261
+++ elf.c	31 Jan 2005 05:39:10 -0000
@@ -664,29 +664,6 @@ bfd_elf_is_group_section (bfd *abfd ATTR
   return elf_next_in_group (sec) != NULL;
 }
 
-bfd_boolean
-bfd_elf_discard_group (bfd *abfd ATTRIBUTE_UNUSED,
-		       asection *group ATTRIBUTE_UNUSED)
-{
-#if 0
-  asection *first = elf_next_in_group (group);
-  asection *s = first;
-
-  while (s != NULL)
-    {
-      s->output_section = bfd_abs_section_ptr;
-      s = elf_next_in_group (s);
-      /* These lists are circular.  */
-      if (s == first)
-	break;
-    }
-#else
-  /* FIXME: Never used. Remove it!  */
-  abort ();
-#endif
-  return TRUE;
-}
-
 /* Make a BFD section from an ELF section.  We store a pointer to the
    BFD section in the bfd_section field of the header.  */
 
Index: elfxx-target.h
===================================================================
RCS file: /home/bje/src-cvs/src/bfd/elfxx-target.h,v
retrieving revision 1.74
diff -u -p -u -r1.74 elfxx-target.h
--- elfxx-target.h	28 Jan 2005 17:58:24 -0000	1.74
+++ elfxx-target.h	31 Jan 2005 05:39:10 -0000
@@ -142,10 +142,6 @@
 #define bfd_elfNN_bfd_is_group_section bfd_elf_is_group_section
 #endif
 
-#ifndef bfd_elfNN_bfd_discard_group
-#define bfd_elfNN_bfd_discard_group bfd_elf_discard_group
-#endif
-
 #ifndef bfd_elfNN_section_already_linked
 #define bfd_elfNN_section_already_linked \
   _bfd_elf_section_already_linked

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Remove bfd_elf_discard_group?
  2005-01-31  5:40 Remove bfd_elf_discard_group? Ben Elliston
@ 2005-01-31 10:56 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2005-01-31 10:56 UTC (permalink / raw)
  To: Ben Elliston; +Cc: binutils

Hi Ben,

> 2005-01-31  Ben Elliston  <bje@au.ibm.com>
> 
> 	* elf-bfd.h (bfd_elf_discard_group): Remove.
> 	* elf.c (bfd_elf_discard_group): Likewise.
> 	* elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.

Approved - please apply.

Cheers
   Nick


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-01-31 10:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-31  5:40 Remove bfd_elf_discard_group? Ben Elliston
2005-01-31 10:56 ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).