https://sourceware.org/bugzilla/show_bug.cgi?id=30865
Bug ID: 30865 Summary: ld: =fillexp different behaviors for hexidecimal literal Product: binutils Version: unspecified Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- https://sourceware.org/binutils/docs/ld/Output-Section-Fill.html https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=2c382fb6f5499e01ce83c221f4b35f39e5b414f0 (Feb 2002) added support for arbitrary length fill patterns, e.g. SECTIONS { .text : { *(.text) }=0x0102030405060708 } A side effect possibly from this commit is that 0x literals have different behaviors from decimal literals and expressions. .text : { *(.text) } =0x90 # set the fill pattern to 0x90909090 .text : { *(.text) } =0x90909090 # set the fill pattern to 0x90909090 .text : { *(.text) } =144 # set the fill pattern to 0x00000090 .text : { *(.text) } =0x90+0 # set the fill pattern to 0x00000090 This has been the case for ~20 years, so probably not worth changing, but I felt obliged to point out this special behavior to warn users about 0x90 0x9090 0x909090 that are shorter than 4 bytes. -- You are receiving this mail because: You are on the CC list for the bug.