summaryrefslogtreecommitdiff
path: root/ld/ldmisc.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2004-07-02 01:39:32 +0000
committerH.J. Lu <hjl@lucon.org>2004-07-02 01:39:32 +0000
commit194c6a485705a44ae266ea23a88fd1e080b2ff72 (patch)
tree161af8c021daee3a76998f07f16cb60281ac8398 /ld/ldmisc.c
parent12861f5026e0a9de37a147d589275720609c35fa (diff)
downloadbinutils-redhat-194c6a485705a44ae266ea23a88fd1e080b2ff72.tar.gz
bfd/
2004-07-01 H.J. Lu <hongjiu.lu@intel.com> * bfd.c (bfd_get_section_ident): New. * elflink.c (elf_link_read_relocs_from_section): Call bfd_get_section_ident to identify the section when reporting error. (_bfd_elf_link_output_relocs): Likewise. (elf_link_output_extsym): Likewise. (elf_link_input_bfd): Likewise. (bfd_elf_gc_record_vtinherit): Likewise. * bfd-in2.h: Regenerated. ld/ 2004-07-01 H.J. Lu <hongjiu.lu@intel.com> * ldmisc.c (vfinfo): Call bfd_get_section_ident to identify the section.
Diffstat (limited to 'ld/ldmisc.c')
-rw-r--r--ld/ldmisc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ld/ldmisc.c b/ld/ldmisc.c
index def598d639..3e8b3717e5 100644
--- a/ld/ldmisc.c
+++ b/ld/ldmisc.c
@@ -241,6 +241,7 @@ vfinfo (FILE *fp, const char *fmt, va_list arg)
const char *functionname;
unsigned int linenumber;
bfd_boolean discard_last;
+ char *sec_name;
abfd = va_arg (arg, bfd *);
section = va_arg (arg, asection *);
@@ -269,7 +270,11 @@ vfinfo (FILE *fp, const char *fmt, va_list arg)
}
}
- lfinfo (fp, "%B(%s+0x%v)", abfd, section->name, offset);
+ sec_name = bfd_get_section_ident (section);
+ lfinfo (fp, "%B(%s+0x%v)", abfd,
+ sec_name ? sec_name : section->name, offset);
+ if (sec_name)
+ free (sec_name);
discard_last = TRUE;
if (bfd_find_nearest_line (abfd, section, asymbols, offset,