aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2014-10-18 11:10:53 +1030
committerAlan Modra <amodra@gmail.com>2014-10-18 23:07:07 +1030
commita841bdf5d3bfb9c687f938be7388597db2e461de (patch)
treeba4ba9cdd89482aca8ebe6eab8569f35763bcc16 /gas/config
parent998a69f46a3770d0f26aec080fcac4865c689739 (diff)
downloadgdb-a841bdf5d3bfb9c687f938be7388597db2e461de.zip
gdb-a841bdf5d3bfb9c687f938be7388597db2e461de.tar.gz
gdb-a841bdf5d3bfb9c687f938be7388597db2e461de.tar.bz2
Fix PR17493, attempted output of *GAS `reg' section* symbol
The write.c change is to make gas report an error if reg_section symbols should leak in future. The tc-i386.c change is the real fix. Note that the error isn't the most helpful, "redefined symbol cannot be used on reloc", but I'm not inclined to improve what is really an internal gas error. reg_section symbols shouldn't leak.. gas/ PR 17493 * write.c (adjust_reloc_syms): Don't allow symbols in reg_section to be reduced to reg_section section symbol. * gas/config/tc-i386.c (i386_finalize_immediate): Reject all reg_section immediates. gas/testsuite/ * gas/i386/inval-equ-2.l: Adjust.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 38e9781..2e34ce3 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -7985,7 +7985,7 @@ i386_finalize_immediate (segT exp_seg ATTRIBUTE_UNUSED, expressionS *exp,
return 0;
}
#endif
- else if (!intel_syntax && exp->X_op == O_register)
+ else if (!intel_syntax && exp_seg == reg_section)
{
if (imm_start)
as_bad (_("illegal immediate register operand %s"), imm_start);