aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/objcopy.c2
-rw-r--r--binutils/objdump.c7
3 files changed, 11 insertions, 4 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index fe5664e..8ab3d7a 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ * objcopy.c (filter_symbols): Use bfd_coff_get_comdat_section
+ to access comdat.
+ * objdump.c (dump_section_header): Likewise.
+
2004-07-15 Aravinda PR <aravindapr@rediffmail.com>
* nlmconv.c (main): Pass map_file argument to link_inputs.
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 44e9331..7fd6711 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -891,7 +891,7 @@ filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms,
keep = (strip_symbols != STRIP_DEBUG
&& strip_symbols != STRIP_UNNEEDED
&& ! convert_debugging);
- else if (bfd_get_section (sym)->comdat)
+ else if (bfd_coff_get_comdat_section (abfd, bfd_get_section (sym)))
/* COMDAT sections store special information in local
symbols, so we cannot risk stripping any of them. */
keep = 1;
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 6c42d3a..683203f 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -331,6 +331,7 @@ dump_section_header (bfd *abfd ATTRIBUTE_UNUSED, asection *section,
if ((section->flags & SEC_LINK_ONCE) != 0)
{
const char *ls;
+ struct coff_comdat_info *comdat;
switch (section->flags & SEC_LINK_DUPLICATES)
{
@@ -351,9 +352,9 @@ dump_section_header (bfd *abfd ATTRIBUTE_UNUSED, asection *section,
}
printf ("%s%s", comma, ls);
- if (section->comdat != NULL)
- printf (" (COMDAT %s %ld)", section->comdat->name,
- section->comdat->symbol);
+ comdat = bfd_coff_get_comdat_section (abfd, section);
+ if (comdat != NULL)
+ printf (" (COMDAT %s %ld)", comdat->name, comdat->symbol);
comma = ", ";
}