[lld] r249957 - ELF2: Write .interp section on the first page in the exectuable.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 13 09:17:58 PDT 2015
On Mon, Oct 12, 2015 at 8:23 PM, Sean Silva <chisophugis at gmail.com> wrote:
> -// 0x130A0 - (0x12000 + 2) - 4 = 4250
> -// 0x130A0 - (0x12006 + 2) - 4 = 4244
> -// 0x130A8 - (0x1200c + 2) - 4 = 4246
> +// 0x110A0 - (0x11000 + 2) - 4 = 4250
> +// 0x110A0 - (0x11006 + 2) - 4 = 4244
> +// 0x110A8 - (0x1100c + 2) - 4 = 4246
>
> This math is not correct.
>
Fixed in r250171.
>
> -- Sean Silva
>
>
>
> On Sat, Oct 10, 2015 at 4:25 PM, Rui Ueyama via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> Author: ruiu
>> Date: Sat Oct 10 18:25:39 2015
>> New Revision: 249957
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=249957&view=rev
>> Log:
>> ELF2: Write .interp section on the first page in the exectuable.
>>
>> Previously, we reserved the first page for the program header, so no
>> sections would be written to very beginning of the output file.
>> FreeBSD requires .interp section be exist on the first page, so that
>> was not good.
>>
>> This patch calculates the size of the program header and then assign
>> addresses to the sections. Now the first section is located next to
>> the program header. Because the first section is .interp, it's very
>> likely to be on the first page.
>>
>> Modified:
>> lld/trunk/ELF/Writer.cpp
>> lld/trunk/test/elf2/aarch64-data-relocs.s
>> lld/trunk/test/elf2/basic-mips.s
>> lld/trunk/test/elf2/comdat.s
>> lld/trunk/test/elf2/discard-locals.s
>> lld/trunk/test/elf2/discard-none.s
>> lld/trunk/test/elf2/dynamic-reloc-index.s
>> lld/trunk/test/elf2/emulation.s
>> lld/trunk/test/elf2/got.s
>> lld/trunk/test/elf2/local-dynamic.s
>> lld/trunk/test/elf2/local-got-shared.s
>> lld/trunk/test/elf2/local-got.s
>> lld/trunk/test/elf2/local.s
>> lld/trunk/test/elf2/plt-i686.s
>> lld/trunk/test/elf2/plt.s
>> lld/trunk/test/elf2/pre_init_fini_array.s
>> lld/trunk/test/elf2/program-header-layout.s
>> lld/trunk/test/elf2/relative-dynamic-reloc.s
>> lld/trunk/test/elf2/relocation-i686.s
>> lld/trunk/test/elf2/relocation-local.s
>> lld/trunk/test/elf2/relocation.s
>> lld/trunk/test/elf2/shared.s
>> lld/trunk/test/elf2/string-table.s
>> lld/trunk/test/elf2/symbols.s
>>
>> Modified: lld/trunk/ELF/Writer.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/ELF/Writer.cpp (original)
>> +++ lld/trunk/ELF/Writer.cpp Sat Oct 10 18:25:39 2015
>> @@ -329,6 +329,10 @@ static void addCommonSymbols(std::vector
>>
>> // Create output section objects and add them to OutputSections.
>> template <class ELFT> void Writer<ELFT>::createSections() {
>> + // .interp needs to be on the first page in the output file.
>> + if (needsInterpSection())
>> + OutputSections.push_back(Out<ELFT>::Interp);
>> +
>> SmallDenseMap<SectionKey<ELFT::Is64Bits>, OutputSection<ELFT> *> Map;
>>
>> OutputSections.push_back(Out<ELFT>::Bss);
>> @@ -414,8 +418,6 @@ template <class ELFT> void Writer<ELFT>:
>>
>> OutputSections.push_back(Out<ELFT>::SymTab);
>> if (needsDynamicSections()) {
>> - if (needsInterpSection())
>> - OutputSections.push_back(Out<ELFT>::Interp);
>> OutputSections.push_back(Out<ELFT>::DynSymTab);
>> OutputSections.push_back(Out<ELFT>::HashTab);
>> OutputSections.push_back(Out<ELFT>::Dynamic);
>> @@ -465,8 +467,23 @@ template <class ELFT> void Writer<ELFT>:
>> phdrSet(&PhdrPhdr, PT_PHDR, PF_R, FileOff, VA, /*Align=*/8);
>>
>> // Reserve space for Phdrs.
>> - FileOff = RoundUpToAlignment(FileOff, Target->getPageSize());
>> - VA = RoundUpToAlignment(VA, Target->getPageSize());
>> + int NumPhdrs = 2; // 2 for PhdrPhdr and FileHeaderPhdr
>> + if (needsInterpSection())
>> + ++NumPhdrs;
>> + if (needsDynamicSections())
>> + ++NumPhdrs;
>> + uintX_t Last = PF_R;
>> + for (OutputSectionBase<ELFT::Is64Bits> *Sec : OutputSections) {
>> + if (!Sec->getSize() || !needsPhdr<ELFT>(Sec))
>> + continue;
>> + uintX_t Flags = toPhdrFlags(Sec->getFlags());
>> + if (Last != Flags) {
>> + Last = Flags;
>> + ++NumPhdrs;
>> + }
>> + }
>> + FileOff += sizeof(Elf_Phdr) * NumPhdrs;
>> + VA += sizeof(Elf_Phdr) * NumPhdrs;
>>
>> if (needsInterpSection())
>> Phdrs.push_back(&InterpPhdr);
>> @@ -525,6 +542,13 @@ template <class ELFT> void Writer<ELFT>:
>> PhdrPhdr.p_filesz = sizeof(Elf_Phdr) * Phdrs.size();
>> PhdrPhdr.p_memsz = sizeof(Elf_Phdr) * Phdrs.size();
>>
>> + // If nothing was merged into the file header PT_LOAD, set the size
>> correctly.
>> + if (FileHeaderPhdr.p_filesz == Target->getPageSize()) {
>> + uint64_t Size = sizeof(Elf_Ehdr) + sizeof(Elf_Phdr) * Phdrs.size();
>> + FileHeaderPhdr.p_filesz = Size;
>> + FileHeaderPhdr.p_memsz = Size;
>> + }
>> +
>> // Add space for section headers.
>> FileOff = RoundUpToAlignment(FileOff, ELFT::Is64Bits ? 8 : 4);
>> SectionHeaderOff = FileOff;
>> @@ -566,13 +590,6 @@ template <class ELFT> void Writer<ELFT>:
>> EHdr->e_shnum = getNumSections();
>> EHdr->e_shstrndx = Out<ELFT>::StrTab->getSectionIndex();
>>
>> - // If nothing was merged into the file header PT_LOAD, set the size
>> correctly.
>> - if (FileHeaderPhdr.p_filesz == Target->getPageSize()) {
>> - uint64_t Size = sizeof(Elf_Ehdr) + sizeof(Elf_Phdr) * Phdrs.size();
>> - FileHeaderPhdr.p_filesz = Size;
>> - FileHeaderPhdr.p_memsz = Size;
>> - }
>> -
>> auto PHdrs = reinterpret_cast<Elf_Phdr *>(Buf + EHdr->e_phoff);
>> for (Elf_Phdr *PH : Phdrs)
>> *PHdrs++ = *PH;
>>
>> Modified: lld/trunk/test/elf2/aarch64-data-relocs.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/aarch64-data-relocs.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/aarch64-data-relocs.s (original)
>> +++ lld/trunk/test/elf2/aarch64-data-relocs.s Sat Oct 10 18:25:39 2015
>> @@ -14,16 +14,16 @@
>>
>> // CHECK: Disassembly of section .R_AARCH64_ABS16:
>> // CHECK-NEXT: $d.0:
>> -// CHECK-NEXT: 2000: 0c 00 .short
>> +// CHECK-NEXT: 1000: 0c 00 .short
>> // ^-- A = 0xc
>>
>> // CHECK-NEXT: Disassembly of section .R_AARCH64_ABS32:
>> // CHECK-NEXT: $d.1:
>> -// CHECK-NEXT: 2002: 18 00 00 00 .word
>> +// CHECK-NEXT: 1002: 18 00 00 00 .word
>> // ^-- A = 0x18
>>
>> // CHECK-NEXT: Disassembly of section .R_AARCH64_ABS64:
>> // CHECK-NEXT: $d.2:
>> -// CHECK-NEXT: 2006: 24 00 00 00 .word
>> +// CHECK-NEXT: 1006: 24 00 00 00 .word
>> // ^-- A = 0x24
>> -// CHECK-NEXT: 200a: 00 00 00 00 .word
>> +// CHECK-NEXT: 100a: 00 00 00 00 .word
>>
>> Modified: lld/trunk/test/elf2/basic-mips.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/basic-mips.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/basic-mips.s (original)
>> +++ lld/trunk/test/elf2/basic-mips.s Sat Oct 10 18:25:39 2015
>> @@ -25,9 +25,9 @@ __start:
>> # CHECK-NEXT: Type: Executable (0x2)
>> # CHECK-NEXT: Machine: EM_MIPS (0x8)
>> # CHECK-NEXT: Version: 1
>> -# CHECK-NEXT: Entry: 0x420000
>> +# CHECK-NEXT: Entry: 0x410000
>> # CHECK-NEXT: ProgramHeaderOffset: 0x34
>> -# CHECK-NEXT: SectionHeaderOffset: 0x20074
>> +# CHECK-NEXT: SectionHeaderOffset: 0x10074
>> # CHECK-NEXT: Flags [ (0x0)
>> # CHECK-NEXT: ]
>> # CHECK-NEXT: HeaderSize: 52
>> @@ -59,8 +59,8 @@ __start:
>> # CHECK-NEXT: Flags [ (0x2)
>> # CHECK-NEXT: SHF_ALLOC (0x2)
>> # CHECK-NEXT: ]
>> -# CHECK-NEXT: Address: 0x410000
>> -# CHECK-NEXT: Offset: 0x1000
>> +# CHECK-NEXT: Address: 0x400094
>> +# CHECK-NEXT: Offset: 0x94
>> # CHECK-NEXT: Size: 24
>> # CHECK-NEXT: Link: 0
>> # CHECK-NEXT: Info: 0
>> @@ -74,8 +74,8 @@ __start:
>> # CHECK-NEXT: Flags [ (0x2)
>> # CHECK-NEXT: SHF_ALLOC (0x2)
>> # CHECK-NEXT: ]
>> -# CHECK-NEXT: Address: 0x410018
>> -# CHECK-NEXT: Offset: 0x10018
>> +# CHECK-NEXT: Address: 0x4000B0
>> +# CHECK-NEXT: Offset: 0xB0
>> # CHECK-NEXT: Size: 24
>> # CHECK-NEXT: Link: 0
>> # CHECK-NEXT: Info: 0
>> @@ -90,8 +90,8 @@ __start:
>> # CHECK-NEXT: SHF_ALLOC (0x2)
>> # CHECK-NEXT: SHF_EXECINSTR (0x4)
>> # CHECK-NEXT: ]
>> -# CHECK-NEXT: Address: 0x420000
>> -# CHECK-NEXT: Offset: 0x2000
>> +# CHECK-NEXT: Address: 0x410000
>> +# CHECK-NEXT: Offset: 0x10000
>> # CHECK-NEXT: Size: 12
>> # CHECK-NEXT: Link: 0
>> # CHECK-NEXT: Info: 0
>> @@ -106,8 +106,8 @@ __start:
>> # CHECK-NEXT: SHF_ALLOC (0x2)
>> # CHECK-NEXT: SHF_WRITE (0x1)
>> # CHECK-NEXT: ]
>> -# CHECK-NEXT: Address: 0x420010
>> -# CHECK-NEXT: Offset: 0x20010
>> +# CHECK-NEXT: Address: 0x410010
>> +# CHECK-NEXT: Offset: 0x10010
>> # CHECK-NEXT: Size: 0
>> # CHECK-NEXT: Link: 0
>> # CHECK-NEXT: Info: 0
>> @@ -122,8 +122,8 @@ __start:
>> # CHECK-NEXT: SHF_ALLOC (0x2)
>> # CHECK-NEXT: SHF_WRITE (0x1)
>> # CHECK-NEXT: ]
>> -# CHECK-NEXT: Address: 0x420010
>> -# CHECK-NEXT: Offset: 0x20010
>> +# CHECK-NEXT: Address: 0x410010
>> +# CHECK-NEXT: Offset: 0x10010
>> # CHECK-NEXT: Size: 0
>> # CHECK-NEXT: Link: 0
>> # CHECK-NEXT: Info: 0
>> @@ -137,7 +137,7 @@ __start:
>> # CHECK-NEXT: Flags [ (0x0)
>> # CHECK-NEXT: ]
>> # CHECK-NEXT: Address: 0x0
>> -# CHECK-NEXT: Offset: 0x20010
>> +# CHECK-NEXT: Offset: 0x10010
>> # CHECK-NEXT: Size: 32
>> # CHECK-NEXT: Link: 7
>> # CHECK-NEXT: Info: 1
>> @@ -151,7 +151,7 @@ __start:
>> # CHECK-NEXT: Flags [ (0x0)
>> # CHECK-NEXT: ]
>> # CHECK-NEXT: Address: 0x0
>> -# CHECK-NEXT: Offset: 0x20030
>> +# CHECK-NEXT: Offset: 0x10030
>> # CHECK-NEXT: Size: 66
>> # CHECK-NEXT: Link: 0
>> # CHECK-NEXT: Info: 0
>> @@ -171,7 +171,7 @@ __start:
>> # CHECK-NEXT: }
>> # CHECK-NEXT: Symbol {
>> # CHECK-NEXT: Name: __start (7)
>> -# CHECK-NEXT: Value: 0x420000
>> +# CHECK-NEXT: Value: 0x410000
>> # CHECK-NEXT: Size: 0
>> # CHECK-NEXT: Binding: Global (0x1)
>> # CHECK-NEXT: Type: None (0x0)
>> @@ -197,8 +197,8 @@ __start:
>> # CHECK-NEXT: Offset: 0x0
>> # CHECK-NEXT: VirtualAddress: 0x400000
>> # CHECK-NEXT: PhysicalAddress: 0x400000
>> -# CHECK-NEXT: FileSize: 65584
>> -# CHECK-NEXT: MemSize: 65584
>> +# CHECK-NEXT: FileSize: 200
>> +# CHECK-NEXT: MemSize: 200
>> # CHECK-NEXT: Flags [ (0x4)
>> # CHECK-NEXT: PF_R (0x4)
>> # CHECK-NEXT: ]
>> @@ -206,9 +206,9 @@ __start:
>> # CHECK-NEXT: }
>> # CHECK-NEXT: ProgramHeader {
>> # CHECK-NEXT: Type: PT_LOAD (0x1)
>> -# CHECK-NEXT: Offset: 0x2000
>> -# CHECK-NEXT: VirtualAddress: 0x420000
>> -# CHECK-NEXT: PhysicalAddress: 0x420000
>> +# CHECK-NEXT: Offset: 0x10000
>> +# CHECK-NEXT: VirtualAddress: 0x410000
>> +# CHECK-NEXT: PhysicalAddress: 0x410000
>> # CHECK-NEXT: FileSize: 16
>> # CHECK-NEXT: MemSize: 16
>> # CHECK-NEXT: Flags [ (0x5)
>>
>> Modified: lld/trunk/test/elf2/comdat.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/comdat.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/comdat.s (original)
>> +++ lld/trunk/test/elf2/comdat.s Sat Oct 10 18:25:39 2015
>> @@ -11,7 +11,7 @@ foo:
>>
>> // CHECK: Disassembly of section .text2:
>> // CHECK-NEXT: foo:
>> -// CHECK-NEXT: 2000: {{.*}} nop
>> +// CHECK-NEXT: 1000: {{.*}} nop
>> // CHECK-NOT: nop
>>
>> .section bar, "ax"
>> @@ -19,10 +19,10 @@ foo:
>>
>> // CHECK: Disassembly of section bar:
>> // CHECK-NEXT: bar:
>> -// 0x2000 - 0x2001 - 5 = -6
>> -// 0 - 0x2006 - 5 = -8203
>> -// CHECK-NEXT: 2001: {{.*}} callq -6
>> -// CHECK-NEXT: 2006: {{.*}} callq -8203
>> +// 0x1000 - 0x1001 - 5 = -6
>> +// 0 - 0x1006 - 5 = -8203
>> +// CHECK-NEXT: 1001: {{.*}} callq -6
>> +// CHECK-NEXT: 1006: {{.*}} callq -4107
>>
>> .section .text3,"axG", at progbits,zed,comdat,unique,0
>>
>>
>> Modified: lld/trunk/test/elf2/discard-locals.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/discard-locals.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/discard-locals.s (original)
>> +++ lld/trunk/test/elf2/discard-locals.s Sat Oct 10 18:25:39 2015
>> @@ -42,7 +42,7 @@ _start:
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: _start
>> -// CHECK-NEXT: Value: 0x11000
>> +// CHECK-NEXT: Value: 0x100B0
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Global
>> // CHECK-NEXT: Type: None
>>
>> Modified: lld/trunk/test/elf2/discard-none.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/discard-none.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/discard-none.s (original)
>> +++ lld/trunk/test/elf2/discard-none.s Sat Oct 10 18:25:39 2015
>> @@ -40,7 +40,7 @@
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: .Lmyothervar
>> -// CHECK-NEXT: Value: 0x102C
>> +// CHECK-NEXT: Value: 0x14C
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Local
>> // CHECK-NEXT: Type: None
>> @@ -49,7 +49,7 @@
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: .Lmyvar
>> -// CHECK-NEXT: Value: 0x102C
>> +// CHECK-NEXT: Value: 0x14C
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Local
>> // CHECK-NEXT: Type: None
>>
>> Modified: lld/trunk/test/elf2/dynamic-reloc-index.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/dynamic-reloc-index.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/dynamic-reloc-index.s (original)
>> +++ lld/trunk/test/elf2/dynamic-reloc-index.s Sat Oct 10 18:25:39 2015
>> @@ -8,7 +8,7 @@
>>
>> // CHECK: Relocations [
>> // CHECK-NEXT: Section ({{.*}}) .rela.dyn {
>> -// CHECK-NEXT: 0x12000 R_X86_64_64 bar 0x0
>> +// CHECK-NEXT: 0x11000 R_X86_64_64 bar 0x0
>> // CHECK-NEXT: }
>> // CHECK-NEXT: ]
>>
>>
>> Modified: lld/trunk/test/elf2/emulation.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/emulation.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/emulation.s (original)
>> +++ lld/trunk/test/elf2/emulation.s Sat Oct 10 18:25:39 2015
>> @@ -16,9 +16,9 @@
>> # X86-64-NEXT: Type: Executable (0x2)
>> # X86-64-NEXT: Machine: EM_X86_64 (0x3E)
>> # X86-64-NEXT: Version: 1
>> -# X86-64-NEXT: Entry: 0x11000
>> +# X86-64-NEXT: Entry: 0x100B0
>> # X86-64-NEXT: ProgramHeaderOffset: 0x40
>> -# X86-64-NEXT: SectionHeaderOffset: 0x1060
>> +# X86-64-NEXT: SectionHeaderOffset: 0x110
>> # X86-64-NEXT: Flags [ (0x0)
>> # X86-64-NEXT: ]
>> # X86-64-NEXT: HeaderSize: 64
>> @@ -47,9 +47,9 @@
>> # X86-NEXT: Type: Executable (0x2)
>> # X86-NEXT: Machine: EM_386 (0x3)
>> # X86-NEXT: Version: 1
>> -# X86-NEXT: Entry: 0x11000
>> +# X86-NEXT: Entry: 0x10074
>> # X86-NEXT: ProgramHeaderOffset: 0x34
>> -# X86-NEXT: SectionHeaderOffset: 0x104C
>> +# X86-NEXT: SectionHeaderOffset: 0xC0
>> # X86-NEXT: Flags [ (0x0)
>> # X86-NEXT: ]
>> # X86-NEXT: HeaderSize: 52
>> @@ -78,9 +78,9 @@
>> # PPC64-NEXT: Type: Executable (0x2)
>> # PPC64-NEXT: Machine: EM_PPC64 (0x15)
>> # PPC64-NEXT: Version: 1
>> -# PPC64-NEXT: Entry: 0x10010000
>> +# PPC64-NEXT: Entry: 0x100000B0
>> # PPC64-NEXT: ProgramHeaderOffset: 0x40
>> -# PPC64-NEXT: SectionHeaderOffset: 0x10060
>> +# PPC64-NEXT: SectionHeaderOffset: 0x110
>> # PPC64-NEXT: Flags [ (0x0)
>> # PPC64-NEXT: ]
>> # PPC64-NEXT: HeaderSize: 64
>> @@ -109,9 +109,9 @@
>> # PPC-NEXT: Type: Executable (0x2)
>> # PPC-NEXT: Machine: EM_PPC (0x14)
>> # PPC-NEXT: Version: 1
>> -# PPC-NEXT: Entry: 0x10010000
>> +# PPC-NEXT: Entry: 0x10000074
>> # PPC-NEXT: ProgramHeaderOffset: 0x34
>> -# PPC-NEXT: SectionHeaderOffset: 0x1004C
>> +# PPC-NEXT: SectionHeaderOffset: 0xC0
>> # PPC-NEXT: Flags [ (0x0)
>> # PPC-NEXT: ]
>> # PPC-NEXT: HeaderSize: 52
>> @@ -140,9 +140,9 @@
>> # MIPS-NEXT: Type: Executable (0x2)
>> # MIPS-NEXT: Machine: EM_MIPS (0x8)
>> # MIPS-NEXT: Version: 1
>> -# MIPS-NEXT: Entry: 0x410030
>> +# MIPS-NEXT: Entry: 0x4000B0
>> # MIPS-NEXT: ProgramHeaderOffset: 0x34
>> -# MIPS-NEXT: SectionHeaderOffset: 0x10094
>> +# MIPS-NEXT: SectionHeaderOffset: 0x114
>> # MIPS-NEXT: Flags [ (0x0)
>> # MIPS-NEXT: ]
>>
>> @@ -164,9 +164,9 @@
>> # MIPSEL-NEXT: Type: Executable (0x2)
>> # MIPSEL-NEXT: Machine: EM_MIPS (0x8)
>> # MIPSEL-NEXT: Version: 1
>> -# MIPSEL-NEXT: Entry: 0x410030
>> +# MIPSEL-NEXT: Entry: 0x4000B0
>> # MIPSEL-NEXT: ProgramHeaderOffset: 0x34
>> -# MIPSEL-NEXT: SectionHeaderOffset: 0x10094
>> +# MIPSEL-NEXT: SectionHeaderOffset: 0x114
>> # MIPSEL-NEXT: Flags [ (0x0)
>> # MIPSEL-NEXT: ]
>>
>>
>> Modified: lld/trunk/test/elf2/got.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/got.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/got.s (original)
>> +++ lld/trunk/test/elf2/got.s Sat Oct 10 18:25:39 2015
>> @@ -12,7 +12,7 @@
>> // CHECK-NEXT: SHF_ALLOC
>> // CHECK-NEXT: SHF_WRITE
>> // CHECK-NEXT: ]
>> -// CHECK-NEXT: Address: 0x130A0
>> +// CHECK-NEXT: Address: 0x120A0
>> // CHECK-NEXT: Offset:
>> // CHECK-NEXT: Size: 16
>> // CHECK-NEXT: Link: 0
>> @@ -21,22 +21,22 @@
>>
>> // CHECK: Relocations [
>> // CHECK-NEXT: Section ({{.*}}) .rela.dyn {
>> -// CHECK-NEXT: 0x130A0 R_X86_64_GLOB_DAT bar 0x0
>> -// CHECK-NEXT: 0x130A8 R_X86_64_GLOB_DAT zed 0x0
>> +// CHECK-NEXT: 0x120A0 R_X86_64_GLOB_DAT bar 0x0
>> +// CHECK-NEXT: 0x120A8 R_X86_64_GLOB_DAT zed 0x0
>> // CHECK-NEXT: }
>> // CHECK-NEXT: ]
>>
>>
>> // Unfortunately FileCheck can't do math, so we have to check for
>> explicit
>> // values:
>> -// 0x130A0 - (0x12000 + 2) - 4 = 4250
>> -// 0x130A0 - (0x12006 + 2) - 4 = 4244
>> -// 0x130A8 - (0x1200c + 2) - 4 = 4246
>> +// 0x110A0 - (0x11000 + 2) - 4 = 4250
>> +// 0x110A0 - (0x11006 + 2) - 4 = 4244
>> +// 0x110A8 - (0x1100c + 2) - 4 = 4246
>>
>> // DISASM: _start:
>> -// DISASM-NEXT: 12000: {{.*}} jmpq *4250(%rip)
>> -// DISASM-NEXT: 12006: {{.*}} jmpq *4244(%rip)
>> -// DISASM-NEXT: 1200c: {{.*}} jmpq *4246(%rip)
>> +// DISASM-NEXT: 11000: {{.*}} jmpq *4250(%rip)
>> +// DISASM-NEXT: 11006: {{.*}} jmpq *4244(%rip)
>> +// DISASM-NEXT: 1100c: {{.*}} jmpq *4246(%rip)
>>
>> .global _start
>> _start:
>>
>> Modified: lld/trunk/test/elf2/local-dynamic.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/local-dynamic.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/local-dynamic.s (original)
>> +++ lld/trunk/test/elf2/local-dynamic.s Sat Oct 10 18:25:39 2015
>> @@ -16,7 +16,7 @@
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: blah
>> -// CHECK-NEXT: Value: 0x1050
>> +// CHECK-NEXT: Value: 0x170
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Local
>> // CHECK-NEXT: Type: None
>> @@ -25,7 +25,7 @@
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: foo
>> -// CHECK-NEXT: Value: 0x1050
>> +// CHECK-NEXT: Value: 0x170
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Local
>> // CHECK-NEXT: Type: None
>> @@ -34,7 +34,7 @@
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: goo
>> -// CHECK-NEXT: Value: 0x1050
>> +// CHECK-NEXT: Value: 0x170
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Local
>> // CHECK-NEXT: Type: None
>> @@ -43,7 +43,7 @@
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: _start
>> -// CHECK-NEXT: Value: 0x1050
>> +// CHECK-NEXT: Value: 0x170
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Global
>> // CHECK-NEXT: Type: None
>> @@ -64,7 +64,7 @@
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: _start@
>> -// CHECK-NEXT: Value: 0x1050
>> +// CHECK-NEXT: Value: 0x170
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Global
>> // CHECK-NEXT: Type: None
>>
>> Modified: lld/trunk/test/elf2/local-got-shared.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/local-got-shared.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/local-got-shared.s (original)
>> +++ lld/trunk/test/elf2/local-got-shared.s Sat Oct 10 18:25:39 2015
>> @@ -11,12 +11,12 @@ bar:
>> foo:
>> nop
>>
>> -// 0x3090 - 0x2000 - 5 = 4235
>> +// 0x2090 - 0x1000 - 5 = 4235
>> // DISASM: bar:
>> -// DISASM-NEXT: 2000: {{.*}} callq 4235
>> +// DISASM-NEXT: 1000: {{.*}} callq 4235
>>
>> // DISASM: foo:
>> -// DISASM-NEXT: 2005: {{.*}} nop
>> +// DISASM-NEXT: 1005: {{.*}} nop
>>
>> // CHECK: Name: .got
>> // CHECK-NEXT: Type: SHT_PROGBITS
>> @@ -24,12 +24,12 @@ foo:
>> // CHECK-NEXT: SHF_ALLOC
>> // CHECK-NEXT: SHF_WRITE
>> // CHECK-NEXT: ]
>> -// CHECK-NEXT: Address: 0x3090
>> +// CHECK-NEXT: Address: 0x2090
>> // CHECK-NEXT: Offset:
>> // CHECK-NEXT: Size: 8
>>
>> // CHECK: Relocations [
>> // CHECK-NEXT: Section ({{.*}}) .rela.dyn {
>> -// CHECK-NEXT: 0x3090 R_X86_64_RELATIVE - 0x2005
>> +// CHECK-NEXT: 0x2090 R_X86_64_RELATIVE - 0x1005
>> // CHECK-NEXT: }
>> // CHECK-NEXT: ]
>>
>> Modified: lld/trunk/test/elf2/local-got.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/local-got.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/local-got.s (original)
>> +++ lld/trunk/test/elf2/local-got.s Sat Oct 10 18:25:39 2015
>> @@ -14,14 +14,14 @@ _start:
>> foo:
>> nop
>>
>> -// 0x130A0 - 0x12000 - 5 = 4251
>> -// 0x130A8 - 0x12005 - 5 = 4254
>> +// 0x120A0 - 0x11000 - 5 = 4251
>> +// 0x120A8 - 0x11005 - 5 = 4254
>> // DISASM: _start:
>> -// DISASM-NEXT: 12000: {{.*}} callq 4251
>> -// DISASM-NEXT: 12005: {{.*}} callq 4254
>> +// DISASM-NEXT: 11000: {{.*}} callq 4251
>> +// DISASM-NEXT: 11005: {{.*}} callq 4254
>>
>> // DISASM: foo:
>> -// DISASM-NEXT: 1200a: {{.*}} nop
>> +// DISASM-NEXT: 1100a: {{.*}} nop
>>
>> // CHECK: Name: .got
>> // CHECK-NEXT: Type: SHT_PROGBITS
>> @@ -29,7 +29,7 @@ foo:
>> // CHECK-NEXT: SHF_ALLOC
>> // CHECK-NEXT: SHF_WRITE
>> // CHECK-NEXT: ]
>> -// CHECK-NEXT: Address: 0x130A0
>> +// CHECK-NEXT: Address: 0x120A0
>> // CHECK-NEXT: Offset:
>> // CHECK-NEXT: Size: 16
>> // CHECK-NEXT: Link: 0
>> @@ -38,11 +38,11 @@ foo:
>> // CHECK-NEXT: EntrySize: 0
>> // CHECK-NEXT: SectionData (
>> // 0x1200a in little endian
>> -// CHECK-NEXT: 0000: 00000000 00000000 0A200100 00000000
>> +// CHECK-NEXT: 0000: 00000000 00000000 0A100100 00000000
>> // CHECK-NEXT: )
>>
>> // CHECK: Relocations [
>> // CHECK-NEXT: Section ({{.*}}) .rela.dyn {
>> -// CHECK-NEXT: 0x130A0 R_X86_64_GLOB_DAT bar 0x0
>> +// CHECK-NEXT: 0x120A0 R_X86_64_GLOB_DAT bar 0x0
>> // CHECK-NEXT: }
>> // CHECK-NEXT: ]
>>
>> Modified: lld/trunk/test/elf2/local.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/local.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/local.s (original)
>> +++ lld/trunk/test/elf2/local.s Sat Oct 10 18:25:39 2015
>> @@ -37,7 +37,7 @@
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: blah
>> -// CHECK-NEXT: Value: 0x11000
>> +// CHECK-NEXT: Value: 0x100B0
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Local
>> // CHECK-NEXT: Type: None
>> @@ -46,7 +46,7 @@
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: foo
>> -// CHECK-NEXT: Value: 0x11000
>> +// CHECK-NEXT: Value: 0x100B0
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Local
>> // CHECK-NEXT: Type: None
>> @@ -55,7 +55,7 @@
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: goo
>> -// CHECK-NEXT: Value: 0x11000
>> +// CHECK-NEXT: Value: 0x100B0
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Local
>> // CHECK-NEXT: Type: None
>> @@ -64,7 +64,7 @@
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: _start
>> -// CHECK-NEXT: Value: 0x11000
>> +// CHECK-NEXT: Value: 0x100B0
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Global
>> // CHECK-NEXT: Type: None
>>
>> Modified: lld/trunk/test/elf2/plt-i686.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/plt-i686.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/plt-i686.s (original)
>> +++ lld/trunk/test/elf2/plt-i686.s Sat Oct 10 18:25:39 2015
>> @@ -12,7 +12,7 @@
>> // CHECK-NEXT: SHF_ALLOC
>> // CHECK-NEXT: SHF_EXECINSTR
>> // CHECK-NEXT: ]
>> -// CHECK-NEXT: Address: 0x12010
>> +// CHECK-NEXT: Address: 0x11010
>> // CHECK-NEXT: Offset:
>> // CHECK-NEXT: Size: 16
>> // CHECK-NEXT: Link: 0
>> @@ -21,34 +21,34 @@
>>
>> // CHECK: Relocations [
>> // CHECK-NEXT: Section ({{.*}}) .rel.dyn {
>> -// CHECK-NEXT: 0x13050 R_386_GLOB_DAT bar 0x0
>> -// CHECK-NEXT: 0x13054 R_386_GLOB_DAT zed 0x0
>> +// CHECK-NEXT: 0x12050 R_386_GLOB_DAT bar 0x0
>> +// CHECK-NEXT: 0x12054 R_386_GLOB_DAT zed 0x0
>> // CHECK-NEXT: }
>> // CHECK-NEXT: ]
>>
>> // Unfortunately FileCheck can't do math, so we have to check for
>> explicit
>> // values:
>>
>> -// 0x12010 - (0x12000 + 1) - 4 = 11
>> -// 0x12010 - (0x12005 + 1) - 4 = 2
>> -// 0x12018 - (0x1200a + 1) - 4 = 9
>> +// 0x11010 - (0x11000 + 1) - 4 = 11
>> +// 0x11010 - (0x11005 + 1) - 4 = 2
>> +// 0x11018 - (0x1100a + 1) - 4 = 9
>>
>> // DISASM: _start:
>> -// DISASM-NEXT: 12000: e9 0b 00 00 00 jmp 11
>> -// DISASM-NEXT: 12005: e9 06 00 00 00 jmp 6
>> -// DISASM-NEXT: 1200a: e9 09 00 00 00 jmp 9
>> +// DISASM-NEXT: 11000: e9 0b 00 00 00 jmp 11
>> +// DISASM-NEXT: 11005: e9 06 00 00 00 jmp 6
>> +// DISASM-NEXT: 1100a: e9 09 00 00 00 jmp 9
>>
>> -// 0x13050 = 77904
>> -// 0x13054 = 77908
>> +// 0x12050 = 73808
>> +// 0x12054 = 73812
>>
>> // DISASM: Disassembly of section .plt:
>> // DISASM-NEXT: .plt:
>> -// DISASM-NEXT: 12010: ff 25 {{.*}} jmpl *77904
>> -// DISASM-NEXT: 12016: 90 nop
>> -// DISASM-NEXT: 12017: 90 nop
>> -// DISASM-NEXT: 12018: ff 25 {{.*}} jmpl *77908
>> -// DISASM-NEXT: 1201e: 90 nop
>> -// DISASM-NEXT: 1201f: 90 nop
>> +// DISASM-NEXT: 11010: ff 25 {{.*}} jmpl *73808
>> +// DISASM-NEXT: 11016: 90 nop
>> +// DISASM-NEXT: 11017: 90 nop
>> +// DISASM-NEXT: 11018: ff 25 {{.*}} jmpl *73812
>> +// DISASM-NEXT: 1101e: 90 nop
>> +// DISASM-NEXT: 1101f: 90 nop
>>
>> .global _start
>> _start:
>>
>> Modified: lld/trunk/test/elf2/plt.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/plt.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/plt.s (original)
>> +++ lld/trunk/test/elf2/plt.s Sat Oct 10 18:25:39 2015
>> @@ -12,7 +12,7 @@
>> // CHECK-NEXT: SHF_ALLOC
>> // CHECK-NEXT: SHF_EXECINSTR
>> // CHECK-NEXT: ]
>> -// CHECK-NEXT: Address: 0x2020
>> +// CHECK-NEXT: Address: 0x1020
>> // CHECK-NEXT: Offset:
>> // CHECK-NEXT: Size: 24
>> // CHECK-NEXT: Link: 0
>> @@ -21,35 +21,35 @@
>>
>> // CHECK: Relocations [
>> // CHECK-NEXT: Section ({{.*}}) .rela.dyn {
>> -// CHECK-NEXT: 0x30A0 R_X86_64_GLOB_DAT bar 0x0
>> -// CHECK-NEXT: 0x30A8 R_X86_64_GLOB_DAT zed 0x0
>> -// CHECK-NEXT: 0x30B0 R_X86_64_GLOB_DAT _start 0x0
>> +// CHECK-NEXT: 0x20A0 R_X86_64_GLOB_DAT bar 0x0
>> +// CHECK-NEXT: 0x20A8 R_X86_64_GLOB_DAT zed 0x0
>> +// CHECK-NEXT: 0x20B0 R_X86_64_GLOB_DAT _start 0x0
>> // CHECK-NEXT: }
>> // CHECK-NEXT: ]
>>
>> // Unfortunately FileCheck can't do math, so we have to check for
>> explicit
>> // values:
>>
>> -// 0x12020 - (0x12000 + 1) - 4 = 27
>> -// 0x12020 - (0x12005 + 1) - 4 = 22
>> -// 0x12028 - (0x1200a + 1) - 4 = 25
>> +// 0x11020 - (0x11000 + 1) - 4 = 27
>> +// 0x11020 - (0x11005 + 1) - 4 = 22
>> +// 0x11028 - (0x1100a + 1) - 4 = 25
>>
>> // DISASM: _start:
>> -// DISASM-NEXT: 2000: e9 {{.*}} jmp 27
>> -// DISASM-NEXT: 2005: e9 {{.*}} jmp 22
>> -// DISASM-NEXT: 200a: e9 {{.*}} jmp 25
>> +// DISASM-NEXT: 1000: e9 {{.*}} jmp 27
>> +// DISASM-NEXT: 1005: e9 {{.*}} jmp 22
>> +// DISASM-NEXT: 100a: e9 {{.*}} jmp 25
>>
>> -// 0x130A0 - 0x12026 = 4218
>> -// 0x130A8 - 0x1202e = 4218
>> +// 0x120A0 - 0x11026 = 4218
>> +// 0x120A8 - 0x1102e = 4218
>>
>> // DISASM: Disassembly of section .plt:
>> // DISASM-NEXT: .plt:
>> -// DISASM-NEXT: 2020: ff 25 {{.*}} jmpq *4218(%rip)
>> -// DISASM-NEXT: 2026: 90 nop
>> -// DISASM-NEXT: 2027: 90 nop
>> -// DISASM-NEXT: 2028: ff 25 {{.*}} jmpq *4218(%rip)
>> -// DISASM-NEXT: 202e: 90 nop
>> -// DISASM-NEXT: 202f: 90 nop
>> +// DISASM-NEXT: 1020: ff 25 {{.*}} jmpq *4218(%rip)
>> +// DISASM-NEXT: 1026: 90 nop
>> +// DISASM-NEXT: 1027: 90 nop
>> +// DISASM-NEXT: 1028: ff 25 {{.*}} jmpq *4218(%rip)
>> +// DISASM-NEXT: 102e: 90 nop
>> +// DISASM-NEXT: 102f: 90 nop
>>
>> .global _start
>> _start:
>>
>> Modified: lld/trunk/test/elf2/pre_init_fini_array.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/pre_init_fini_array.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/pre_init_fini_array.s (original)
>> +++ lld/trunk/test/elf2/pre_init_fini_array.s Sat Oct 10 18:25:39 2015
>> @@ -63,7 +63,7 @@ _start:
>> // CHECK-NEXT: ]
>>
>> // CHECK: Name: __fini_array_end
>> -// CHECK-NEXT: Value: 0x1301B
>> +// CHECK-NEXT: Value: 0x1201B
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Local
>> // CHECK-NEXT: Type: None
>> @@ -81,7 +81,7 @@ _start:
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: __init_array_end
>> -// CHECK-NEXT: Value: 0x13008
>> +// CHECK-NEXT: Value: 0x12008
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Local
>> // CHECK-NEXT: Type: None
>> @@ -99,7 +99,7 @@ _start:
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: __preinit_array_end
>> -// CHECK-NEXT: Value: 0x13011
>> +// CHECK-NEXT: Value: 0x12011
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Local
>> // CHECK-NEXT: Type: None
>> @@ -125,16 +125,16 @@ _start:
>> // CHECK: FINI_ARRAYSZ [[FINI_SIZE]] (bytes)
>>
>>
>> -// 0x13008 - (0x12000 + 5) = 4099
>> -// 0x13011 - (0x12005 + 5) = 4103
>> -// 0x13000 - (0x1200a + 5) = 4081
>> -// 0x13008 - (0x1200f + 5) = 4084
>> -// 0x13011 - (0x12014 + 5) = 4088
>> -// 0x1301B - (0x12019 + 5) = 4093
>> +// 0x12008 - (0x11000 + 5) = 4099
>> +// 0x12011 - (0x11005 + 5) = 4103
>> +// 0x12000 - (0x1100a + 5) = 4081
>> +// 0x12008 - (0x1100f + 5) = 4084
>> +// 0x12011 - (0x11014 + 5) = 4088
>> +// 0x1201B - (0x11019 + 5) = 4093
>> // DISASM: _start:
>> -// DISASM-NEXT: 12000: e8 {{.*}} callq 4099
>> -// DISASM-NEXT: 12005: e8 {{.*}} callq 4103
>> -// DISASM-NEXT: 1200a: e8 {{.*}} callq 4081
>> -// DISASM-NEXT: 1200f: e8 {{.*}} callq 4084
>> -// DISASM-NEXT: 12014: e8 {{.*}} callq 4088
>> -// DISASM-NEXT: 12019: e8 {{.*}} callq 4093
>> +// DISASM-NEXT: 11000: e8 {{.*}} callq 4099
>> +// DISASM-NEXT: 11005: e8 {{.*}} callq 4103
>> +// DISASM-NEXT: 1100a: e8 {{.*}} callq 4081
>> +// DISASM-NEXT: 1100f: e8 {{.*}} callq 4084
>> +// DISASM-NEXT: 11014: e8 {{.*}} callq 4088
>> +// DISASM-NEXT: 11019: e8 {{.*}} callq 4093
>>
>> Modified: lld/trunk/test/elf2/program-header-layout.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/program-header-layout.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/program-header-layout.s (original)
>> +++ lld/trunk/test/elf2/program-header-layout.s Sat Oct 10 18:25:39 2015
>> @@ -23,7 +23,7 @@ _start:
>> # CHECK-NEXT: SHF_ALLOC
>> # CHECK-NEXT: ]
>> # CHECK-NEXT: Address:
>> -# CHECK-NEXT: Offset: 0x1000
>> +# CHECK-NEXT: Offset: 0xE8
>> # CHECK-NEXT: Size:
>> # CHECK-NEXT: Link:
>> # CHECK-NEXT: Info:
>> @@ -49,8 +49,8 @@ _start:
>> # CHECK-NEXT: Offset: 0x0
>> # CHECK-NEXT: VirtualAddress:
>> # CHECK-NEXT: PhysicalAddress:
>> -# CHECK-NEXT: FileSize: 4104
>> -# CHECK-NEXT: MemSize: 4104
>> +# CHECK-NEXT: FileSize: 240
>> +# CHECK-NEXT: MemSize: 240
>> # CHECK-NEXT: Flags [
>> # CHECK-NEXT: PF_R
>> # CHECK-NEXT: ]
>>
>> Modified: lld/trunk/test/elf2/relative-dynamic-reloc.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/relative-dynamic-reloc.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/relative-dynamic-reloc.s (original)
>> +++ lld/trunk/test/elf2/relative-dynamic-reloc.s Sat Oct 10 18:25:39 2015
>> @@ -9,10 +9,10 @@
>> // CHECK-NEXT: Section ({{.*}}) .rela.dyn {
>> // CHECK-NEXT: 0x[[FOO_ADDR:.*]] R_X86_64_RELATIVE - 0x[[FOO_ADDR]]
>> // CHECK-NEXT: 0x[[BAR_ADDR:.*]] R_X86_64_RELATIVE - 0x[[BAR_ADDR]]
>> -// CHECK-NEXT: 0x2010 R_X86_64_RELATIVE - 0x2009
>> +// CHECK-NEXT: 0x1010 R_X86_64_RELATIVE - 0x1009
>> // CHECK-NEXT: 0x{{.*}} R_X86_64_RELATIVE - 0x[[ZED_ADDR:.*]]
>> // CHECK-NEXT: 0x{{.*}} R_X86_64_RELATIVE - 0x[[FOO_ADDR]]
>> -// CHECK-NEXT: 0x1008 R_X86_64_64 external 0x0
>> +// CHECK-NEXT: 0x160 R_X86_64_64 external 0x0
>> // CHECK-NEXT: }
>> // CHECK-NEXT: ]
>>
>>
>> Modified: lld/trunk/test/elf2/relocation-i686.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/relocation-i686.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/relocation-i686.s (original)
>> +++ lld/trunk/test/elf2/relocation-i686.s Sat Oct 10 18:25:39 2015
>> @@ -27,14 +27,14 @@ R_386_PC32_2:
>>
>> // CHECK: Disassembly of section .R_386_32:
>> // CHECK-NEXT: R_386_32:
>> -// CHECK-NEXT: 12000: {{.*}} movl $73729, %edx
>> +// CHECK-NEXT: 11000: {{.*}} movl $69633, %edx
>>
>> // CHECK: Disassembly of section .R_386_PC32:
>> // CHECK-NEXT: R_386_PC32:
>> -// CHECK-NEXT: 12005: e8 04 00 00 00 calll 4
>> +// CHECK-NEXT: 11005: e8 04 00 00 00 calll 4
>>
>> // CHECK: R_386_PC32_2:
>> -// CHECK-NEXT: 1200e: 90 nop
>> +// CHECK-NEXT: 1100e: 90 nop
>>
>> // Create a .got
>> movl bar at GOT, %eax
>> @@ -45,8 +45,8 @@ movl bar at GOT, %eax
>> // ADDR-NEXT: SHF_ALLOC
>> // ADDR-NEXT: SHF_EXECINSTR
>> // ADDR-NEXT: ]
>> -// ADDR-NEXT: Address: 0x12030
>> -// ADDR-NEXT: Offset: 0x2030
>> +// ADDR-NEXT: Address: 0x11030
>> +// ADDR-NEXT: Offset: 0x1030
>> // ADDR-NEXT: Size: 8
>>
>> // ADDR: Name: .got
>> @@ -55,24 +55,24 @@ movl bar at GOT, %eax
>> // ADDR-NEXT: SHF_ALLOC
>> // ADDR-NEXT: SHF_WRITE
>> // ADDR-NEXT: ]
>> -// ADDR-NEXT: Address: 0x13050
>> +// ADDR-NEXT: Address: 0x12050
>>
>> .section .R_386_GOTPC,"ax", at progbits
>> R_386_GOTPC:
>> movl $_GLOBAL_OFFSET_TABLE_, %eax
>>
>> -// 0x13050 - 0x12014 = 4156
>> +// 0x12050 - 0x11014 = 4156
>>
>> // CHECK: Disassembly of section .R_386_GOTPC:
>> // CHECK-NEXT: R_386_GOTPC:
>> -// CHECK-NEXT: 12014: {{.*}} movl $4156, %eax
>> +// CHECK-NEXT: 11014: {{.*}} movl $4156, %eax
>>
>> .section .dynamic_reloc, "ax", at progbits
>> call bar
>> -// 0x12030 - (0x12019 + 5) = 18
>> +// 0x11030 - (0x11019 + 5) = 18
>> // CHECK: Disassembly of section .dynamic_reloc:
>> // CHECK-NEXT: .dynamic_reloc:
>> -// CHECK-NEXT: 12019: e8 12 00 00 00 calll 18
>> +// CHECK-NEXT: 11019: e8 12 00 00 00 calll 18
>>
>> .section .R_386_GOT32,"ax", at progbits
>> .global R_386_GOT32
>> @@ -81,4 +81,4 @@ R_386_GOT32:
>> // This is the second symbol in the got, so the offset is 4.
>> // CHECK: Disassembly of section .R_386_GOT32:
>> // CHECK-NEXT: R_386_GOT32:
>> -// CHECK-NEXT: 1201e: {{.*}} movl 4, %eax
>> +// CHECK-NEXT: 1101e: {{.*}} movl 4, %eax
>>
>> Modified: lld/trunk/test/elf2/relocation-local.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/relocation-local.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/relocation-local.s (original)
>> +++ lld/trunk/test/elf2/relocation-local.s Sat Oct 10 18:25:39 2015
>> @@ -20,7 +20,7 @@ R_X86_64_32:
>> // constants in hex.
>> // CHECK: Disassembly of section .text2:
>> // CHECK-NEXT: R_X86_64_32:
>> -// CHECK-NEXT: 12009: {{.*}} movl $73737, %edx
>> +// CHECK-NEXT: 11009: {{.*}} movl $69641, %edx
>>
>> .section .R_X86_64_32S,"ax", at progbits
>> R_X86_64_32S:
>> @@ -28,11 +28,11 @@ R_X86_64_32S:
>>
>> // CHECK: Disassembly of section .R_X86_64_32S:
>> // CHECK-NEXT: R_X86_64_32S:
>> -// CHECK-NEXT: {{.*}}: {{.*}} movq -974839, %rdx
>> +// CHECK-NEXT: {{.*}}: {{.*}} movq -978935, %rdx
>>
>> .section .R_X86_64_64,"a", at progbits
>> R_X86_64_64:
>> .quad R_X86_64_64
>>
>> // CHECK: Contents of section .R_X86_64_64:
>> -// CHECK-NEXT: 11000 00100100 00000000
>> +// CHECK-NEXT: 100e8 e8000100 00000000
>>
>> Modified: lld/trunk/test/elf2/relocation.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/relocation.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/relocation.s (original)
>> +++ lld/trunk/test/elf2/relocation.s Sat Oct 10 18:25:39 2015
>> @@ -12,8 +12,8 @@
>> // SEC-NEXT: SHF_ALLOC
>> // SEC-NEXT: SHF_EXECINSTR
>> // SEC-NEXT: ]
>> -// SEC-NEXT: Address: 0x12020
>> -// SEC-NEXT: Offset: 0x2020
>> +// SEC-NEXT: Address: 0x11020
>> +// SEC-NEXT: Offset: 0x1020
>> // SEC-NEXT: Size: 8
>>
>> // SEC: Name: .got
>> @@ -22,7 +22,7 @@
>> // SEC-NEXT: SHF_ALLOC
>> // SEC-NEXT: SHF_WRITE
>> // SEC-NEXT: ]
>> -// SEC-NEXT: Address: 0x130A0
>> +// SEC-NEXT: Address: 0x120A0
>> // SEC-NEXT: Offset:
>> // SEC-NEXT: Size: 16
>> // SEC-NEXT: Link: 0
>> @@ -44,11 +44,11 @@ lulz:
>>
>> // CHECK: Disassembly of section .text:
>> // CHECK-NEXT: _start:
>> -// CHECK-NEXT: 12000: e8 04 00 00 00 callq 4
>> -// CHECK-NEXT: 12005:
>> +// CHECK-NEXT: 11000: e8 04 00 00 00 callq 4
>> +// CHECK-NEXT: 11005:
>>
>> // CHECK: lulz:
>> -// CHECK-NEXT: 12009: 90 nop
>> +// CHECK-NEXT: 11009: 90 nop
>>
>>
>> .section .text2,"ax", at progbits
>> @@ -60,7 +60,7 @@ R_X86_64_32:
>> // constants in hex.
>> // CHECK: Disassembly of section .text2:
>> // CHECK-NEXT: R_X86_64_32:
>> -// CHECK-NEXT: 1200a: {{.*}} movl $73738, %edx
>> +// CHECK-NEXT: 1100a: {{.*}} movl $69642, %edx
>>
>> .section .R_X86_64_32S,"ax", at progbits
>> .global R_X86_64_32S
>> @@ -69,16 +69,16 @@ R_X86_64_32S:
>>
>> // CHECK: Disassembly of section .R_X86_64_32S:
>> // CHECK-NEXT: R_X86_64_32S:
>> -// CHECK-NEXT: {{.*}}: {{.*}} movq -974839, %rdx
>> +// CHECK-NEXT: {{.*}}: {{.*}} movq -978935, %rdx
>>
>> .section .R_X86_64_PC32,"ax", at progbits
>> .global R_X86_64_PC32
>> R_X86_64_PC32:
>> call bar
>> -// 0x12020 - (0x12017 + 5) = 4
>> +// 0x11020 - (0x11017 + 5) = 4
>> // CHECK: Disassembly of section .R_X86_64_PC32:
>> // CHECK-NEXT: R_X86_64_PC32:
>> -// CHECK-NEXT: 12017: e8 04 00 00 00 callq 4
>> +// CHECK-NEXT: 11017: e8 04 00 00 00 callq 4
>>
>> .section .R_X86_64_64,"a", at progbits
>> .global R_X86_64_64
>> @@ -86,14 +86,14 @@ R_X86_64_64:
>> .quad R_X86_64_64
>>
>> // CHECK: Contents of section .R_X86_64_64:
>> -// CHECK-NEXT: 11000 00100100 00000000
>> +// CHECK-NEXT: 10158 58010100 00000000
>>
>> .section .R_X86_64_GOTPCREL,"a", at progbits
>> .global R_X86_64_GOTPCREL
>> R_X86_64_GOTPCREL:
>> .long zed at gotpcrel
>>
>> -// 0x130A8 - 0x11008 = 8352
>> -// 8352 = 0x80200000 in little endian
>> +// 0x120A8 - 0x10160 = 8008
>> +// 8008 = 0x481f0000 in little endian
>> // CHECK: Contents of section .R_X86_64_GOTPCREL
>> -// CHECK-NEXT: 11008 a0200000
>> +// CHECK-NEXT: 10160 481f0000
>>
>> Modified: lld/trunk/test/elf2/shared.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/shared.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/shared.s (original)
>> +++ lld/trunk/test/elf2/shared.s Sat Oct 10 18:25:39 2015
>> @@ -14,7 +14,7 @@
>> // SO-NEXT: Flags [
>> // SO-NEXT: ]
>> // SO-NEXT: Address:
>> -// SO-NEXT: Offset: 0x2030
>> +// SO-NEXT: Offset: 0x1030
>> // SO-NEXT: Size:
>> // SO-NEXT: Link:
>> // SO-NEXT: Info:
>> @@ -46,7 +46,7 @@
>> // CHECK-NEXT: SHF_ALLOC
>> // CHECK-NEXT: ]
>> // CHECK-NEXT: Address: [[DYNSYMADDR:.*]]
>> -// CHECK-NEXT: Offset: 0x101C
>> +// CHECK-NEXT: Offset: 0x110
>> // CHECK-NEXT: Size:
>> // CHECK-NEXT: Link: [[DYNSTR:.*]]
>> // CHECK-NEXT: Info: 1
>> @@ -145,7 +145,7 @@
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: _start
>> -// CHECK-NEXT: Value: 0x12000
>> +// CHECK-NEXT: Value: 0x11000
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Global
>> // CHECK-NEXT: Type: None
>> @@ -184,7 +184,7 @@
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: _start@
>> -// CHECK-NEXT: Value: 0x12000
>> +// CHECK-NEXT: Value: 0x11000
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Global
>> // CHECK-NEXT: Type: Non
>>
>> Modified: lld/trunk/test/elf2/string-table.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/string-table.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/string-table.s (original)
>> +++ lld/trunk/test/elf2/string-table.s Sat Oct 10 18:25:39 2015
>> @@ -19,7 +19,7 @@ _start:
>> // CHECK-NEXT: Flags [
>> // CHECK-NEXT: SHF_ALLOC
>> // CHECK-NEXT: ]
>> -// CHECK-NEXT: Address: 0x11000
>> +// CHECK-NEXT: Address: 0x100B0
>>
>> // CHECK: Name: foobar
>> // CHECK-NEXT: Type: SHT_PROGBITS
>>
>> Modified: lld/trunk/test/elf2/symbols.s
>> URL:
>> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/symbols.s?rev=249957&r1=249956&r2=249957&view=diff
>>
>> ==============================================================================
>> --- lld/trunk/test/elf2/symbols.s (original)
>> +++ lld/trunk/test/elf2/symbols.s Sat Oct 10 18:25:39 2015
>> @@ -50,7 +50,7 @@ internal:
>> // CHECK-NEXT: Flags [
>> // CHECK-NEXT: SHF_ALLOC
>> // CHECK-NEXT: ]
>> -// CHECK-NEXT: Address: 0x11000
>> +// CHECK-NEXT: Address: 0x10120
>>
>> // CHECK: Name: .text
>> // CHECK-NEXT: Type: SHT_PROGBITS
>> @@ -58,7 +58,7 @@ internal:
>> // CHECK-NEXT: SHF_ALLOC
>> // CHECK-NEXT: SHF_EXECINSTR
>> // CHECK-NEXT: ]
>> -// CHECK-NEXT: Address: 0x12000
>> +// CHECK-NEXT: Address: 0x1100
>>
>> // CHECK: Name: .bss
>> // CHECK-NEXT: Type: SHT_NOBITS
>> @@ -66,7 +66,7 @@ internal:
>> // CHECK-NEXT: SHF_ALLOC
>> // CHECK-NEXT: SHF_WRITE
>> // CHECK-NEXT: ]
>> -// CHECK-NEXT: Address: 0x13000
>> +// CHECK-NEXT: Address: 0x12000
>> // CHECK-NEXT: Offset: 0x2000
>> // CHECK-NEXT: Size: 4
>>
>> @@ -82,7 +82,7 @@ internal:
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: hidden
>> -// CHECK-NEXT: Value: 0x11008
>> +// CHECK-NEXT: Value: 0x10128
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Local
>> // CHECK-NEXT: Type: None
>> @@ -91,7 +91,7 @@ internal:
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: internal
>> -// CHECK-NEXT: Value: 0x11008
>> +// CHECK-NEXT: Value: 0x10128
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Local
>> // CHECK-NEXT: Type: None
>> @@ -100,7 +100,7 @@ internal:
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: _start
>> -// CHECK-NEXT: Value: 0x12000
>> +// CHECK-NEXT: Value: 0x11000
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Global (0x1)
>> // CHECK-NEXT: Type: Function
>> @@ -127,7 +127,7 @@ internal:
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: common
>> -// CHECK-NEXT: Value: 0x13000
>> +// CHECK-NEXT: Value: 0x12000
>> // CHECK-NEXT: Size: 4
>> // CHECK-NEXT: Binding: Global
>> // CHECK-NEXT: Type: Object
>> @@ -136,7 +136,7 @@ internal:
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: foo
>> -// CHECK-NEXT: Value: 0x12000
>> +// CHECK-NEXT: Value: 0x11000
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Weak (0x2)
>> // CHECK-NEXT: Type: Object
>> @@ -145,7 +145,7 @@ internal:
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: protected
>> -// CHECK-NEXT: Value: 0x11008
>> +// CHECK-NEXT: Value: 0x10128
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Global
>> // CHECK-NEXT: Type: None
>> @@ -154,7 +154,7 @@ internal:
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: zed
>> -// CHECK-NEXT: Value: 0x11000
>> +// CHECK-NEXT: Value: 0x10120
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Global (0x1)
>> // CHECK-NEXT: Type: None
>> @@ -163,7 +163,7 @@ internal:
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: zed2
>> -// CHECK-NEXT: Value: 0x11004
>> +// CHECK-NEXT: Value: 0x10124
>> // CHECK-NEXT: Size: 0
>> // CHECK-NEXT: Binding: Global
>> // CHECK-NEXT: Type: None
>> @@ -172,7 +172,7 @@ internal:
>> // CHECK-NEXT: }
>> // CHECK-NEXT: Symbol {
>> // CHECK-NEXT: Name: zed3
>> -// CHECK-NEXT: Value: 0x11008
>> +// CHECK-NEXT: Value: 0x10128
>> // CHECK-NEXT: Size: 4
>> // CHECK-NEXT: Binding: Global
>> // CHECK-NEXT: Type: None
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151013/2acea3a7/attachment-0001.html>
More information about the llvm-commits
mailing list