LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 30221 - linker script expression parser does not accept '~'
Summary: linker script expression parser does not accept '~'
Status: RESOLVED FIXED
Alias: None
Product: lld
Classification: Unclassified
Component: ELF (show other bugs)
Version: unspecified
Hardware: PC FreeBSD
: P normal
Assignee: Simon Atanasyan
URL:
Keywords:
Depends on:
Blocks: 23214
  Show dependency tree
 
Reported: 2016-08-31 10:27 PDT by emaste
Modified: 2016-09-03 07:50 PDT (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description emaste 2016-08-31 10:27:12 PDT
A bootloader component of FreeBSD/mips64 uses a linker script with an expression containing a bitwise not (~), which lld does not accept:

line 53: malformed number: ~                                                    
  . = ((. + 0x1000) & ~(0x1000 - 1));
                      ^

The script in question can be found at https://svnweb.freebsd.org/base/head/sys/boot/mips/uboot/ldscript.mips?annotate=296183#l53
Comment 1 Simon Atanasyan 2016-09-03 07:50:15 PDT
Fixed at r280546.