[lld] r250205 - Revert: "Re: [lld] r249752 - Revert: r249728 - Roll back r249726 and r249723 because they broke buildbots."
Hal Finkel via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 13 11:50:29 PDT 2015
Author: hfinkel
Date: Tue Oct 13 13:50:28 2015
New Revision: 250205
URL: http://llvm.org/viewvc/llvm-project?rev=250205&view=rev
Log:
Revert: "Re: [lld] r249752 - Revert: r249728 - Roll back r249726 and r249723 because they broke buildbots."
This has turned out to be unnecessary, and while some ability to set VAStart
will be needed at some point, this is not clearly the right direction.
Modified:
lld/trunk/ELF/Target.cpp
lld/trunk/ELF/Target.h
lld/trunk/ELF/Writer.cpp
lld/trunk/test/elf2/aarch64-relocs.s
lld/trunk/test/elf2/basic-aarch64.s
lld/trunk/test/elf2/basic-mips.s
lld/trunk/test/elf2/basic32be.s
lld/trunk/test/elf2/basic64be.s
lld/trunk/test/elf2/emulation.s
lld/trunk/test/elf2/mips-relocs.s
lld/trunk/test/elf2/ppc64-rel-calls.s
lld/trunk/test/elf2/ppc64-relocs.s
lld/trunk/test/elf2/ppc64-toc-restore.s
Modified: lld/trunk/ELF/Target.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.cpp?rev=250205&r1=250204&r2=250205&view=diff
==============================================================================
--- lld/trunk/ELF/Target.cpp (original)
+++ lld/trunk/ELF/Target.cpp Tue Oct 13 13:50:28 2015
@@ -55,7 +55,6 @@ X86TargetInfo::X86TargetInfo() {
PCRelReloc = R_386_PC32;
GotReloc = R_386_GLOB_DAT;
GotRefReloc = R_386_GOT32;
- VAStart = 0x10000;
}
void X86TargetInfo::writePltEntry(uint8_t *Buf, uint64_t GotEntryAddr,
@@ -110,14 +109,6 @@ X86_64TargetInfo::X86_64TargetInfo() {
GotReloc = R_X86_64_GLOB_DAT;
GotRefReloc = R_X86_64_PC32;
RelativeReloc = R_X86_64_RELATIVE;
-
- // On freebsd x86_64 the first page cannot be mmaped.
- // On linux that is controled by vm.mmap_min_addr. At least on some x86_64
- // installs that is 65536, so the first 15 pages cannot be used.
- // Given that, the smallest value that can be used in here is 0x10000.
- // If using 2MB pages, the smallest page aligned address that works is
- // 0x200000, but it looks like every OS uses 4k pages for executables.
- VAStart = 0x10000;
}
void X86_64TargetInfo::writePltEntry(uint8_t *Buf, uint64_t GotEntryAddr,
@@ -246,8 +237,6 @@ PPC64TargetInfo::PPC64TargetInfo() {
// We need 64K pages (at least under glibc/Linux, the loader won't
// set different permissions on a finer granularity than that).
PageSize = 65536;
-
- VAStart = 0x10000000;
}
static uint64_t getPPC64TocBase() {
@@ -458,7 +447,6 @@ PPCTargetInfo::PPCTargetInfo() {
// PCRelReloc = FIXME
// GotReloc = FIXME
PageSize = 65536;
- VAStart = 0x10000000;
}
void PPCTargetInfo::writePltEntry(uint8_t *Buf, uint64_t GotEntryAddr,
uint64_t PltEntryAddr) const {}
@@ -475,7 +463,6 @@ void PPCTargetInfo::relocateOne(uint8_t
AArch64TargetInfo::AArch64TargetInfo() {
// PCRelReloc = FIXME
// GotReloc = FIXME
- VAStart = 0x400000;
}
void AArch64TargetInfo::writePltEntry(uint8_t *Buf, uint64_t GotEntryAddr,
uint64_t PltEntryAddr) const {}
@@ -554,7 +541,6 @@ MipsTargetInfo::MipsTargetInfo() {
// PCRelReloc = FIXME
// GotReloc = FIXME
PageSize = 65536;
- VAStart = 0x400000;
}
void MipsTargetInfo::writePltEntry(uint8_t *Buf, uint64_t GotEntryAddr,
Modified: lld/trunk/ELF/Target.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Target.h?rev=250205&r1=250204&r2=250205&view=diff
==============================================================================
--- lld/trunk/ELF/Target.h (original)
+++ lld/trunk/ELF/Target.h Tue Oct 13 13:50:28 2015
@@ -21,7 +21,6 @@ class SymbolBody;
class TargetInfo {
public:
unsigned getPageSize() const { return PageSize; }
- uint64_t getVAStart() const { return VAStart; }
unsigned getPCRelReloc() const { return PCRelReloc; }
unsigned getGotReloc() const { return GotReloc; }
unsigned getGotRefReloc() const { return GotRefReloc; }
@@ -41,7 +40,6 @@ public:
protected:
unsigned PageSize = 4096;
- uint64_t VAStart;
unsigned PCRelReloc;
unsigned GotRefReloc;
unsigned GotReloc;
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=250205&r1=250204&r2=250205&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Oct 13 13:50:28 2015
@@ -24,6 +24,15 @@ using namespace llvm::object;
using namespace lld;
using namespace lld::elf2;
+// On freebsd x86_64 the first page cannot be mmaped.
+// On linux that is controled by vm.mmap_min_addr. At least on some x86_64
+// installs that is 65536, so the first 15 pages cannot be used.
+// Given that, the smallest value that can be used in here is 0x10000.
+// If using 2MB pages, the smallest page aligned address that works is
+// 0x200000, but it looks like every OS uses 4k pages for executables.
+// FIXME: This is architecture and OS dependent.
+static const int VAStart = 0x10000;
+
namespace {
static uint32_t toPhdrFlags(uint64_t Flags) {
@@ -65,7 +74,7 @@ private:
bool isOutputDynamic() const {
return !Symtab.getSharedFiles().empty() || Config->Shared;
}
- uintX_t getVAStart() const { return Config->Shared ? 0 : Target->getVAStart(); }
+ uintX_t getVAStart() const { return Config->Shared ? 0 : VAStart; }
std::unique_ptr<llvm::FileOutputBuffer> Buffer;
Modified: lld/trunk/test/elf2/aarch64-relocs.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/aarch64-relocs.s?rev=250205&r1=250204&r2=250205&view=diff
==============================================================================
--- lld/trunk/test/elf2/aarch64-relocs.s (original)
+++ lld/trunk/test/elf2/aarch64-relocs.s Tue Oct 13 13:50:28 2015
@@ -29,7 +29,7 @@ mystr:
#
# CHECK: Disassembly of section .R_AARCH64_ADR_PREL_PG_H121:
# CHECK-NEXT: $x.2:
-# CHECK-NEXT: 401012: 01 00 00 90 adrp x1, #0
+# CHECK-NEXT: 11012: 01 00 00 90 adrp x1, #0
.section .R_AARCH64_ADD_ABS_LO12_NC,"ax", at progbits
add x0, x0, :lo12:.L.str
@@ -43,4 +43,4 @@ mystr:
#
# CHECK: Disassembly of section .R_AARCH64_ADD_ABS_LO12_NC:
# CHECK-NEXT: $x.4:
-# CHECK-NEXT: 40101b: 00 7c 00 91 add x0, x0, #31
+# CHECK-NEXT: 1101b: 00 7c 00 91 add x0, x0, #31
Modified: lld/trunk/test/elf2/basic-aarch64.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/basic-aarch64.s?rev=250205&r1=250204&r2=250205&view=diff
==============================================================================
--- lld/trunk/test/elf2/basic-aarch64.s (original)
+++ lld/trunk/test/elf2/basic-aarch64.s Tue Oct 13 13:50:28 2015
@@ -59,7 +59,7 @@ _start:
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: SHF_EXECINSTR (0x4)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x401000
+# CHECK-NEXT: Address: 0x11000
# CHECK-NEXT: Offset: 0x1000
# CHECK-NEXT: Size: 12
# CHECK-NEXT: Link: 0
@@ -75,7 +75,7 @@ _start:
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: SHF_WRITE (0x1)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x40100C
+# CHECK-NEXT: Address: 0x1100C
# CHECK-NEXT: Offset: 0x100C
# CHECK-NEXT: Size: 0
# CHECK-NEXT: Link: 0
@@ -91,7 +91,7 @@ _start:
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: SHF_WRITE (0x1)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x40100C
+# CHECK-NEXT: Address: 0x1100C
# CHECK-NEXT: Offset: 0x100C
# CHECK-NEXT: Size: 0
# CHECK-NEXT: Link: 0
@@ -140,7 +140,7 @@ _start:
# CHECK-NEXT: }
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Name: $x.0 (41)
-# CHECK-NEXT: Value: 0x401000
+# CHECK-NEXT: Value: 0x11000
# CHECK-NEXT: Size: 0
# CHECK-NEXT: Binding: Local (0x0)
# CHECK-NEXT: Type: None (0x0)
@@ -161,8 +161,8 @@ _start:
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_PHDR (0x6)
# CHECK-NEXT: Offset: 0x40
-# CHECK-NEXT: VirtualAddress: 0x400040
-# CHECK-NEXT: PhysicalAddress: 0x400040
+# CHECK-NEXT: VirtualAddress: 0x10040
+# CHECK-NEXT: PhysicalAddress: 0x10040
# CHECK-NEXT: FileSize: 168
# CHECK-NEXT: MemSize: 168
# CHECK-NEXT: Flags [ (0x4)
@@ -173,8 +173,8 @@ _start:
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_LOAD (0x1)
# CHECK-NEXT: Offset: 0x0
-# CHECK-NEXT: VirtualAddress: 0x400000
-# CHECK-NEXT: PhysicalAddress: 0x400000
+# CHECK-NEXT: VirtualAddress: 0x10000
+# CHECK-NEXT: PhysicalAddress: 0x10000
# CHECK-NEXT: FileSize: 232
# CHECK-NEXT: MemSize: 232
# CHECK-NEXT: Flags [
@@ -185,8 +185,8 @@ _start:
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_LOAD (0x1)
# CHECK-NEXT: Offset: 0x1000
-# CHECK-NEXT: VirtualAddress: 0x401000
-# CHECK-NEXT: PhysicalAddress: 0x401000
+# CHECK-NEXT: VirtualAddress: 0x11000
+# CHECK-NEXT: PhysicalAddress: 0x11000
# CHECK-NEXT: FileSize: 12
# CHECK-NEXT: MemSize: 12
# CHECK-NEXT: Flags [ (0x5)
Modified: lld/trunk/test/elf2/basic-mips.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/basic-mips.s?rev=250205&r1=250204&r2=250205&view=diff
==============================================================================
--- lld/trunk/test/elf2/basic-mips.s (original)
+++ lld/trunk/test/elf2/basic-mips.s Tue Oct 13 13:50:28 2015
@@ -25,7 +25,7 @@ __start:
# CHECK-NEXT: Type: Executable (0x2)
# CHECK-NEXT: Machine: EM_MIPS (0x8)
# CHECK-NEXT: Version: 1
-# CHECK-NEXT: Entry: 0x410000
+# CHECK-NEXT: Entry: 0x20000
# CHECK-NEXT: ProgramHeaderOffset: 0x34
# CHECK-NEXT: SectionHeaderOffset: 0x10074
# CHECK-NEXT: Flags [ (0x0)
@@ -59,7 +59,7 @@ __start:
# CHECK-NEXT: Flags [ (0x2)
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x400094
+# CHECK-NEXT: Address: 0x10094
# CHECK-NEXT: Offset: 0x94
# CHECK-NEXT: Size: 24
# CHECK-NEXT: Link: 0
@@ -74,7 +74,7 @@ __start:
# CHECK-NEXT: Flags [ (0x2)
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x4000B0
+# CHECK-NEXT: Address: 0x100B0
# CHECK-NEXT: Offset: 0xB0
# CHECK-NEXT: Size: 24
# CHECK-NEXT: Link: 0
@@ -90,7 +90,7 @@ __start:
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: SHF_EXECINSTR (0x4)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x410000
+# CHECK-NEXT: Address: 0x20000
# CHECK-NEXT: Offset: 0x10000
# CHECK-NEXT: Size: 12
# CHECK-NEXT: Link: 0
@@ -106,7 +106,7 @@ __start:
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: SHF_WRITE (0x1)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x410010
+# CHECK-NEXT: Address: 0x20010
# CHECK-NEXT: Offset: 0x10010
# CHECK-NEXT: Size: 0
# CHECK-NEXT: Link: 0
@@ -122,7 +122,7 @@ __start:
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: SHF_WRITE (0x1)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x410010
+# CHECK-NEXT: Address: 0x20010
# CHECK-NEXT: Offset: 0x10010
# CHECK-NEXT: Size: 0
# CHECK-NEXT: Link: 0
@@ -171,7 +171,7 @@ __start:
# CHECK-NEXT: }
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Name: __start (7)
-# CHECK-NEXT: Value: 0x410000
+# CHECK-NEXT: Value: 0x20000
# CHECK-NEXT: Size: 0
# CHECK-NEXT: Binding: Global (0x1)
# CHECK-NEXT: Type: None (0x0)
@@ -183,8 +183,8 @@ __start:
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_PHDR (0x6)
# CHECK-NEXT: Offset: 0x34
-# CHECK-NEXT: VirtualAddress: 0x400034
-# CHECK-NEXT: PhysicalAddress: 0x400034
+# CHECK-NEXT: VirtualAddress: 0x10034
+# CHECK-NEXT: PhysicalAddress: 0x10034
# CHECK-NEXT: FileSize: 96
# CHECK-NEXT: MemSize: 96
# CHECK-NEXT: Flags [ (0x4)
@@ -195,8 +195,8 @@ __start:
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_LOAD (0x1)
# CHECK-NEXT: Offset: 0x0
-# CHECK-NEXT: VirtualAddress: 0x400000
-# CHECK-NEXT: PhysicalAddress: 0x400000
+# CHECK-NEXT: VirtualAddress: 0x10000
+# CHECK-NEXT: PhysicalAddress: 0x10000
# CHECK-NEXT: FileSize: 200
# CHECK-NEXT: MemSize: 200
# CHECK-NEXT: Flags [ (0x4)
@@ -207,8 +207,8 @@ __start:
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_LOAD (0x1)
# CHECK-NEXT: Offset: 0x10000
-# CHECK-NEXT: VirtualAddress: 0x410000
-# CHECK-NEXT: PhysicalAddress: 0x410000
+# CHECK-NEXT: VirtualAddress: 0x20000
+# CHECK-NEXT: PhysicalAddress: 0x20000
# CHECK-NEXT: FileSize: 16
# CHECK-NEXT: MemSize: 16
# CHECK-NEXT: Flags [ (0x5)
Modified: lld/trunk/test/elf2/basic32be.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/basic32be.s?rev=250205&r1=250204&r2=250205&view=diff
==============================================================================
--- lld/trunk/test/elf2/basic32be.s (original)
+++ lld/trunk/test/elf2/basic32be.s Tue Oct 13 13:50:28 2015
@@ -23,7 +23,7 @@ _start:
# CHECK-NEXT: Type: Executable (0x2)
# CHECK-NEXT: Machine: EM_PPC (0x14)
# CHECK-NEXT: Version: 1
-# CHECK-NEXT: Entry: 0x10010000
+# CHECK-NEXT: Entry: 0x20000
# CHECK-NEXT: ProgramHeaderOffset: 0x34
# CHECK-NEXT: SectionHeaderOffset: 0x10058
# CHECK-NEXT: Flags [ (0x0)
@@ -58,7 +58,7 @@ _start:
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: SHF_EXECINSTR (0x4)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x10010000
+# CHECK-NEXT: Address: 0x20000
# CHECK-NEXT: Offset: 0x1000
# CHECK-NEXT: Size: 12
# CHECK-NEXT: Link: 0
@@ -74,7 +74,7 @@ _start:
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: SHF_WRITE (0x1)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x1001000C
+# CHECK-NEXT: Address: 0x2000C
# CHECK-NEXT: Offset: 0x1000C
# CHECK-NEXT: Size: 0
# CHECK-NEXT: Link: 0
@@ -90,7 +90,7 @@ _start:
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: SHF_WRITE (0x1)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x1001000C
+# CHECK-NEXT: Address: 0x2000C
# CHECK-NEXT: Offset: 0x1000C
# CHECK-NEXT: Size: 0
# CHECK-NEXT: Link: 0
@@ -131,8 +131,8 @@ _start:
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_PHDR (0x6)
# CHECK-NEXT: Offset: 0x34
-# CHECK-NEXT: VirtualAddress: 0x10000034
-# CHECK-NEXT: PhysicalAddress: 0x10000034
+# CHECK-NEXT: VirtualAddress: 0x10034
+# CHECK-NEXT: PhysicalAddress: 0x10034
# CHECK-NEXT: FileSize: 96
# CHECK-NEXT: MemSize: 96
# CHECK-NEXT: Flags [ (0x4)
@@ -143,8 +143,8 @@ _start:
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_LOAD (0x1)
# CHECK-NEXT: Offset: 0x0
-# CHECK-NEXT: VirtualAddress: 0x10000000
-# CHECK-NEXT: PhysicalAddress: 0x10000000
+# CHECK-NEXT: VirtualAddress: 0x10000
+# CHECK-NEXT: PhysicalAddress: 0x10000
# CHECK-NEXT: FileSize: 148
# CHECK-NEXT: MemSize: 148
# CHECK-NEXT: Flags [
@@ -155,8 +155,8 @@ _start:
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_LOAD (0x1)
# CHECK-NEXT: Offset: 0x1000
-# CHECK-NEXT: VirtualAddress: 0x10010000
-# CHECK-NEXT: PhysicalAddress: 0x10010000
+# CHECK-NEXT: VirtualAddress: 0x20000
+# CHECK-NEXT: PhysicalAddress: 0x20000
# CHECK-NEXT: FileSize: 12
# CHECK-NEXT: MemSize: 12
# CHECK-NEXT: Flags [ (0x5)
Modified: lld/trunk/test/elf2/basic64be.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/basic64be.s?rev=250205&r1=250204&r2=250205&view=diff
==============================================================================
--- lld/trunk/test/elf2/basic64be.s (original)
+++ lld/trunk/test/elf2/basic64be.s Tue Oct 13 13:50:28 2015
@@ -36,7 +36,7 @@ _start:
# CHECK-NEXT: Type: Executable (0x2)
# CHECK-NEXT: Machine: EM_PPC64 (0x15)
# CHECK-NEXT: Version: 1
-# CHECK-NEXT: Entry: 0x10020040
+# CHECK-NEXT: Entry: 0x30040
# CHECK-NEXT: ProgramHeaderOffset: 0x40
# CHECK-NEXT: SectionHeaderOffset: 0x200C8
# CHECK-NEXT: Flags [ (0x0)
@@ -73,7 +73,7 @@ _start:
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: SHF_EXECINSTR (0x4)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x10010000
+# CHECK-NEXT: Address:
# CHECK-NEXT: Offset: 0x10000
# CHECK-NEXT: Size: 12
# CHECK-NEXT: Link: 0
@@ -91,7 +91,7 @@ _start:
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: SHF_WRITE (0x1)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x1001000C
+# CHECK-NEXT: Address: 0x2000C
# CHECK-NEXT: Offset: 0x1000C
# CHECK-NEXT: Size: 0
# CHECK-NEXT: Link: 0
@@ -109,7 +109,7 @@ _start:
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: SHF_WRITE (0x1)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x10020000
+# CHECK-NEXT: Address: 0x30000
# CHECK-NEXT: Offset: 0x20000
# CHECK-NEXT: Size: 32
# CHECK-NEXT: Link: 0
@@ -129,7 +129,7 @@ _start:
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: SHF_WRITE (0x1)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x10020020
+# CHECK-NEXT: Address: 0x30020
# CHECK-NEXT: Offset: 0x20020
# CHECK-NEXT: Size: 32
# CHECK-NEXT: Link: 0
@@ -149,7 +149,7 @@ _start:
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: SHF_WRITE (0x1)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x10020040
+# CHECK-NEXT: Address: 0x30040
# CHECK-NEXT: Offset: 0x20040
# CHECK-NEXT: Size: 24
# CHECK-NEXT: Link: 0
@@ -157,7 +157,7 @@ _start:
# CHECK-NEXT: AddressAlignment: 1
# CHECK-NEXT: EntrySize: 0
# CHECK-NEXT: SectionData (
-# CHECK-NEXT: 0000: 00000000 10010000 00000000 00008000 |................|
+# CHECK-NEXT: 0000: 00000000 00020000 00000000 00008000 |................|
# CHECK-NEXT: 0010: 00000000 00000000 |........|
# CHECK-NEXT: )
# CHECK-NEXT: }
@@ -169,7 +169,7 @@ _start:
# CHECK-NEXT: SHF_ALLOC (0x2)
# CHECK-NEXT: SHF_WRITE (0x1)
# CHECK-NEXT: ]
-# CHECK-NEXT: Address: 0x10020058
+# CHECK-NEXT: Address: 0x30058
# CHECK-NEXT: Offset: 0x20058
# CHECK-NEXT: Size: 0
# CHECK-NEXT: Link: 0
@@ -214,8 +214,8 @@ _start:
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_PHDR (0x6)
# CHECK-NEXT: Offset: 0x40
-# CHECK-NEXT: VirtualAddress: 0x10000040
-# CHECK-NEXT: PhysicalAddress: 0x10000040
+# CHECK-NEXT: VirtualAddress: 0x10040
+# CHECK-NEXT: PhysicalAddress: 0x10040
# CHECK-NEXT: FileSize: 224
# CHECK-NEXT: MemSize: 224
# CHECK-NEXT: Flags [ (0x4)
@@ -226,8 +226,8 @@ _start:
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_LOAD (0x1)
# CHECK-NEXT: Offset: 0x0
-# CHECK-NEXT: VirtualAddress: 0x10000000
-# CHECK-NEXT: PhysicalAddress: 0x10000000
+# CHECK-NEXT: VirtualAddress: 0x10000
+# CHECK-NEXT: PhysicalAddress: 0x10000
# CHECK-NEXT: FileSize: 288
# CHECK-NEXT: MemSize: 288
# CHECK-NEXT: Flags [
@@ -238,8 +238,8 @@ _start:
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_LOAD (0x1)
# CHECK-NEXT: Offset: 0x1000
-# CHECK-NEXT: VirtualAddress: 0x10010000
-# CHECK-NEXT: PhysicalAddress: 0x10010000
+# CHECK-NEXT: VirtualAddress: 0x20000
+# CHECK-NEXT: PhysicalAddress: 0x20000
# CHECK-NEXT: FileSize: 12
# CHECK-NEXT: MemSize: 12
# CHECK-NEXT: Flags [ (0x5)
@@ -251,8 +251,8 @@ _start:
# CHECK-NEXT: ProgramHeader {
# CHECK-NEXT: Type: PT_LOAD (0x1)
# CHECK-NEXT: Offset: 0x2000
-# CHECK-NEXT: VirtualAddress: 0x10020000
-# CHECK-NEXT: PhysicalAddress: 0x10020000
+# CHECK-NEXT: VirtualAddress: 0x30000
+# CHECK-NEXT: PhysicalAddress: 0x30000
# CHECK-NEXT: FileSize: 88
# CHECK-NEXT: MemSize: 88
# CHECK-NEXT: Flags [ (0x6)
Modified: lld/trunk/test/elf2/emulation.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/emulation.s?rev=250205&r1=250204&r2=250205&view=diff
==============================================================================
--- lld/trunk/test/elf2/emulation.s (original)
+++ lld/trunk/test/elf2/emulation.s Tue Oct 13 13:50:28 2015
@@ -78,7 +78,7 @@
# PPC64-NEXT: Type: Executable (0x2)
# PPC64-NEXT: Machine: EM_PPC64 (0x15)
# PPC64-NEXT: Version: 1
-# PPC64-NEXT: Entry: 0x100000B0
+# PPC64-NEXT: Entry: 0x100B0
# PPC64-NEXT: ProgramHeaderOffset: 0x40
# PPC64-NEXT: SectionHeaderOffset: 0x110
# PPC64-NEXT: Flags [ (0x0)
@@ -109,7 +109,7 @@
# PPC-NEXT: Type: Executable (0x2)
# PPC-NEXT: Machine: EM_PPC (0x14)
# PPC-NEXT: Version: 1
-# PPC-NEXT: Entry: 0x10000074
+# PPC-NEXT: Entry: 0x10074
# PPC-NEXT: ProgramHeaderOffset: 0x34
# PPC-NEXT: SectionHeaderOffset: 0xC0
# PPC-NEXT: Flags [ (0x0)
@@ -140,7 +140,7 @@
# MIPS-NEXT: Type: Executable (0x2)
# MIPS-NEXT: Machine: EM_MIPS (0x8)
# MIPS-NEXT: Version: 1
-# MIPS-NEXT: Entry: 0x4000B0
+# MIPS-NEXT: Entry: 0x100B0
# MIPS-NEXT: ProgramHeaderOffset: 0x34
# MIPS-NEXT: SectionHeaderOffset: 0x114
# MIPS-NEXT: Flags [ (0x0)
@@ -164,7 +164,7 @@
# MIPSEL-NEXT: Type: Executable (0x2)
# MIPSEL-NEXT: Machine: EM_MIPS (0x8)
# MIPSEL-NEXT: Version: 1
-# MIPSEL-NEXT: Entry: 0x4000B0
+# MIPSEL-NEXT: Entry: 0x100B0
# MIPSEL-NEXT: ProgramHeaderOffset: 0x34
# MIPSEL-NEXT: SectionHeaderOffset: 0x114
# MIPSEL-NEXT: Flags [ (0x0)
Modified: lld/trunk/test/elf2/mips-relocs.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/mips-relocs.s?rev=250205&r1=250204&r2=250205&view=diff
==============================================================================
--- lld/trunk/test/elf2/mips-relocs.s (original)
+++ lld/trunk/test/elf2/mips-relocs.s Tue Oct 13 13:50:28 2015
@@ -23,9 +23,9 @@ v2:
.word v1 # R_MIPS_32 target v1 addend 0
# CHECK: Contents of section .data:
-# CHECK-NEXT: 420000 00000000 08004200 00004200
-# ^-- v2+4 ^-- v1
+# CHECK-NEXT: 30000 00000000 08000300 00000300
+# ^-- v2+4 ^-- v1
# CHECK: SYMBOL TABLE:
-# CHECK: 00420000 l .data 00000004 v1
-# CHECK: 00420004 g .data 00000008 v2
+# CHECK: 00030000 l .data 00000004 v1
+# CHECK: 00030004 g .data 00000008 v2
Modified: lld/trunk/test/elf2/ppc64-rel-calls.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/ppc64-rel-calls.s?rev=250205&r1=250204&r2=250205&view=diff
==============================================================================
--- lld/trunk/test/elf2/ppc64-rel-calls.s (original)
+++ lld/trunk/test/elf2/ppc64-rel-calls.s Tue Oct 13 13:50:28 2015
@@ -16,9 +16,9 @@ _start:
li 3,42
sc
-# CHECK: 10010000: 38 00 00 01 li 0, 1
-# CHECK: 10010004: 38 60 00 2a li 3, 42
-# CHECK: 10010008: 44 00 00 02 sc
+# CHECK: 20000: 38 00 00 01 li 0, 1
+# CHECK: 20004: 38 60 00 2a li 3, 42
+# CHECK: 20008: 44 00 00 02 sc
.section ".opd","aw"
.global bar
@@ -34,9 +34,9 @@ bar:
blr
# FIXME: The printing here is misleading, the branch offset here is negative.
-# CHECK: 1001000c: 4b ff ff f5 bl .+67108852
-# CHECK: 10010010: 60 00 00 00 nop
-# CHECK: 10010014: 4b ff ff ed bl .+67108844
-# CHECK: 10010018: 60 00 00 00 nop
-# CHECK: 1001001c: 4e 80 00 20 blr
+# CHECK: 2000c: 4b ff ff f5 bl .+67108852
+# CHECK: 20010: 60 00 00 00 nop
+# CHECK: 20014: 4b ff ff ed bl .+67108844
+# CHECK: 20018: 60 00 00 00 nop
+# CHECK: 2001c: 4e 80 00 20 blr
Modified: lld/trunk/test/elf2/ppc64-relocs.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/ppc64-relocs.s?rev=250205&r1=250204&r2=250205&view=diff
==============================================================================
--- lld/trunk/test/elf2/ppc64-relocs.s (original)
+++ lld/trunk/test/elf2/ppc64-relocs.s Tue Oct 13 13:50:28 2015
@@ -25,7 +25,7 @@ _start:
# CHECK: Disassembly of section .R_PPC64_TOC16_LO_DS:
# CHECK: .FR_PPC64_TOC16_LO_DS:
-# CHECK: 1001000c: e8 22 80 00 ld 1, -32768(2)
+# CHECK: 2000c: e8 22 80 00 ld 1, -32768(2)
.section .R_PPC64_TOC16_LO,"ax", at progbits
.globl .FR_PPC64_TOC16_LO
@@ -34,7 +34,7 @@ _start:
# CHECK: Disassembly of section .R_PPC64_TOC16_LO:
# CHECK: .FR_PPC64_TOC16_LO:
-# CHECK: 10010010: 38 22 80 00 addi 1, 2, -32768
+# CHECK: 20010: 38 22 80 00 addi 1, 2, -32768
.section .R_PPC64_TOC16_HI,"ax", at progbits
.globl .FR_PPC64_TOC16_HI
@@ -43,7 +43,7 @@ _start:
# CHECK: Disassembly of section .R_PPC64_TOC16_HI:
# CHECK: .FR_PPC64_TOC16_HI:
-# CHECK: 10010014: 3c 22 10 01 addis 1, 2, 4097
+# CHECK: 20014: 3c 22 00 02 addis 1, 2, 2
.section .R_PPC64_TOC16_HA,"ax", at progbits
.globl .FR_PPC64_TOC16_HA
@@ -52,7 +52,7 @@ _start:
# CHECK: Disassembly of section .R_PPC64_TOC16_HA:
# CHECK: .FR_PPC64_TOC16_HA:
-# CHECK: 10010018: 3c 22 10 02 addis 1, 2, 4098
+# CHECK: 20018: 3c 22 00 03 addis 1, 2, 3
.section .R_PPC64_REL24,"ax", at progbits
.globl .FR_PPC64_REL24
@@ -63,7 +63,7 @@ _start:
# CHECK: Disassembly of section .R_PPC64_REL24:
# CHECK: .FR_PPC64_REL24:
-# CHECK: 1001001c: 48 00 00 04 b .+4
+# CHECK: 2001c: 48 00 00 04 b .+4
.section .R_PPC64_ADDR16_LO,"ax", at progbits
.globl .FR_PPC64_ADDR16_LO
@@ -72,7 +72,7 @@ _start:
# CHECK: Disassembly of section .R_PPC64_ADDR16_LO:
# CHECK: .FR_PPC64_ADDR16_LO:
-# CHECK: 10010020: 38 20 00 00 li 1, 0
+# CHECK: 20020: 38 20 00 00 li 1, 0
.section .R_PPC64_ADDR16_HI,"ax", at progbits
.globl .FR_PPC64_ADDR16_HI
@@ -81,7 +81,7 @@ _start:
# CHECK: Disassembly of section .R_PPC64_ADDR16_HI:
# CHECK: .FR_PPC64_ADDR16_HI:
-# CHECK: 10010024: 38 20 10 01 li 1, 4097
+# CHECK: 20024: 38 20 00 02 li 1, 2
.section .R_PPC64_ADDR16_HA,"ax", at progbits
.globl .FR_PPC64_ADDR16_HA
@@ -90,7 +90,7 @@ _start:
# CHECK: Disassembly of section .R_PPC64_ADDR16_HA:
# CHECK: .FR_PPC64_ADDR16_HA:
-# CHECK: 10010028: 38 20 10 01 li 1, 4097
+# CHECK: 20028: 38 20 00 02 li 1, 2
.section .R_PPC64_ADDR16_HIGHER,"ax", at progbits
.globl .FR_PPC64_ADDR16_HIGHER
@@ -99,7 +99,7 @@ _start:
# CHECK: Disassembly of section .R_PPC64_ADDR16_HIGHER:
# CHECK: .FR_PPC64_ADDR16_HIGHER:
-# CHECK: 1001002c: 38 20 00 00 li 1, 0
+# CHECK: 2002c: 38 20 00 00 li 1, 0
.section .R_PPC64_ADDR16_HIGHERA,"ax", at progbits
.globl .FR_PPC64_ADDR16_HIGHERA
@@ -108,7 +108,7 @@ _start:
# CHECK: Disassembly of section .R_PPC64_ADDR16_HIGHERA:
# CHECK: .FR_PPC64_ADDR16_HIGHERA:
-# CHECK: 10010030: 38 20 00 00 li 1, 0
+# CHECK: 20030: 38 20 00 00 li 1, 0
.section .R_PPC64_ADDR16_HIGHEST,"ax", at progbits
.globl .FR_PPC64_ADDR16_HIGHEST
@@ -117,7 +117,7 @@ _start:
# CHECK: Disassembly of section .R_PPC64_ADDR16_HIGHEST:
# CHECK: .FR_PPC64_ADDR16_HIGHEST:
-# CHECK: 10010034: 38 20 00 00 li 1, 0
+# CHECK: 20034: 38 20 00 00 li 1, 0
.section .R_PPC64_ADDR16_HIGHESTA,"ax", at progbits
.globl .FR_PPC64_ADDR16_HIGHESTA
@@ -126,5 +126,5 @@ _start:
# CHECK: Disassembly of section .R_PPC64_ADDR16_HIGHESTA:
# CHECK: .FR_PPC64_ADDR16_HIGHESTA:
-# CHECK: 10010038: 38 20 00 00 li 1, 0
+# CHECK: 20038: 38 20 00 00 li 1, 0
Modified: lld/trunk/test/elf2/ppc64-toc-restore.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/ppc64-toc-restore.s?rev=250205&r1=250204&r2=250205&view=diff
==============================================================================
--- lld/trunk/test/elf2/ppc64-toc-restore.s (original)
+++ lld/trunk/test/elf2/ppc64-toc-restore.s Tue Oct 13 13:50:28 2015
@@ -13,9 +13,9 @@ _start:
nop
// CHECK: _start:
-// CHECK: 10010000: 48 00 00 21 bl .+32
-// CHECK-NOT: 10010004: 60 00 00 00 nop
-// CHECK: 10010004: e8 41 00 28 ld 2, 40(1)
+// CHECK: 20000: 48 00 00 21 bl .+32
+// CHECK-NOT: 20004: 60 00 00 00 nop
+// CHECK: 20004: e8 41 00 28 ld 2, 40(1)
.global noret
noret:
@@ -23,23 +23,23 @@ noret:
li 5, 7
// CHECK: noret:
-// CHECK: 10010008: 48 00 00 19 bl .+24
-// CHECK: 1001000c: 38 a0 00 07 li 5, 7
+// CHECK: 20008: 48 00 00 19 bl .+24
+// CHECK: 2000c: 38 a0 00 07 li 5, 7
.global noretend
noretend:
bl bar
// CHECK: noretend:
-// CHECK: 10010010: 48 00 00 11 bl .+16
+// CHECK: 20010: 48 00 00 11 bl .+16
.global noretb
noretb:
b bar
// CHECK: noretb:
-// CHECK: 10010014: 48 00 00 0c b .+12
+// CHECK: 20014: 48 00 00 0c b .+12
// CHECK: Disassembly of section .plt:
// CHECK: .plt:
-// CHECK: 10010020:
+// CHECK: 20020:
More information about the llvm-commits
mailing list