This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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 :


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]