PATCH: objdump: Skip linker created section

H. J. Lu hjl@lucon.org
Sun Apr 17 14:37:00 GMT 2005


I checked a objdump patch to support SEC_GROUP. Should objdump skip
linker created section? Readelf doesn't display it.


H.J.
----
2005-04-17  H.J. Lu  <hongjiu.lu@intel.com>

	* objdump.c (dump_section_header): Skip linker created section.

--- binutils/objdump.c.grp	2005-04-04 09:58:38.000000000 -0700
+++ binutils/objdump.c	2005-04-17 07:27:08.000000000 -0700
@@ -300,6 +300,11 @@ dump_section_header (bfd *abfd, asection
   char *comma = "";
   unsigned int opb = bfd_octets_per_byte (abfd);
 
+  /* Ignore linker created section.  See elfNN_ia64_object_p in
+     bfd/elfxx-ia64.c.  */
+  if (section->flags & SEC_LINKER_CREATED)
+    return;
+
   printf ("%3d %-13s %08lx  ", section->index,
 	  bfd_get_section_name (abfd, section),
 	  (unsigned long) bfd_section_size (abfd, section) / opb);
-------------- next part --------------
2005-04-17  H.J. Lu  <hongjiu.lu@intel.com>

	* objdump.c (dump_section_header): Support SEC_GROUP.

--- binutils/objdump.c.grp	2005-04-04 09:58:38.000000000 -0700
+++ binutils/objdump.c	2005-04-17 07:27:08.000000000 -0700
@@ -337,6 +342,7 @@ dump_section_header (bfd *abfd, asection
   if (bfd_get_flavour (abfd) == bfd_target_coff_flavour)
     PF (SEC_COFF_SHARED, "SHARED");
   PF (SEC_THREAD_LOCAL, "THREAD_LOCAL");
+  PF (SEC_GROUP, "GROUP");
 
   if ((section->flags & SEC_LINK_ONCE) != 0)
     {


More information about the Binutils mailing list