[llvm-commits] [lld] r169718 - in /lld/trunk/lib/Driver: Drivers.cpp Targets.cpp
Michael J. Spencer
bigcheesegs at gmail.com
Sun Dec 9 15:56:37 PST 2012
Author: mspencer
Date: Sun Dec 9 17:56:37 2012
New Revision: 169718
URL: http://llvm.org/viewvc/llvm-project?rev=169718&view=rev
Log:
[Driver] Properly handle -entry for X86 Linux.
Modified:
lld/trunk/lib/Driver/Drivers.cpp
lld/trunk/lib/Driver/Targets.cpp
Modified: lld/trunk/lib/Driver/Drivers.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/Drivers.cpp?rev=169718&r1=169717&r2=169718&view=diff
==============================================================================
--- lld/trunk/lib/Driver/Drivers.cpp (original)
+++ lld/trunk/lib/Driver/Drivers.cpp Sun Dec 9 17:56:37 2012
@@ -118,7 +118,8 @@
if (llvm::opt::Arg *A = _inputArgs->getLastArg(ld::OPT_entry))
newArgs->AddJoinedArg(A, _core.getOption(core::OPT_entry), A->getValue());
else
- newArgs->AddJoinedArg(nullptr, _core.getOption(core::OPT_entry), "start");
+ newArgs->AddJoinedArg(nullptr, _core.getOption(core::OPT_entry),
+ "_start");
if (llvm::opt::Arg *A = _inputArgs->getLastArg(ld::OPT_output))
newArgs->AddJoinedArg(A, _core.getOption(core::OPT_output),
Modified: lld/trunk/lib/Driver/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/Targets.cpp?rev=169718&r1=169717&r2=169718&view=diff
==============================================================================
--- lld/trunk/lib/Driver/Targets.cpp (original)
+++ lld/trunk/lib/Driver/Targets.cpp Sun Dec 9 17:56:37 2012
@@ -26,7 +26,7 @@
class X86LinuxTarget final : public Target {
public:
- X86LinuxTarget(const LinkerOptions &lo) : Target(lo), _woe() {
+ X86LinuxTarget(const LinkerOptions &lo) : Target(lo), _woe(lo._entrySymbol) {
_readerELF.reset(createReaderELF(_roe, _roa));
_readerYAML.reset(createReaderYAML(_roy));
_writer.reset(createWriterELF(_woe));
@@ -63,12 +63,12 @@
} _roy;
struct WOpts : lld::WriterOptionsELF {
- WOpts() {
+ WOpts(StringRef entry) {
_endianness = llvm::support::little;
_is64Bit = false;
_type = llvm::ELF::ET_EXEC;
_machine = llvm::ELF::EM_386;
- _entryPoint = "_start";
+ _entryPoint = entry;
}
} _woe;
More information about the llvm-commits
mailing list