Add a testcase for warning on common symbol in archive.
2011-06-07 H.J. Lu <hongjiu.lu@intel.com> * ld-elf/elf.exp: Build symbol3.a and symbol3w.a. * ld-elf/symbol3.s: New. * ld-elf/symbol3w.s: Likewise. * ld-elf/warn3.d: Likewise.
This commit is contained in:
parent
e6455dfbc2
commit
83c5d36fc5
|
@ -1,3 +1,11 @@
|
||||||
|
2011-06-07 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
* ld-elf/elf.exp: Build symbol3.a and symbol3w.a.
|
||||||
|
|
||||||
|
* ld-elf/symbol3.s: New.
|
||||||
|
* ld-elf/symbol3w.s: Likewise.
|
||||||
|
* ld-elf/warn3.d: Likewise.
|
||||||
|
|
||||||
2011-06-02 Nathan Sidwell <nathan@codesourcery.com>
|
2011-06-02 Nathan Sidwell <nathan@codesourcery.com>
|
||||||
|
|
||||||
Adjust tests for zero offset formatting.
|
Adjust tests for zero offset formatting.
|
||||||
|
|
|
@ -40,6 +40,15 @@ if { [is_remote host] } then {
|
||||||
remote_download host merge.ld
|
remote_download host merge.ld
|
||||||
}
|
}
|
||||||
|
|
||||||
|
run_ld_link_tests {
|
||||||
|
{"Build symbol3.a"
|
||||||
|
"" ""
|
||||||
|
{symbol3.s} {} "symbol3.a"}
|
||||||
|
{"Build symbol3w.a"
|
||||||
|
"" ""
|
||||||
|
{symbol3w.s} {} "symbol3w.a"}
|
||||||
|
}
|
||||||
|
|
||||||
set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
|
set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
|
||||||
foreach t $test_list {
|
foreach t $test_list {
|
||||||
# We need to strip the ".d", but can leave the dirname.
|
# We need to strip the ".d", but can leave the dirname.
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
.comm badsym,4
|
|
@ -0,0 +1,4 @@
|
||||||
|
.data
|
||||||
|
.dc.a badsym
|
||||||
|
.section .gnu.warning.badsym,"",%progbits
|
||||||
|
.string "badsym warning"
|
|
@ -0,0 +1,15 @@
|
||||||
|
#source: start.s
|
||||||
|
#ld: tmpdir/symbol3w.o tmpdir/symbol3.a
|
||||||
|
#warning: .*: warning: badsym warning$
|
||||||
|
#readelf: -s
|
||||||
|
#notarget: "sparc64-*-solaris2*" "sparcv9-*-solaris2*"
|
||||||
|
#xfail: arc-*-* d30v-*-* dlx-*-* fr30-*-* frv-*-elf i860-*-* i960-*-*
|
||||||
|
#xfail: iq*-*-* mn10200-*-* moxie-*-* msp*-*-* mt-*-* or32-*-* pj*-*-*
|
||||||
|
# if not using elf32.em, you don't get fancy section handling
|
||||||
|
|
||||||
|
# Check that warnings are generated for the symbols in .gnu.warning
|
||||||
|
# construct and that the symbol still appears as expected.
|
||||||
|
|
||||||
|
#...
|
||||||
|
+[0-9]+: +[0-9a-f]+ +4 +OBJECT +GLOBAL +DEFAULT +[1-9] badsym
|
||||||
|
#pass
|
Loading…
Reference in New Issue