summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-05-11 19:41:28 +0000
committerNick Clifton <nickc@redhat.com>2002-05-11 19:41:28 +0000
commit60d46bdbee0479168ccd85274cbf040b78176920 (patch)
treec1cd724194be6cb08523f840fdd9158d03eb1498
parent1d348d0ec3062644bd751fa710cc3bbf64eab5a7 (diff)
downloadbinutils-gdb-60d46bdbee0479168ccd85274cbf040b78176920.tar.gz
Warn about a description field that is too big.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/stabs.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 6ad85c8e5d9..7745645d072 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2002-05-11 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * stabs.c (s_stab_generic): Warn about a description field that is
+ too big.
+
2002-05-11 Daniel Jacobowitz <drow@mvista.com>
Merge from mainline:
diff --git a/gas/stabs.c b/gas/stabs.c
index 60b03c49941..4c9251f070e 100644
--- a/gas/stabs.c
+++ b/gas/stabs.c
@@ -240,6 +240,14 @@ s_stab_generic (what, stab_secname, stabstr_secname)
other = longint;
desc = get_absolute_expression ();
+
+ if ((desc > 0xffff) || (desc < -0x8000))
+ /* This could happen for example with a source file with a huge
+ number of lines. The only cure is to use a different debug
+ format, probably DWARF. */
+ as_warn (_(".stab%c: description field '%x' too big, maybe you could a different debug format"),
+ what, desc);
+
if (what == 's' || what == 'n')
{
if (*input_line_pointer != ',')