https://sourceware.org/bugzilla/show_bug.cgi?id=22267
Bug ID: 22267 Summary: ld.bfd does not accept "foo = ~0xFF" in linker script but accepts "foo = ~ 0xFF" Product: binutils Version: 2.30 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: georgerim at gmail dot com Target Milestone: --- Following linkerscript triggers an error when using "GNU ld (GNU Binutils) 2.29.51.20171006": SECTIONS { . = 0x10000; foo = ~0xFF; } "test.script:3: undefined symbol `~0xFF' referenced in expression" Though when I insert space between `~` and `0xFF`, ld.bfd parses script fine: SECTIONS { . = 0x10000; foo = ~ 0xFF; } It is not clear what is intentional behavior, as it not documented I think, but ld.bfd does not require space in following assignment: "foo = !0xFF". FWIW gold also does not have this "issue", I'll open bug for it too just in case it has unwanted relaxed behavior. -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils