Don't force "set" symbols local for PE

gas/
	* read.c (assign_symbol): Don't force "set" symbols local for PE.
gas/testsuite/
	* gas/pe/set.s, * gas/pe/set.d: New test.
	* gas/pe/pe.exp: Run it.
This commit is contained in:
Alan Modra 2014-07-12 17:05:35 +09:30
parent a25eb0280d
commit 76bd66cfb5
6 changed files with 32 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2014-07-12 David Majnemer <david.majnemer@gmail.com>
* read.c (assign_symbol): Don't force "set" symbols local for PE.
2014-07-08 Jiong Wang <jiong.wang@arm.com> 2014-07-08 Jiong Wang <jiong.wang@arm.com>
* config/tc-arm.c (literal_pool): New field "alignment". * config/tc-arm.c (literal_pool): New field "alignment".

View File

@ -3187,7 +3187,7 @@ assign_symbol (char *name, int mode)
symbol_set_frag (symbolP, dummy_frag); symbol_set_frag (symbolP, dummy_frag);
} }
#endif #endif
#ifdef OBJ_COFF #if defined (OBJ_COFF) && !defined (TE_PE)
/* "set" symbols are local unless otherwise specified. */ /* "set" symbols are local unless otherwise specified. */
SF_SET_LOCAL (symbolP); SF_SET_LOCAL (symbolP);
#endif #endif

View File

@ -1,3 +1,8 @@
2014-07-12 David Majnemer <david.majnemer@gmail.com>
* gas/pe/set.s, * gas/pe/set.d: New test.
* gas/pe/pe.exp: Run it.
2014-07-10 Will Newton <will.newton@linaro.org> 2014-07-10 Will Newton <will.newton@linaro.org>
* gas/elf/elf.exp: Remove special handling of arm-elf for * gas/elf/elf.exp: Remove special handling of arm-elf for

View File

@ -36,6 +36,8 @@ run_dump_test "section-align-1"
run_dump_test "section-align-3" run_dump_test "section-align-3"
run_dump_test "section-exclude" run_dump_test "section-exclude"
run_dump_test "set"
# SEH related tests # SEH related tests
# These tests are only for x86_64 targets # These tests are only for x86_64 targets

View File

@ -0,0 +1,11 @@
#nm: --defined-only
#name: set directive in COFF
#
# Ensure that we stick an entry for the left hand side of a set directive
# depending on the name of the left hand side.
#...
.* t _b
#...
.* T _d
#...

View File

@ -0,0 +1,9 @@
L_a:
.long 0
_b = L_a
L_c = L_a
.globl _d
_d = L_a