HomePhabricator

[ELF] - Linkerscript: Add `~` as separate math token.

Description

[ELF] - Linkerscript: Add ~ as separate math token.

Previously we did not support following:
foo = ~0xFF;
and had to add space before numeric value:
foo = ~ 0xFF

That was constistent with ld.bfd < 2.30, which shows:
script.txt:3: undefined symbol `~2' referenced in expression,
but inconsistent with gold.

It was fixed for ld.bfd 2.30 as well:
https://sourceware.org/bugzilla/show_bug.cgi?id=22267

Differential revision: https://reviews.llvm.org/D36508

Details

Committed
grimarOct 12 2017, 1:40 AM
Differential Revision
D36508: [ELF] - Linkerscript: Add `~` as separate math token.
Branches
Unknown
Tags
Unknown