diff options
author | Rui Ueyama <ruiu@google.com> | 2019-02-11 22:01:32 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2019-02-11 22:01:32 +0000 |
commit | 016833bac2da972c1c9753cde2ff949e06dc5908 (patch) | |
tree | 43b0a42c18163390fcce1622826f28d41cc5dc8c /llvm/lib/CodeGen/MachineVerifier.cpp | |
parent | 72a0f4e8db404d1978138279bfcabceea9446d35 (diff) | |
download | llvm-016833bac2da972c1c9753cde2ff949e06dc5908.zip llvm-016833bac2da972c1c9753cde2ff949e06dc5908.tar.gz llvm-016833bac2da972c1c9753cde2ff949e06dc5908.tar.bz2 |
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
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
0 files changed, 0 insertions, 0 deletions