Fix PR17493, attempted output of *GAS `reg' section* symbol
authorAlan Modra <amodra@gmail.com>
Sat, 18 Oct 2014 00:40:53 +0000 (11:10 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 28 Oct 2014 06:21:11 +0000 (16:51 +1030)
commit7cc2a6b6a4c63cba363836475052a71e0387e621
treeab426b002a52db70e7e681220bf2df46619497af
parent04253f276b48227728cac3e4c6df614e161f1e9c
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.
gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/ChangeLog
gas/testsuite/gas/i386/inval-equ-2.l
gas/write.c