This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Patch]: aix/xcoff: add a check for invalid .stabx
- From: Tristan Gingold <gingold at adacore dot com>
- To: binutils <binutils at sourceware dot org>
- Date: Tue, 29 Mar 2011 14:36:03 +0200
- Subject: [Patch]: aix/xcoff: add a check for invalid .stabx
Hi,
the following input:
.csect .text[PR]
.stabx "name___XR_R117b___XEXA:V322=&22",-1,133,0
crashes gas because this .stabx in not within .bs/.es
Instead of crashing, this patch emits an error message.
Ok for trunk ?
Tristan.
gas/
2011-03-29 Tristan Gingold <gingold@adacore.com>
* config/tc-ppc.c (ppc_stabx): Add a check.
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 4396e14..1bbaa63 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -3749,6 +3749,9 @@ ppc_stabx (int ignore ATTRIBUTE_UNUSED)
if (S_GET_STORAGE_CLASS (sym) == C_STSYM) {
+ if (ppc_current_block == NULL)
+ as_bad (_(".stabx of storage class stsym must be within .bs/.es"));
+
symbol_get_tc (sym)->within = ppc_current_block;
/* In this case :