llvm-project/lld/test
Rui Ueyama 016833bac2 lld: unquote possibly quoted `EXTERN("symbol")` entry in linker script.
gold accepts quoted strings. binutils requires quoted strings for some
kinds of symbols, e.g.:

  it accepts quoted symbols with @ in name:

  $ echo 'EXTERN("__libc_start_main@@GLIBC_2.2.5")' > a.script
  $ g++ a.script
  /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/crt1.o: In function `_start':
  (.text+0x20): undefined reference to `main'
  collect2: error: ld returned 1 exit status

  but rejects them if unquoted:

  $ echo 'EXTERN(__libc_start_main@@GLIBC_2.2.5)' > a.script
  $ g++ a.script
  a.script: file not recognized: File format not recognized
  collect2: error: ld returned 1 exit status

To maintain compatibility with existing linker scripts support quoted
strings in lld as well.

Patch by Lucian Adrian Grijincu.

Differential Revision: https://reviews.llvm.org/D57987

llvm-svn: 353756
2019-02-11 22:01:32 +00:00
..
COFF Convert CRLF. NFC. 2019-02-11 21:38:20 +00:00
Driver/Inputs
ELF lld: unquote possibly quoted `EXTERN("symbol")` entry in linker script. 2019-02-11 22:01:32 +00:00
MinGW [MinGW] Add --insert-timestamp as complement to the --no-insert-timestamp option 2019-02-06 21:05:29 +00:00
Unit [lit] Rename lld and clang lit configs to end in .py 2017-09-21 17:38:13 +00:00
darwin [Darwin] Do not error on '-lto_library' option 2018-06-13 18:59:14 +00:00
mach-o Make YAML quote forward slashes. 2018-10-12 16:31:20 +00:00
wasm [WebAssembly] Refactor handling of weak undefined functions. NFC. 2019-02-07 22:42:16 +00:00
CMakeLists.txt Use llvm_canonicalize_cmake_booleans for LLVM_LIBXML2_ENABLED [lld] 2019-01-19 00:09:43 +00:00
lit.cfg.py Use llvm_canonicalize_cmake_booleans for LLVM_LIBXML2_ENABLED [lld] 2019-01-19 00:09:43 +00:00
lit.site.cfg.py.in Use llvm_canonicalize_cmake_booleans for LLVM_LIBXML2_ENABLED [lld] 2019-01-19 00:09:43 +00:00