diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-07-12 23:28:33 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-07-12 23:28:33 +0000 |
| commit | 1e52f25d461569ab5ab294bc4d3b057541656d9d (patch) | |
| tree | 6a56cff7d56c0bba6121ee120572b5be44fa8f84 /lld/ELF/Driver.cpp | |
| parent | 46626e1f049f74c445bbf0179f251f6934993630 (diff) | |
| download | bcm5719-llvm-1e52f25d461569ab5ab294bc4d3b057541656d9d.tar.gz bcm5719-llvm-1e52f25d461569ab5ab294bc4d3b057541656d9d.zip | |
Add -m elf32_x86_64.
Patch by H.J. Lu.
This patch adds -m elf32_x86_64 to lld. But it doesn't generate working
x32 binaries.
Differential Revision: http://reviews.llvm.org/D22268
llvm-svn: 275236
Diffstat (limited to 'lld/ELF/Driver.cpp')
| -rw-r--r-- | lld/ELF/Driver.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index fd783ccd6b1..e88a883b16a 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -62,6 +62,7 @@ static std::pair<ELFKind, uint16_t> parseEmulation(StringRef S) { StringSwitch<std::pair<ELFKind, uint16_t>>(S) .Case("aarch64linux", {ELF64LEKind, EM_AARCH64}) .Case("armelf_linux_eabi", {ELF32LEKind, EM_ARM}) + .Case("elf32_x86_64", {ELF32LEKind, EM_X86_64}) .Case("elf32btsmip", {ELF32BEKind, EM_MIPS}) .Case("elf32ltsmip", {ELF32LEKind, EM_MIPS}) .Case("elf32ppc", {ELF32BEKind, EM_PPC}) @@ -512,7 +513,7 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &Args) { LinkerScript<ELFT> LS; Script<ELFT>::X = &LS; - Config->Rela = ELFT::Is64Bits; + Config->Rela = ELFT::Is64Bits || Config->EMachine == EM_X86_64; Config->Mips64EL = (Config->EMachine == EM_MIPS && Config->EKind == ELF64LEKind); |

