aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-03-29 21:34:34 +0000
committerIan Lance Taylor <ian@airs.com>1996-03-29 21:34:34 +0000
commit38d7c0125d0dbdd38f94e3c8756f75e281d92523 (patch)
tree05fcfddafc356b490c133dd1e1c127125807e267 /binutils
parent5a28331f6dc965462a5380c381283b26edd283ca (diff)
downloadgdb-38d7c0125d0dbdd38f94e3c8756f75e281d92523.zip
gdb-38d7c0125d0dbdd38f94e3c8756f75e281d92523.tar.gz
gdb-38d7c0125d0dbdd38f94e3c8756f75e281d92523.tar.bz2
* objdump.c (dump_section_header): Print the SEC_LINK_ONCE flag
and the SEC_LINK_DUPLICATES field.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/objdump.c33
2 files changed, 36 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 1f48218..ddcdae1 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+Fri Mar 29 16:11:33 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * objdump.c (dump_section_header): Print the SEC_LINK_ONCE flag
+ and the SEC_LINK_DUPLICATES field.
+
Fri Mar 29 11:35:55 1996 J.T. Conklin (jtc@lisa.cygnus.com)
* nlmconv.1: Changed to be recognized by catman -w on Solaris.
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 5fc00c9..782a265 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -199,7 +199,7 @@ dump_section_header (abfd, section, ignored)
{
char *comma = "";
- printf ("%3d %-14s%08lx ", section->index,
+ printf ("%3d %-13s %08lx ", section->index,
bfd_get_section_name (abfd, section),
(unsigned long) bfd_section_size (abfd, section));
printf_vma (bfd_get_section_vma (abfd, section));
@@ -232,7 +232,33 @@ dump_section_header (abfd, section, ignored)
PF (SEC_DEBUGGING, "DEBUGGING");
PF (SEC_NEVER_LOAD, "NEVER_LOAD");
PF (SEC_EXCLUDE, "EXCLUDE");
- PF (SEC_SORT_ENTRIES, "SORT ENTRIES");
+ PF (SEC_SORT_ENTRIES, "SORT_ENTRIES");
+
+ if ((section->flags & SEC_LINK_ONCE) != 0)
+ {
+ const char *ls;
+
+ switch (section->flags & SEC_LINK_DUPLICATES)
+ {
+ default:
+ abort ();
+ case SEC_LINK_DUPLICATES_DISCARD:
+ ls = "LINK_ONCE_DISCARD";
+ break;
+ case SEC_LINK_DUPLICATES_ONE_ONLY:
+ ls = "LINK_ONCE_ONE_ONLY";
+ break;
+ case SEC_LINK_DUPLICATES_SAME_SIZE:
+ ls = "LINK_ONCE_SAME_SIZE";
+ break;
+ case SEC_LINK_DUPLICATES_SAME_CONTENTS:
+ ls = "LINK_ONCE_SAME_CONTENTS";
+ break;
+ }
+ printf ("%s%s", comma, ls);
+ comma = ", ";
+ }
+
printf ("\n");
#undef PF
}
@@ -1089,6 +1115,8 @@ disassemble_data (abfd)
sym_name = "*unknown*";
}
}
+ else
+ sym_name = "*unknown*";
printf ("%s", sym_name);
@@ -1328,6 +1356,7 @@ dump_bfd_header (abfd)
PF (BFD_IS_RELAXABLE, "BFD_IS_RELAXABLE");
printf ("\nstart address 0x");
printf_vma (abfd->start_address);
+ printf ("\n");
}
static void