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),
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));
} _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;