llvm-project/lld
Georgii Rymar bb7d2b1780 [LLD][ELF] - Disambiguate "=fillexp" with a primary expression to allow =0x90 /DISCARD/
Fixes https://bugs.llvm.org/show_bug.cgi?id=44903

It is about the following case:

```
SECTIONS {
  .foo : { *(.foo) } =0x90909090
  /DISCARD/ : { *(.bar) }
}
```

Here while parsing the fill expression we treated the
"/" of "/DISCARD/" as operator.

With this change, suggested by Fangrui Song, we do
not allow expressions with operators (e.g. "0x1100 + 0x22")
that are not wrapped into round brackets. It should not
be an issue for users, but helps to resolve parsing ambiguity.

Differential revision: https://reviews.llvm.org/D74687
2020-03-19 12:49:25 +03:00
..
COFF [lld] Fix "loop variable creates a copy" warning 2020-03-16 22:52:49 -07:00
Common Replace MCTargetOptionsCommandFlags.inc and CommandFlags.inc by runtime registration 2020-03-17 14:01:30 +01:00
ELF [LLD][ELF] - Disambiguate "=fillexp" with a primary expression to allow =0x90 /DISCARD/ 2020-03-19 12:49:25 +03:00
MinGW Remove unused Endian.h includes, NFC 2020-03-11 15:45:34 -07:00
cmake/modules
docs [ELF] Simplify sh_addr computation and warn if sh_addr is not a multiple of sh_addralign 2020-03-11 09:35:42 -07:00
include/lld LLD already has a mechanism for caching creation of DWARCContext: 2020-03-06 21:17:07 +03:00
lib Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
test [LLD][ELF] - Disambiguate "=fillexp" with a primary expression to allow =0x90 /DISCARD/ 2020-03-19 12:49:25 +03:00
tools/lld Make it possible to redirect not only errs() but also outs() 2019-11-18 11:18:06 +09:00
unittests Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
utils Python 2/3 compatibility 2019-03-20 07:42:13 +00:00
wasm Remove unused Endian.h includes, NFC 2020-03-11 15:45:34 -07:00
.clang-format
.clang-tidy [lld] Add .clang-tidy to customize readability-identifier-naming.{Member,Parameter,Variable}Case => camelBack 2020-03-09 08:26:41 -07:00
.gitignore
CMakeLists.txt try to unbreak build after 4b6d9ac392 2020-01-16 10:12:35 -05:00
CODE_OWNERS.TXT
LICENSE.TXT Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
README.md

README.md

LLVM Linker (lld)

This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.

lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.

Benchmarking

In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.

It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz

The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f.