mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
d4e5db4e50
Without setting an image base address and without naming at least .text, this test produces entirely bogus PE output. To be honest, even the ELF output looks odd: .text gets placed at 0x10204, and both foo and bar get associated with .text despite living below its start address. Since neither image base nor .text placement are the subject of this test, specify .text placement explicitly and in the PE case force the image base to zero.
15 lines
184 B
Perl
15 lines
184 B
Perl
SECTIONS
|
|
{
|
|
def1 = DEFINED(foo) ? 0x10 : 0x20;
|
|
def2 = def1;
|
|
. = 0x10001;
|
|
foo = .;
|
|
. += 0x200;
|
|
bar = .;
|
|
. = ALIGN (4);
|
|
frob = .;
|
|
|
|
. = 0x10000;
|
|
.text : { *(.text) }
|
|
}
|