mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
ffe54b3798
When aligning input sections, we are supposed to take the fill pattern from a FILL statement, if there is one in the output section statement. ld/ * ldlang.c (lang_size_sections_1 <lang_input_section_enum>): Use current "fill", not "output_section_statement->fill". ld/testsuite/ * ld-scripts/fill.d, * ld-scripts/fill.t, * ld-scripts/fill_0.s, * ld-scripts/fill_1.s, * ld-scripts/fill_2.s: New test. * ld-scripts/data.exp: Run it.
21 lines
285 B
Raku
21 lines
285 B
Raku
SECTIONS
|
|
{
|
|
.text :
|
|
{
|
|
. += 4;
|
|
*0.o(.text)
|
|
FILL (0x12)
|
|
*1.o(.text)
|
|
. += 1;
|
|
FILL (0x23)
|
|
*2.o(.text)
|
|
FILL (0x003456)
|
|
. += 4;
|
|
FILL (0x00004567000089ab0000cdef00000123)
|
|
. += 8;
|
|
LONG (0xdeadbeef)
|
|
. += 12;
|
|
. += 16;
|
|
} =0xcafebabe
|
|
}
|