aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffgen.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-10-10 22:49:38 +0000
committerIan Lance Taylor <ian@airs.com>1995-10-10 22:49:38 +0000
commitd7731c7d2cf3918025e6c821f89c139c5886c40c (patch)
treed3a775c496dae94dcac9fb1a67385f8743d5be28 /bfd/coffgen.c
parent5c6725cf5985ece328806c371196dccdc8d51ee5 (diff)
downloadgdb-d7731c7d2cf3918025e6c821f89c139c5886c40c.zip
gdb-d7731c7d2cf3918025e6c821f89c139c5886c40c.tar.gz
gdb-d7731c7d2cf3918025e6c821f89c139c5886c40c.tar.bz2
* coffgen.c (coff_count_linenumbers): Don't count line numbers for
a symbol which is not in a real section. (coff_write_native_symbol): Corresponding change.
Diffstat (limited to 'bfd/coffgen.c')
-rw-r--r--bfd/coffgen.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index d9c58e3..a65776d 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -361,7 +361,11 @@ coff_count_linenumbers (abfd)
{
coff_symbol_type *q = coffsymbol (q_maybe);
- if (q->lineno != NULL)
+ /* The AIX 4.1 compiler can sometimes generate line numbers
+ attached to debugging symbols. We try to simply ignore
+ those here. */
+ if (q->lineno != NULL
+ && q->symbol.section->owner != NULL)
{
/* This symbol has line numbers. Increment the owning
section's linenumber count. */
@@ -894,7 +898,7 @@ coff_write_native_symbol (abfd, symbol, written, string_size_p,
/* If this symbol has an associated line number, we must store the
symbol index in the line number field. We also tag the auxent to
point to the right place in the lineno table. */
- if (lineno && !symbol->done_lineno)
+ if (lineno && !symbol->done_lineno && symbol->symbol.section->owner != NULL)
{
unsigned int count = 0;
lineno[count].u.offset = *written;