Browse Source
PR ld/24008 * testsuite/ld-scripts/defined.exp: Run pr24008. * testsuite/ld-scripts/pr24008.d: New file. * testsuite/ld-scripts/pr24008.map: Likewise. * testsuite/ld-scripts/pr24008.s: Likewise. * testsuite/ld-scripts/pr24008.t: Likewise.gdb-8.3-branch
6 changed files with 35 additions and 0 deletions
@ -0,0 +1,8 @@ |
|||
#ld: -T pr24008.t -Map tmpdir/pr24008.map |
|||
#nm: -B |
|||
#map: pr24008.map |
|||
|
|||
#... |
|||
0+42 A defined |
|||
0+42 A sym1 |
|||
0+43 A sym2 |
|||
@ -0,0 +1,7 @@ |
|||
#... |
|||
Linker script and memory map |
|||
#... |
|||
0x0+42 +sym1 = 0x42 |
|||
0x0+43 +sym2 = 0x43 |
|||
0x0+42 +defined = DEFINED \(sym1\)\?sym1:sym2 |
|||
#... |
|||
@ -0,0 +1,2 @@ |
|||
.text |
|||
.byte 0 |
|||
@ -0,0 +1,8 @@ |
|||
SECTIONS { |
|||
.text : { *(.text) } |
|||
.data : { *(.data) } |
|||
.bss : { *(.bss) *(COMMON) } |
|||
} |
|||
sym1 = 0x42; |
|||
sym2 = 0x43; |
|||
defined = DEFINED (sym1) ? sym1 : sym2; |
|||
Loading…
Reference in new issue