forked from OSchip/llvm-project
Revert "[lld][elf2] Fix hard coded entry address."
This reverts commit r247073. It broke lld :: elf2/basic32be.s lld :: elf2/basic64be.s llvm-svn: 247077
This commit is contained in:
parent
a610cb5ba0
commit
b9fe03d4a9
|
@ -576,11 +576,7 @@ template <class ELFT> void Writer<ELFT>::writeHeader() {
|
|||
auto &FirstObj = cast<ObjectFile<ELFT>>(*Symtab.getFirstELF());
|
||||
EHdr->e_machine = FirstObj.getEMachine();
|
||||
EHdr->e_version = EV_CURRENT;
|
||||
|
||||
llvm::DenseMap<StringRef, Symbol *>::const_iterator Entry =
|
||||
Symtab.getSymbols().find("_start");
|
||||
|
||||
EHdr->e_entry = getSymVA(cast<DefinedRegular<ELFT>>(Entry->second->Body));
|
||||
EHdr->e_entry = 0x401000;
|
||||
EHdr->e_phoff = sizeof(Elf_Ehdr_Impl<ELFT>);
|
||||
EHdr->e_shoff = SectionHeaderOff;
|
||||
EHdr->e_ehsize = sizeof(Elf_Ehdr_Impl<ELFT>);
|
||||
|
|
|
@ -23,7 +23,7 @@ _start:
|
|||
# CHECK-NEXT: Type: Executable (0x2)
|
||||
# CHECK-NEXT: Machine: EM_X86_64 (0x3E)
|
||||
# CHECK-NEXT: Version: 1
|
||||
# CHECK-NEXT: Entry: 0x1000
|
||||
# CHECK-NEXT: Entry: 0x401000
|
||||
# CHECK-NEXT: ProgramHeaderOffset: 0x40
|
||||
# CHECK-NEXT: SectionHeaderOffset: 0x1070
|
||||
# CHECK-NEXT: Flags [ (0x0)
|
||||
|
|
|
@ -23,7 +23,7 @@ _start:
|
|||
# CHECK-NEXT: Type: Executable (0x2)
|
||||
# CHECK-NEXT: Machine: EM_386 (0x3)
|
||||
# CHECK-NEXT: Version: 1
|
||||
# CHECK-NEXT: Entry: 0x1000
|
||||
# CHECK-NEXT: Entry: 0x401000
|
||||
# CHECK-NEXT: ProgramHeaderOffset: 0x34
|
||||
# CHECK-NEXT: SectionHeaderOffset: 0x1058
|
||||
# CHECK-NEXT: Flags [ (0x0)
|
||||
|
|
Loading…
Reference in New Issue