[lld] r372651 - [mips] Support elf32btsmipn32_fbsd / elf32ltsmipn32_fbsd emulations
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 13:32:43 PDT 2019
Author: atanasyan
Date: Mon Sep 23 13:32:43 2019
New Revision: 372651
URL: http://llvm.org/viewvc/llvm-project?rev=372651&view=rev
Log:
[mips] Support elf32btsmipn32_fbsd / elf32ltsmipn32_fbsd emulations
Patch by Kyle Evans.
Modified:
lld/trunk/ELF/Driver.cpp
lld/trunk/test/ELF/emulation-mips.s
Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=372651&r1=372650&r2=372651&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Mon Sep 23 13:32:43 2019
@@ -978,7 +978,8 @@ static void readConfigs(opt::InputArgLis
StringRef s = arg->getValue();
std::tie(config->ekind, config->emachine, config->osabi) =
parseEmulation(s);
- config->mipsN32Abi = (s == "elf32btsmipn32" || s == "elf32ltsmipn32");
+ config->mipsN32Abi =
+ (s.startswith("elf32btsmipn32") || s.startswith("elf32ltsmipn32"));
config->emulation = s;
}
Modified: lld/trunk/test/ELF/emulation-mips.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/emulation-mips.s?rev=372651&r1=372650&r2=372651&view=diff
==============================================================================
--- lld/trunk/test/ELF/emulation-mips.s (original)
+++ lld/trunk/test/ELF/emulation-mips.s Mon Sep 23 13:32:43 2019
@@ -90,6 +90,9 @@
# RUN: ld.lld -m elf32btsmipn32 -e _start %tmipsn32 -o %t2mipsn32
# RUN: llvm-readobj --file-headers %t2mipsn32 \
# RUN: | FileCheck -DOSABI=SystemV --check-prefix=MIPSN32 %s
+# RUN: ld.lld -m elf32btsmipn32_fbsd -e _start %tmipsn32 -o %t2mipsn32
+# RUN: llvm-readobj --file-headers %t2mipsn32 \
+# RUN: | FileCheck -DOSABI=FreeBSD --check-prefix=MIPSN32 %s
# RUN: ld.lld %tmipsn32 -e _start -o %t3mipsn32
# RUN: llvm-readobj --file-headers %t3mipsn32 \
# RUN: | FileCheck -DOSABI=SystemV --check-prefix=MIPSN32 %s
@@ -127,6 +130,9 @@
# RUN: ld.lld -m elf32ltsmipn32 -e _start %tmipsn32el -o %t2mipsn32el
# RUN: llvm-readobj --file-headers %t2mipsn32el \
# RUN: | FileCheck -DOSABI=SystemV --check-prefix=MIPSN32EL %s
+# RUN: ld.lld -m elf32ltsmipn32_fbsd -e _start %tmipsn32el -o %t2mipsn32el
+# RUN: llvm-readobj --file-headers %t2mipsn32el \
+# RUN: | FileCheck -DOSABI=FreeBSD --check-prefix=MIPSN32EL %s
# RUN: ld.lld -melf32ltsmipn32 -e _start %tmipsn32el -o %t2mipsn32el
# RUN: llvm-readobj --file-headers %t2mipsn32el \
# RUN: | FileCheck -DOSABI=SystemV --check-prefix=MIPSN32EL %s
More information about the llvm-commits
mailing list