Yet another DEFINED testcase
* ld-scripts/defined6.s, * ld-scripts/defined6.t, * ld-scripts/defined6.d: New test. * ld-scripts/defined.exp: Run it.
This commit is contained in:
parent
8a7fbfc0da
commit
931804de6c
5 changed files with 63 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2014-12-24 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* ld-scripts/defined6.s,
|
||||
* ld-scripts/defined6.t,
|
||||
* ld-scripts/defined6.d: New test.
|
||||
* ld-scripts/defined.exp: Run it.
|
||||
|
||||
2014-12-23 Andrew Burgess <andrew.burgess@embecosm.com>
|
||||
|
||||
* ld-avr/relax-elf-flags-01.d: New file.
|
||||
|
|
|
@ -69,4 +69,7 @@ run_dump_test "defined4"
|
|||
if ![is_aout_format] {
|
||||
run_dump_test "defined5"
|
||||
}
|
||||
if [is_elf_format] {
|
||||
run_dump_test "defined6"
|
||||
}
|
||||
set LDFLAGS "$saved_LDFLAGS"
|
||||
|
|
23
ld/testsuite/ld-scripts/defined6.d
Normal file
23
ld/testsuite/ld-scripts/defined6.d
Normal file
|
@ -0,0 +1,23 @@
|
|||
#source: defined6.s
|
||||
#ld: -T defined6.t
|
||||
#nm: -B
|
||||
#notarget: hppa*-hpux*
|
||||
# hppa64-hpux has a different .comm
|
||||
|
||||
# Check that DEFINED works with various symbol types
|
||||
#...
|
||||
0+1 A common
|
||||
0+1 A common_post
|
||||
0+1 A common_pre
|
||||
0+1 A defined
|
||||
0+1 A defined_post
|
||||
0+1 A defined_pre
|
||||
0+1 A undef
|
||||
0+1 A undef_post
|
||||
0+0 A undef_pre
|
||||
0+1 A undefweak
|
||||
0+1 A undefweak_post
|
||||
0+0 A undefweak_pre
|
||||
0+1 A weak
|
||||
0+1 A weak_post
|
||||
0+1 A weak_pre
|
9
ld/testsuite/ld-scripts/defined6.s
Normal file
9
ld/testsuite/ld-scripts/defined6.s
Normal file
|
@ -0,0 +1,9 @@
|
|||
.globl defined
|
||||
defined == 1
|
||||
.globl undef
|
||||
.comm common,1
|
||||
.weak weak
|
||||
weak == 2
|
||||
.weak undefweak
|
||||
.data
|
||||
.dc.a undefweak
|
21
ld/testsuite/ld-scripts/defined6.t
Normal file
21
ld/testsuite/ld-scripts/defined6.t
Normal file
|
@ -0,0 +1,21 @@
|
|||
SECTIONS
|
||||
{
|
||||
.text : { *(.text) }
|
||||
.data : { *(.data) }
|
||||
.bss : { *(.bss) *(COMMON) }
|
||||
}
|
||||
defined_pre = DEFINED (defined);
|
||||
defined = 1;
|
||||
defined_post = DEFINED (defined);
|
||||
undef_pre = DEFINED (undef);
|
||||
undef = 1;
|
||||
undef_post = DEFINED (undef);
|
||||
common_pre = DEFINED (common);
|
||||
common = 1;
|
||||
common_post = DEFINED (common);
|
||||
weak_pre = DEFINED (weak);
|
||||
weak = 1;
|
||||
weak_post = DEFINED (weak);
|
||||
undefweak_pre = DEFINED (undefweak);
|
||||
undefweak = 1;
|
||||
undefweak_post = DEFINED (undefweak);
|
Loading…
Reference in a new issue