[llvm] r371074 - [yaml2obj] Write the section header table after section contents
Matt Morehouse via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 6 11:39:25 PDT 2019
Hi Fangrui,
It looks like the ASan bot started failing after this patch:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/13799
Could you please take a look?
Thanks,
Matt
On Thu, Sep 5, 2019 at 7:24 AM Fangrui Song via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: maskray
> Date: Thu Sep 5 07:25:57 2019
> New Revision: 371074
>
> URL: http://llvm.org/viewvc/llvm-project?rev=371074&view=rev
> Log:
> [yaml2obj] Write the section header table after section contents
>
> Linkers (ld.bfd/gold/lld) place the section header table at the very
> end. This allows tools to strip it, which is optional in executable/shared
> objects.
> In addition, if we add or section, the size of the section header table
> will change. Placing the section header table in the end keeps section
> offsets unchanged.
>
> yaml2obj currently places the section header table immediately after the
> program header. Follow what linkers do to make offset updating easier.
>
> Reviewed By: grimar
>
> Differential Revision: https://reviews.llvm.org/D67221
>
> Modified:
> llvm/trunk/lib/ObjectYAML/ELFEmitter.cpp
> llvm/trunk/test/Object/invalid.test
> llvm/trunk/test/tools/llvm-objcopy/ELF/group-reorder.test
> llvm/trunk/test/tools/llvm-objcopy/ELF/invalid-e_shoff.test
> llvm/trunk/test/tools/llvm-objcopy/ELF/invalid-p_filesz-p_offset.test
>
> llvm/trunk/test/tools/llvm-objcopy/ELF/overlapping-sections-in-segments.test
> llvm/trunk/test/tools/llvm-objcopy/ELF/overlapping-sections.test
>
> llvm/trunk/test/tools/llvm-objcopy/ELF/preserve-segment-contents-ehdr-phdrs.test
> llvm/trunk/test/tools/llvm-readobj/elf-broken-dynsym-link.test
> llvm/trunk/test/tools/llvm-readobj/elf-dynamic-malformed.test
> llvm/trunk/test/tools/llvm-readobj/elf-dynamic-no-pt-dynamic.test
> llvm/trunk/test/tools/llvm-readobj/elf-file-headers.test
> llvm/trunk/test/tools/llvm-readobj/elf-hidden-versym.test
> llvm/trunk/test/tools/llvm-readobj/elf-invalid-shstrndx.test
> llvm/trunk/test/tools/llvm-readobj/elf-invalid-versioning.test
> llvm/trunk/test/tools/llvm-readobj/elf-loadname.test
> llvm/trunk/test/tools/llvm-readobj/elf-packed-relocs.test
> llvm/trunk/test/tools/llvm-readobj/elf-relr-relocs.test
> llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test
> llvm/trunk/test/tools/llvm-readobj/elf-wrong-shstrtab-type.test
> llvm/trunk/test/tools/llvm-readobj/gnu-notes.test
> llvm/trunk/test/tools/llvm-readobj/gnu-sections.test
> llvm/trunk/test/tools/llvm-readobj/reloc-types-elf-i386.test
> llvm/trunk/test/tools/llvm-readobj/reloc-types-elf-x64.test
> llvm/trunk/test/tools/llvm-readobj/unwind.test
>
> llvm/trunk/test/tools/yaml2obj/dynsymtab-implicit-sections-size-content.yaml
> llvm/trunk/test/tools/yaml2obj/elf-custom-null-section.yaml
> llvm/trunk/test/tools/yaml2obj/elf-header-sh-fields.yaml
> llvm/trunk/test/tools/yaml2obj/elf-override-shsize.yaml
> llvm/trunk/test/tools/yaml2obj/explicit-dynsym-no-dynstr.yaml
> llvm/trunk/test/tools/yaml2obj/implicit-sections.test
> llvm/trunk/test/tools/yaml2obj/program-header-align.yaml
> llvm/trunk/test/tools/yaml2obj/section-size-content.yaml
>
> llvm/trunk/test/tools/yaml2obj/strtab-implicit-sections-size-content.yaml
>
> llvm/trunk/test/tools/yaml2obj/symtab-implicit-sections-size-content.yaml
> llvm/trunk/test/tools/yaml2obj/versym-section.yaml
>
> Modified: llvm/trunk/lib/ObjectYAML/ELFEmitter.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ObjectYAML/ELFEmitter.cpp?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/ObjectYAML/ELFEmitter.cpp (original)
> +++ llvm/trunk/lib/ObjectYAML/ELFEmitter.cpp Thu Sep 5 07:25:57 2019
> @@ -116,7 +116,6 @@ template <class ELFT> class ELFState {
>
> bool buildSectionIndex();
> bool buildSymbolIndexes();
> - void initELFHeader(Elf_Ehdr &Header);
> void initProgramHeaders(std::vector<Elf_Phdr> &PHeaders);
> bool initImplicitHeader(ContiguousBlobAccumulator &CBA, Elf_Shdr
> &Header,
> StringRef SecName, ELFYAML::Section *YAMLSec);
> @@ -132,6 +131,7 @@ template <class ELFT> class ELFState {
> void setProgramHeaderLayout(std::vector<Elf_Phdr> &PHeaders,
> std::vector<Elf_Shdr> &SHeaders);
> void finalizeStrings();
> + void writeELFHeader(ContiguousBlobAccumulator &CBA, raw_ostream &OS);
> bool writeSectionContent(Elf_Shdr &SHeader,
> const ELFYAML::RawContentSection &Section,
> ContiguousBlobAccumulator &CBA);
> @@ -205,8 +205,11 @@ template <class ELFT> ELFState<ELFT>::EL
> }
> }
>
> -template <class ELFT> void ELFState<ELFT>::initELFHeader(Elf_Ehdr
> &Header) {
> +template <class ELFT>
> +void ELFState<ELFT>::writeELFHeader(ContiguousBlobAccumulator &CBA,
> raw_ostream &OS) {
> using namespace llvm::ELF;
> +
> + Elf_Ehdr Header;
> zero(Header);
> Header.e_ident[EI_MAG0] = 0x7f;
> Header.e_ident[EI_MAG1] = 'E';
> @@ -230,14 +233,18 @@ template <class ELFT> void ELFState<ELFT
> Header.e_shentsize =
> Doc.Header.SHEntSize ? (uint16_t)*Doc.Header.SHEntSize :
> sizeof(Elf_Shdr);
> // Immediately following the ELF header and program headers.
> - Header.e_shoff =
> - Doc.Header.SHOffset
> - ? (typename ELFT::uint)(*Doc.Header.SHOffset)
> - : sizeof(Header) + sizeof(Elf_Phdr) * Doc.ProgramHeaders.size();
> + // Align the start of the section header and write the ELF header.
> + uint64_t ShOffset;
> + CBA.getOSAndAlignedOffset(ShOffset, sizeof(typename ELFT::uint));
> + Header.e_shoff = Doc.Header.SHOffset
> + ? typename ELFT::uint(*Doc.Header.SHOffset)
> + : ShOffset;
> Header.e_shnum =
> Doc.Header.SHNum ? (uint16_t)*Doc.Header.SHNum :
> Doc.Sections.size();
> Header.e_shstrndx = Doc.Header.SHStrNdx ? (uint16_t)*Doc.Header.SHStrNdx
> : SN2I.get(".shstrtab");
> +
> + OS.write((const char *)&Header, sizeof(Header));
> }
>
> template <class ELFT>
> @@ -1040,19 +1047,13 @@ int ELFState<ELFT>::writeELF(raw_ostream
> if (!State.buildSectionIndex() || !State.buildSymbolIndexes())
> return 1;
>
> - Elf_Ehdr Header;
> - State.initELFHeader(Header);
> -
> - // TODO: Flesh out section header support.
> -
> std::vector<Elf_Phdr> PHeaders;
> State.initProgramHeaders(PHeaders);
>
> // XXX: This offset is tightly coupled with the order that we write
> // things to `OS`.
> - const size_t SectionContentBeginOffset = Header.e_ehsize +
> - Header.e_phentsize *
> Header.e_phnum +
> - Header.e_shentsize *
> Header.e_shnum;
> + const size_t SectionContentBeginOffset =
> + sizeof(Elf_Ehdr) + sizeof(Elf_Phdr) * Doc.ProgramHeaders.size();
> ContiguousBlobAccumulator CBA(SectionContentBeginOffset);
>
> std::vector<Elf_Shdr> SHeaders;
> @@ -1062,10 +1063,10 @@ int ELFState<ELFT>::writeELF(raw_ostream
> // Now we can decide segment offsets
> State.setProgramHeaderLayout(PHeaders, SHeaders);
>
> - OS.write((const char *)&Header, sizeof(Header));
> + State.writeELFHeader(CBA, OS);
> writeArrayData(OS, makeArrayRef(PHeaders));
> - writeArrayData(OS, makeArrayRef(SHeaders));
> CBA.writeBlobToStream(OS);
> + writeArrayData(OS, makeArrayRef(SHeaders));
> return 0;
> }
>
>
> Modified: llvm/trunk/test/Object/invalid.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/invalid.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/Object/invalid.test (original)
> +++ llvm/trunk/test/Object/invalid.test Thu Sep 5 07:25:57 2019
> @@ -315,7 +315,7 @@ FileHeader:
> # RUN: yaml2obj %s --docnum=16 -o %t16
> # RUN: not llvm-readobj -r %t16 2>&1 | FileCheck -DFILE=%t16
> --check-prefix=INVALID-REL-SYM %s
>
> -# INVALID-REL-SYM: error: '[[FILE]]': unable to access section [index 2]
> data at 0x18000180: offset goes past the end of file
> +# INVALID-REL-SYM: error: '[[FILE]]': unable to access section [index 2]
> data at 0x18000040: offset goes past the end of file
>
> --- !ELF
> FileHeader:
> @@ -565,7 +565,7 @@ Sections:
> # RUN: yaml2obj --docnum=26 %s -o %t26
> # RUN: not llvm-readobj -h %t26 2>&1 | FileCheck -DFILE=%t26
> --check-prefix=INVALID-SEC-NUM1 %s
>
> -# INVALID-SEC-NUM1: error: '[[FILE]]': invalid section header table
> offset (e_shoff = 0x40) or invalid number of sections specified in the
> first section header's sh_size field (0x3ffffffffffffff)
> +# INVALID-SEC-NUM1: error: '[[FILE]]': invalid section header table
> offset (e_shoff = 0x78) or invalid number of sections specified in the
> first section header's sh_size field (0x3ffffffffffffff)
>
> --- !ELF
> FileHeader:
>
> Modified: llvm/trunk/test/tools/llvm-objcopy/ELF/group-reorder.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objcopy/ELF/group-reorder.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-objcopy/ELF/group-reorder.test (original)
> +++ llvm/trunk/test/tools/llvm-objcopy/ELF/group-reorder.test Thu Sep 5
> 07:25:57 2019
> @@ -8,12 +8,12 @@
> # aren't purely sorting based on offsets (it gets moved to the beginning
> # despite having a larger offset).
>
> -# IN: There are 7 section headers, starting at offset 0x40:
> +# IN: There are 7 section headers, starting at offset 0x160:
> # IN: [Nr] Name Type Address Off
> Size
> # IN-NEXT: [ 0] NULL 0000000000000000
> 000000 000000
> -# IN-NEXT: [ 1] .foo PROGBITS 0000000000000000
> 000200 000040
> -# IN-NEXT: [ 2] .group GROUP 0000000000000000
> 000240 000008
> -# IN-NEXT: [ 3] .bar PROGBITS 0000000000000000
> 000248 000040
> +# IN-NEXT: [ 1] .foo PROGBITS 0000000000000000
> 000040 000040
> +# IN-NEXT: [ 2] .group GROUP 0000000000000000
> 000080 000008
> +# IN-NEXT: [ 3] .bar PROGBITS 0000000000000000
> 000088 000040
>
> # IN: COMDAT group section [ 2] `.group' [bar] contains 1
> sections:
> # IN-NEXT: [Index] Name
>
> Modified: llvm/trunk/test/tools/llvm-objcopy/ELF/invalid-e_shoff.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objcopy/ELF/invalid-e_shoff.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-objcopy/ELF/invalid-e_shoff.test (original)
> +++ llvm/trunk/test/tools/llvm-objcopy/ELF/invalid-e_shoff.test Thu Sep 5
> 07:25:57 2019
> @@ -7,13 +7,13 @@
>
> ## Sanity check that the section header table is at offset 64:
> # RUN: llvm-readobj --file-headers %t.o | FileCheck %s
> --check-prefix=VALIDATE
> -# VALIDATE: SectionHeaderOffset: 0x40{{$}}
> +# VALIDATE: SectionHeaderOffset: 0x80{{$}}
>
> ## Truncate the file to end before the section header table ends.
> -# RUN: %python -c "with open('%/t.o', 'r+b') as input: input.truncate(65)"
> +# RUN: %python -c "with open('%/t.o', 'r+b') as input:
> input.truncate(0x7f)"
> # RUN: not llvm-objcopy %t.o 2>&1 | FileCheck %s -DINPUT=%t.o
> --check-prefix=CASE1
>
> -# CASE1: error: '[[INPUT]]': section header table goes past the end of
> the file: e_shoff = 0x40
> +# CASE1: error: '[[INPUT]]': section header table goes past the end of
> the file: e_shoff = 0x80
>
> ## Set the e_shoff field to a value much larger than the object file size.
> # RUN: %python -c "with open('%/t2.o', 'r+b') as input: import struct;
> bytes = struct.pack('<Q', 0x40000000); input.seek(40); input.write(bytes)"
>
> Modified:
> llvm/trunk/test/tools/llvm-objcopy/ELF/invalid-p_filesz-p_offset.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objcopy/ELF/invalid-p_filesz-p_offset.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-objcopy/ELF/invalid-p_filesz-p_offset.test
> (original)
> +++ llvm/trunk/test/tools/llvm-objcopy/ELF/invalid-p_filesz-p_offset.test
> Thu Sep 5 07:25:57 2019
> @@ -4,7 +4,7 @@
>
> # RUN: yaml2obj --docnum=1 %s -o %t1.o
> # RUN: not llvm-objcopy %t1.o 2>&1 | FileCheck %s --check-prefix=ERR1
> -# ERR1: error: program header with offset 0x1b8 and file size 0x100000
> goes past the end of the file
> +# ERR1: error: program header with offset 0x78 and file size 0x100000
> goes past the end of the file
>
> --- !ELF
> FileHeader:
>
> Modified:
> llvm/trunk/test/tools/llvm-objcopy/ELF/overlapping-sections-in-segments.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objcopy/ELF/overlapping-sections-in-segments.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> ---
> llvm/trunk/test/tools/llvm-objcopy/ELF/overlapping-sections-in-segments.test
> (original)
> +++
> llvm/trunk/test/tools/llvm-objcopy/ELF/overlapping-sections-in-segments.test
> Thu Sep 5 07:25:57 2019
> @@ -4,14 +4,13 @@
> ## inputs somehow.
> # RUN: yaml2obj %s -o %t.o
>
> -## First, check that the section header table appears immediately after
> the program
> -## header table.
> +## First, check the address of the section header table.
> # RUN: llvm-readobj --file-headers %t.o | FileCheck %s
> --check-prefix=SHDRS-OFFSET
> -# SHDRS-OFFSET: SectionHeaderOffset: 0x78{{$}}
> +# SHDRS-OFFSET: SectionHeaderOffset: 0x1050{{$}}
>
> ## Binary edit the section header sh_offset field of the second section to
> -## overlap the first one.
> -# RUN: %python -c "with open('%/t.o', 'r+b') as input: import struct;
> bytes = struct.pack('<Q', 0x1001); input.seek(272); input.write(bytes)"
> +## (e_shoff+64*2+24 = 0x10e8) overlap the first one.
> +# RUN: %python -c "with open('%/t.o', 'r+b') as input: import struct;
> bytes = struct.pack('<Q', 0x1001); input.seek(0x10e8); input.write(bytes)"
>
> ## Sanity check that the binary editing modified the correct field.
> # RUN: llvm-readobj --section-headers %t.o | FileCheck %s
>
> Modified: llvm/trunk/test/tools/llvm-objcopy/ELF/overlapping-sections.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objcopy/ELF/overlapping-sections.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-objcopy/ELF/overlapping-sections.test
> (original)
> +++ llvm/trunk/test/tools/llvm-objcopy/ELF/overlapping-sections.test Thu
> Sep 5 07:25:57 2019
> @@ -3,14 +3,13 @@
> ## inputs somehow.
> # RUN: yaml2obj %s -o %t.o
>
> -## First, check that the section header table appears immediately after
> the ELF
> -## header.
> +## First, check the address of the section header table.
> # RUN: llvm-readobj --file-headers %t.o | FileCheck %s
> --check-prefix=SHDRS-OFFSET
> -# SHDRS-OFFSET: SectionHeaderOffset: 0x40{{$}}
> +# SHDRS-OFFSET: SectionHeaderOffset: 0x1050{{$}}
>
> ## Binary edit the section header sh_offset field of the second section to
> -## overlap the first one.
> -# RUN: %python -c "with open('%/t.o', 'r+b') as input: import struct;
> bytes = struct.pack('<Q', 0x1001); input.seek(216); input.write(bytes)"
> +## (e_shoff+64*2+24 = 0x10e8) overlap the first one.
> +# RUN: %python -c "with open('%/t.o', 'r+b') as input: import struct;
> bytes = struct.pack('<Q', 0x1001); input.seek(0x10e8); input.write(bytes)"
>
> ## Sanity check that the binary editing modified the correct field.
> # RUN: llvm-readobj --section-headers %t.o | FileCheck %s
> --check-prefix=VALIDATE
>
> Modified:
> llvm/trunk/test/tools/llvm-objcopy/ELF/preserve-segment-contents-ehdr-phdrs.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objcopy/ELF/preserve-segment-contents-ehdr-phdrs.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> ---
> llvm/trunk/test/tools/llvm-objcopy/ELF/preserve-segment-contents-ehdr-phdrs.test
> (original)
> +++
> llvm/trunk/test/tools/llvm-objcopy/ELF/preserve-segment-contents-ehdr-phdrs.test
> Thu Sep 5 07:25:57 2019
> @@ -11,7 +11,7 @@
> # BEFORE: Type: PT_LOAD
> # BEFORE-NEXT: Offset: 0x0
> # BEFORE: Type: PT_LOAD
> -# BEFORE-NEXT: Offset: 0x240
> +# BEFORE-NEXT: Offset: 0xC0
>
> # AFTER: SectionHeaderCount: 3
> # AFTER: Type: PT_LOAD
>
> Modified: llvm/trunk/test/tools/llvm-readobj/elf-broken-dynsym-link.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-broken-dynsym-link.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/elf-broken-dynsym-link.test
> (original)
> +++ llvm/trunk/test/tools/llvm-readobj/elf-broken-dynsym-link.test Thu
> Sep 5 07:25:57 2019
> @@ -14,14 +14,14 @@
> # LLVM-NEXT: SHF_ALLOC
> # LLVM-NEXT: ]
> # LLVM-NEXT: Address: 0x0
> -# LLVM-NEXT: Offset: 0x180
> +# LLVM-NEXT: Offset: 0x40
> # LLVM-NEXT: Size: 24
> # LLVM-NEXT: Link: 0
>
> # GNU: Section Headers:
> # GNU-NEXT: [Nr] Name Type Address Off Size ES Flg Lk
> # GNU-NEXT: [ 0] NULL 0000000000000000 000000 000000 00 0 0
> -# GNU-NEXT: [ 1] .dynsym DYNSYM 0000000000000000 000180 000018 18 A 0
> +# GNU-NEXT: [ 1] .dynsym DYNSYM 0000000000000000 000040 000018 18 A 0
>
> --- !ELF
> FileHeader:
> @@ -58,11 +58,11 @@ Sections:
> # LLVM2-NEXT: SHF_ALLOC
> # LLVM2-NEXT: ]
> # LLVM2-NEXT: Address: 0x0
> -# LLVM2-NEXT: Offset: 0x180
> +# LLVM2-NEXT: Offset: 0x40
> # LLVM2-NEXT: Size: 24
> # LLVM2-NEXT: Link: 255
>
> # GNU2: Section Headers:
> # GNU2-NEXT: [Nr] Name Type Address Off Size ES Flg Lk
> # GNU2-NEXT: [ 0] NULL 0000000000000000 000000 000000 00 0 0
> -# GNU2-NEXT: [ 1] .dynsym DYNSYM 0000000000000000 000180 000018 18 A
> 255
> +# GNU2-NEXT: [ 1] .dynsym DYNSYM 0000000000000000 000040 000018 18 A
> 255
>
> Modified: llvm/trunk/test/tools/llvm-readobj/elf-dynamic-malformed.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-dynamic-malformed.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/elf-dynamic-malformed.test
> (original)
> +++ llvm/trunk/test/tools/llvm-readobj/elf-dynamic-malformed.test Thu Sep
> 5 07:25:57 2019
> @@ -216,7 +216,7 @@ ProgramHeaders:
> # BAD-RELA-NEXT: 0x0000000000000007 RELA 0x1000000
> # BAD-RELA-NEXT: 0x0000000000000000 NULL 0x0
> # BAD-RELA-NEXT: ]
> -# BAD-RELA-GNU: Dynamic section at offset 0x1f0 contains 2 entries:
> +# BAD-RELA-GNU: Dynamic section at offset 0xb0 contains 2 entries:
> # BAD-RELA-GNU-NEXT: Tag Type Name/Value
> # BAD-RELA-GNU-NEXT: 0x0000000000000007 (RELA) 0x1000000
> # BAD-RELA-GNU-NEXT: 0x0000000000000000 (NULL) 0x0
>
> Modified: llvm/trunk/test/tools/llvm-readobj/elf-dynamic-no-pt-dynamic.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-dynamic-no-pt-dynamic.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/elf-dynamic-no-pt-dynamic.test
> (original)
> +++ llvm/trunk/test/tools/llvm-readobj/elf-dynamic-no-pt-dynamic.test Thu
> Sep 5 07:25:57 2019
> @@ -14,7 +14,7 @@
> # LLVM-NEXT: 0x0000000000000000 NULL 0x0
> # LLVM-NEXT: ]
>
> -# GNU: Dynamic section at offset 0x1b8 contains 1 entries:
> +# GNU: Dynamic section at offset 0x78 contains 1 entries:
> # GNU-NEXT: Tag Type Name/Value
> # GNU-NEXT: 0x0000000000000000 (NULL) 0x0
>
>
> Modified: llvm/trunk/test/tools/llvm-readobj/elf-file-headers.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-file-headers.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/elf-file-headers.test (original)
> +++ llvm/trunk/test/tools/llvm-readobj/elf-file-headers.test Thu Sep 5
> 07:25:57 2019
> @@ -21,7 +21,7 @@
> # I386-NEXT: Version: 1
> # I386-NEXT: Entry: 0x0
> # I386-NEXT: ProgramHeaderOffset: 0x34
> -# I386-NEXT: SectionHeaderOffset: 0x34
> +# I386-NEXT: SectionHeaderOffset: 0x64
> # I386-NEXT: Flags [ (0x0)
> # I386-NEXT: ]
> # I386-NEXT: HeaderSize: 52
> @@ -65,7 +65,7 @@ FileHeader:
> # X86-64-NEXT: Version: 1
> # X86-64-NEXT: Entry: 0x0
> # X86-64-NEXT: ProgramHeaderOffset: 0x40
> -# X86-64-NEXT: SectionHeaderOffset: 0x40
> +# X86-64-NEXT: SectionHeaderOffset: 0x78
> # X86-64-NEXT: Flags [ (0x0)
> # X86-64-NEXT: ]
> # X86-64-NEXT: HeaderSize: 64
> @@ -116,7 +116,7 @@ FileHeader:
> # LANAI-NEXT: Version: 1
> # LANAI-NEXT: Entry: 0x0
> # LANAI-NEXT: ProgramHeaderOffset: 0x34
> -# LANAI-NEXT: SectionHeaderOffset: 0x34
> +# LANAI-NEXT: SectionHeaderOffset: 0x64
> # LANAI-NEXT: Flags [ (0x0)
> # LANAI-NEXT: ]
> # LANAI-NEXT: HeaderSize: 52
>
> Modified: llvm/trunk/test/tools/llvm-readobj/elf-hidden-versym.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-hidden-versym.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/elf-hidden-versym.test (original)
> +++ llvm/trunk/test/tools/llvm-readobj/elf-hidden-versym.test Thu Sep 5
> 07:25:57 2019
> @@ -2,7 +2,7 @@
> # RUN: llvm-readelf -V %t | FileCheck %s --check-prefix=HIDDEN
>
> # HIDDEN: Version symbols section '.gnu.version' contains 2 entries:
> -# HIDDEN-NEXT: Addr: 0000000000200210 Offset: 0x000240 Link: 6
> (.dynsym)
> +# HIDDEN-NEXT: Addr: 0000000000200210 Offset: 0x000040 Link: 6
> (.dynsym)
> # HIDDEN-NEXT: 000: 0 (*local*) 3h(hiddensym)
>
> --- !ELF
>
> Modified: llvm/trunk/test/tools/llvm-readobj/elf-invalid-shstrndx.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-invalid-shstrndx.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/elf-invalid-shstrndx.test (original)
> +++ llvm/trunk/test/tools/llvm-readobj/elf-invalid-shstrndx.test Thu Sep
> 5 07:25:57 2019
> @@ -4,7 +4,7 @@
>
> # GNU: ELF Header:
> # GNU: Section header string table index: 255
> -# GNU-NEXT: There are 4 section headers, starting at offset 0x40:
> +# GNU-NEXT: There are 4 section headers, starting at offset 0x78:
> # GNU: Section Headers:
> # GNU-NEXT: [Nr] Name
> # GNU-EMPTY:
>
> Modified: llvm/trunk/test/tools/llvm-readobj/elf-invalid-versioning.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-invalid-versioning.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/elf-invalid-versioning.test
> (original)
> +++ llvm/trunk/test/tools/llvm-readobj/elf-invalid-versioning.test Thu
> Sep 5 07:25:57 2019
> @@ -2,7 +2,7 @@
> # RUN: llvm-readelf -V %t | FileCheck %s --check-prefix=INVALID
>
> # INVALID: Version symbols section '.gnu.version' contains 2 entries:
> -# INVALID-NEXT: Addr: 0000000000200210 Offset: 0x000240 Link: 6
> (.dynsym)
> +# INVALID-NEXT: Addr: 0000000000200210 Offset: 0x000040 Link: 6
> (.dynsym)
> # INVALID-NEXT: 000: 0 (*local*) 3 (*invalid*)
>
> --- !ELF
>
> Modified: llvm/trunk/test/tools/llvm-readobj/elf-loadname.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-loadname.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/elf-loadname.test (original)
> +++ llvm/trunk/test/tools/llvm-readobj/elf-loadname.test Thu Sep 5
> 07:25:57 2019
> @@ -9,7 +9,7 @@
> # LLVM-NEXT: AddressSize: 64bit
> # LLVM-NEXT: LoadName: test.so
>
> -# GNU: Dynamic section at offset 0x200 contains 4 entries:
> +# GNU: Dynamic section at offset 0x80 contains 4 entries:
> # GNU-NEXT: Tag Type Name/Value
> # GNU-NEXT: 0x0000000000000005 (STRTAB) 0x0
> # GNU-NEXT: 0x000000000000000a (STRSZ) 7 (bytes)
>
> Modified: llvm/trunk/test/tools/llvm-readobj/elf-packed-relocs.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-packed-relocs.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/elf-packed-relocs.test (original)
> +++ llvm/trunk/test/tools/llvm-readobj/elf-packed-relocs.test Thu Sep 5
> 07:25:57 2019
> @@ -14,7 +14,7 @@
> # LLVM1-NEXT: }
>
> # RUN: yaml2obj -docnum 1 %s | llvm-readelf -relocations - | FileCheck
> --check-prefix=GNU1 %s
> -# GNU1: Relocation section '.rela.dyn' at offset 0x180 contains 8
> entries:
> +# GNU1: Relocation section '.rela.dyn' at offset 0x40 contains 8
> entries:
> # GNU1: 0000000000001100 0000000000000008 R_X86_64_RELATIVE
> 0
> # GNU1-NEXT: 0000000000001180 0000000000000008 R_X86_64_RELATIVE
> 0
> # GNU1-NEXT: 0000000000001188 0000000100000001 R_X86_64_64
> 0000000000000000 sym1 + 0
> @@ -62,7 +62,7 @@ Symbols:
> # LLVM2-NEXT: }
>
> # RUN: yaml2obj -docnum 2 %s | llvm-readelf -relocations - | FileCheck
> --check-prefix=GNU2 %s
> -# GNU2: Relocation section '.rel.dyn' at offset 0xfc contains 10
> entries:
> +# GNU2: Relocation section '.rel.dyn' at offset 0x34 contains 10
> entries:
> # GNU2: 00001008 00000101 R_386_32 00000000 sym1
> # GNU2-NEXT: 00001010 00000203 R_386_GOT32 00000000 sym2
> # GNU2-NEXT: 0000100c 00000008 R_386_RELATIVE
> @@ -109,7 +109,7 @@ Symbols:
> # LLVM3-NEXT: }
>
> # RUN: yaml2obj -docnum 3 %s | llvm-readelf -relocations - | FileCheck
> --check-prefix=GNU3 %s
> -# GNU3: Relocation section '.rela.dyn' at offset 0x180 contains 6
> entries:
> +# GNU3: Relocation section '.rela.dyn' at offset 0x40 contains 6
> entries:
> # GNU3: 0000000000001100 0000000000000008 R_X86_64_RELATIVE
> 0
> # GNU3-NEXT: 0000000000001180 0000000000000008 R_X86_64_RELATIVE
> 8
> # GNU3-NEXT: 0000000000001200 0000000100000001 R_X86_64_64
> 0000000000000000 sym1 + 0
>
> Modified: llvm/trunk/test/tools/llvm-readobj/elf-relr-relocs.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-relr-relocs.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/elf-relr-relocs.test (original)
> +++ llvm/trunk/test/tools/llvm-readobj/elf-relr-relocs.test Thu Sep 5
> 07:25:57 2019
> @@ -42,7 +42,7 @@
> # RUN: yaml2obj -docnum 1 %s \
> # RUN: | llvm-readelf -relocations -raw-relr - \
> # RUN: | FileCheck --check-prefix=RAW-GNU1 %s
> -# RAW-GNU1: Relocation section '.relr.dyn' at offset 0x180 contains
> 5 entries:
> +# RAW-GNU1: Relocation section '.relr.dyn' at offset 0x40 contains 5
> entries:
> # RAW-GNU1: 0000000000010d60
> # RAW-GNU1-NEXT: 0000000000000103
> # RAW-GNU1-NEXT: 0000000000020000
> @@ -52,7 +52,7 @@
> # RUN: yaml2obj -docnum 1 %s \
> # RUN: | llvm-readelf -relocations - \
> # RUN: | FileCheck --check-prefix=GNU1 %s
> -# GNU1: Relocation section '.relr.dyn' at offset 0x180 contains 21
> entries:
> +# GNU1: Relocation section '.relr.dyn' at offset 0x40 contains 21
> entries:
> # GNU1: 0000000000010d60 0000000000000008 R_X86_64_RELATIVE
> # GNU1-NEXT: 0000000000010d68 0000000000000008 R_X86_64_RELATIVE
> # GNU1-NEXT: 0000000000010da0 0000000000000008 R_X86_64_RELATIVE
> @@ -127,7 +127,7 @@ Sections:
> # RUN: yaml2obj -docnum 2 %s \
> # RUN: | llvm-readelf -relocations -raw-relr - \
> # RUN: | FileCheck --check-prefix=RAW-GNU2 %s
> -# RAW-GNU2: Relocation section '.relr.dyn' at offset 0xfc contains 5
> entries:
> +# RAW-GNU2: Relocation section '.relr.dyn' at offset 0x34 contains 5
> entries:
> # RAW-GNU2: 00010d60
> # RAW-GNU2-NEXT: 00000103
> # RAW-GNU2-NEXT: 00020000
> @@ -137,7 +137,7 @@ Sections:
> # RUN: yaml2obj -docnum 2 %s \
> # RUN: | llvm-readelf -relocations - \
> # RUN: | FileCheck --check-prefix=GNU2 %s
> -# GNU2: Relocation section '.relr.dyn' at offset 0xfc contains 14
> entries:
> +# GNU2: Relocation section '.relr.dyn' at offset 0x34 contains 14
> entries:
> # GNU2: 00010d60 00000008 R_386_RELATIVE
> # GNU2-NEXT: 00010d64 00000008 R_386_RELATIVE
> # GNU2-NEXT: 00010d80 00000008 R_386_RELATIVE
>
> Modified: llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test (original)
> +++ llvm/trunk/test/tools/llvm-readobj/elf-versioninfo.test Thu Sep 5
> 07:25:57 2019
> @@ -80,7 +80,7 @@ DynamicSymbols:
> # LLVM: Version symbols {
> # LLVM-NEXT: Section Name: .gnu.version
> # LLVM-NEXT: Address: 0x0
> -# LLVM-NEXT: Offset: 0x280
> +# LLVM-NEXT: Offset: 0x40
> # LLVM-NEXT: Link: 7
> # LLVM-NEXT: Symbols [
> # LLVM-NEXT: Symbol {
> @@ -170,12 +170,12 @@ DynamicSymbols:
> # LLVM-NEXT: }
>
> # GNU: Version symbols section '.gnu.version' contains 6 entries:
> -# GNU-NEXT: Addr: 0000000000000000 Offset: 0x000280 Link: 7 (.dynsym)
> +# GNU-NEXT: Addr: 0000000000000000 Offset: 0x000040 Link: 7 (.dynsym)
> # GNU-NEXT: 000: 0 (*local*) 2 (VERSION1) 3 (VERSION2) 4 (v1)
> # GNU-NEXT: 004: 5 (v2) 6 (v3)
> # GNU-EMPTY:
> # GNU-NEXT: Version definition section '.gnu.version_d' contains 3
> entries:
> -# GNU-NEXT: Addr: 0000000000000000 Offset: 0x00028c Link: 8 (.dynstr)
> +# GNU-NEXT: Addr: 0000000000000000 Offset: 0x00004c Link: 8 (.dynstr)
> # GNU-NEXT: 0x0000: Rev: 1 Flags: none Index: 2 Cnt: 1 Name:
> VERSION1
> # GNU-NEXT: 0x001c: Rev: 1 Flags: none Index: 3 Cnt: 2 Name:
> VERSION2
> # GNU-NEXT: 0x0038: Parent 1: VERSION1
> @@ -183,7 +183,7 @@ DynamicSymbols:
> # GNU-NEXT: 0x0038: Parent 1: VERSION1
> # GNU-EMPTY:
> # GNU-NEXT: Version needs section '.gnu.version_r' contains 2 entries:
> -# GNU-NEXT: Addr: 0000000000000000 Offset: 0x0002cc Link: 8 (.dynstr)
> +# GNU-NEXT: Addr: 0000000000000000 Offset: 0x00008c Link: 8 (.dynstr)
> # GNU-NEXT: 0x0000: Version: 1 File: verneed1.so.0 Cnt: 2
> # GNU-NEXT: 0x0010: Name: v1 Flags: none Version: 4
> # GNU-NEXT: 0x0020: Name: v2 Flags: none Version: 5
>
> Modified: llvm/trunk/test/tools/llvm-readobj/elf-wrong-shstrtab-type.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/elf-wrong-shstrtab-type.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/elf-wrong-shstrtab-type.test
> (original)
> +++ llvm/trunk/test/tools/llvm-readobj/elf-wrong-shstrtab-type.test Thu
> Sep 5 07:25:57 2019
> @@ -15,7 +15,7 @@
> # GNU: Section Headers:
> # GNU: [Nr] Name Type Address Off
> Size ES Flg Lk Inf Al
> # GNU: warning: '[[FILE]]': invalid sh_type for string table section
> [index 1]: expected SHT_STRTAB, but got SHT_PROGBITS
> -# GNU: [ 1] .shstrtab PROGBITS 0000000000000000 000140
> 00001b 00 0 0 0
> +# GNU: [ 1] .shstrtab PROGBITS 0000000000000000 000040
> 00001b 00 0 0 0
>
> ## Test we report multiple identical warnings (one for each object) when
> dumping an archive.
>
>
> Modified: llvm/trunk/test/tools/llvm-readobj/gnu-notes.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/gnu-notes.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/gnu-notes.test (original)
> +++ llvm/trunk/test/tools/llvm-readobj/gnu-notes.test Thu Sep 5 07:25:57
> 2019
> @@ -7,24 +7,24 @@
> # RUN: llvm-readelf --notes %t1.stripped.so | FileCheck %s
> --check-prefix=GNU-STRIPPED --strict-whitespace --match-full-lines
> # RUN: llvm-readobj --notes %t1.stripped.so | FileCheck %s
> --check-prefix=LLVM-STRIPPED
>
> -# GNU:Displaying notes found at file offset 0x00000238 with length
> 0x00000020:
> +# GNU:Displaying notes found at file offset 0x00000078 with length
> 0x00000020:
> # GNU-NEXT: Owner Data size Description
> # GNU-NEXT: GNU 0x00000010 NT_GNU_ABI_TAG (ABI
> version tag)
> # GNU-NEXT: OS: Linux, ABI: 2.6.32
>
> -# GNU:Displaying notes found at file offset 0x00000258 with length
> 0x00000020:
> +# GNU:Displaying notes found at file offset 0x00000098 with length
> 0x00000020:
> # GNU-NEXT: Owner Data size Description
> # GNU-NEXT: GNU 0x00000010 NT_GNU_BUILD_ID (unique
> build ID bitstring)
> # GNU-NEXT: Build ID: 4fcb712aa6387724a9f465a32cd8c14b
>
> -# GNU:Displaying notes found at file offset 0x00000278 with length
> 0x0000001c:
> +# GNU:Displaying notes found at file offset 0x000000b8 with length
> 0x0000001c:
> # GNU-NEXT: Owner Data size Description
> # GNU-NEXT: GNU 0x00000009 NT_GNU_GOLD_VERSION (gold
> version)
> # GNU-NEXT: Version: gold 1.11
>
> # LLVM: Notes [
> # LLVM-NEXT: NoteSection {
> -# LLVM-NEXT: Offset: 0x238
> +# LLVM-NEXT: Offset: 0x78
> # LLVM-NEXT: Size: 0x20
> # LLVM-NEXT: Note {
> # LLVM-NEXT: Owner: GNU
> @@ -35,7 +35,7 @@
> # LLVM-NEXT: }
> # LLVM-NEXT: }
> # LLVM-NEXT: NoteSection {
> -# LLVM-NEXT: Offset: 0x258
> +# LLVM-NEXT: Offset: 0x98
> # LLVM-NEXT: Size: 0x20
> # LLVM-NEXT: Note {
> # LLVM-NEXT: Owner: GNU
> @@ -45,7 +45,7 @@
> # LLVM-NEXT: }
> # LLVM-NEXT: }
> # LLVM-NEXT: NoteSection {
> -# LLVM-NEXT: Offset: 0x278
> +# LLVM-NEXT: Offset: 0xB8
> # LLVM-NEXT: Size: 0x1C
> # LLVM-NEXT: Note {
> # LLVM-NEXT: Owner: GNU
> @@ -128,7 +128,7 @@ Sections:
> # RUN: not llvm-readelf --notes %t3.so 2>&1 | FileCheck -DFILE=%t3.so %s
> --check-prefix=ERR2
> # RUN: not llvm-readobj --notes %t3.so 2>&1 | FileCheck -DFILE=%t3.so %s
> --check-prefix=ERR2
>
> -# ERR2: error: '[[FILE]]': SHT_NOTE section [index 1] has invalid offset
> (0x180) or size (0xffff0000)
> +# ERR2: error: '[[FILE]]': SHT_NOTE section [index 1] has invalid offset
> (0x40) or size (0xffff0000)
>
> --- !ELF
> FileHeader:
> @@ -172,7 +172,7 @@ ProgramHeaders:
> # RUN: not llvm-readelf --notes %t5.so 2>&1 | FileCheck -DFILE=%t5.so %s
> --check-prefix=ERR4
> # RUN: not llvm-readobj --notes %t5.so 2>&1 | FileCheck -DFILE=%t5.so %s
> --check-prefix=ERR4
>
> -# ERR4: error: '[[FILE]]': PT_NOTE header has invalid offset (0x1b8) or
> size (0xffff0000)
> +# ERR4: error: '[[FILE]]': PT_NOTE header has invalid offset (0x78) or
> size (0xffff0000)
>
> --- !ELF
> FileHeader:
>
> Modified: llvm/trunk/test/tools/llvm-readobj/gnu-sections.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/gnu-sections.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/gnu-sections.test (original)
> +++ llvm/trunk/test/tools/llvm-readobj/gnu-sections.test Thu Sep 5
> 07:25:57 2019
> @@ -1,18 +1,18 @@
> # RUN: yaml2obj --docnum=1 %s -o %t-i386.o
> # RUN: llvm-readelf -S %t-i386.o | FileCheck %s -check-prefix ELF32
>
> -# ELF32: There are 8 section headers, starting at offset 0x34:
> +# ELF32: There are 8 section headers, starting at offset 0x90:
> # ELF32-EMPTY:
> # ELF32-NEXT: Section Headers:
> # ELF32-NEXT: [Nr] Name Type Address Off
> Size ES Flg Lk Inf Al
> # ELF32-NEXT: [ 0] NULL 00000000 000000
> 000000 00 0 0 0
> -# ELF32-NEXT: [ 1] .text PROGBITS 00000000 000174
> 000001 00 AX 0 0 4
> -# ELF32-NEXT: [ 2] .rel.text REL 00000000 000178
> 000000 08 5 1 4
> -# ELF32-NEXT: [ 3] .data PROGBITS 00000000 000178
> 000000 00 WA 0 0 4
> -# ELF32-NEXT: [ 4] .bss NOBITS 00000000 000178
> 000000 00 WA 0 0 4
> -# ELF32-NEXT: [ 5] .symtab SYMTAB 00000000 000178
> 000020 10 6 2 8
> -# ELF32-NEXT: [ 6] .strtab STRTAB 00000000 000198
> 000007 00 0 0 1
> -# ELF32-NEXT: [ 7] .shstrtab STRTAB 00000000 00019f
> 000030 00 0 0 1
> +# ELF32-NEXT: [ 1] .text PROGBITS 00000000 000034
> 000001 00 AX 0 0 4
> +# ELF32-NEXT: [ 2] .rel.text REL 00000000 000038
> 000000 08 5 1 4
> +# ELF32-NEXT: [ 3] .data PROGBITS 00000000 000038
> 000000 00 WA 0 0 4
> +# ELF32-NEXT: [ 4] .bss NOBITS 00000000 000038
> 000000 00 WA 0 0 4
> +# ELF32-NEXT: [ 5] .symtab SYMTAB 00000000 000038
> 000020 10 6 2 8
> +# ELF32-NEXT: [ 6] .strtab STRTAB 00000000 000058
> 000007 00 0 0 1
> +# ELF32-NEXT: [ 7] .shstrtab STRTAB 00000000 00005f
> 000030 00 0 0 1
> # ELF32-NEXT: Key to Flags:
> # ELF32-NEXT: W (write), A (alloc), X (execute), M (merge), S
> (strings), l (large)
> # ELF32-NEXT: I (info), L (link order), G (group), T (TLS), E
> (exclude), x (unknown)
> @@ -63,18 +63,18 @@ Symbols:
> # RUN: | FileCheck %s -check-prefix ELF64
> # RUN: llvm-readelf -W -S %t-x64.o | FileCheck %s -check-prefix ELF64
>
> -# ELF64: There are 8 section headers, starting at offset 0x40:
> +# ELF64: There are 8 section headers, starting at offset 0xb0:
> # ELF64-EMPTY:
> # ELF64-NEXT: Section Headers:
> # ELF64-NEXT: [Nr] Name Type Address
> Off Size ES Flg Lk Inf Al
> # ELF64-NEXT: [ 0] NULL 0000000000000000
> 000000 000000 00 0 0 0
> -# ELF64-NEXT: [ 1] .text PROGBITS 0000000000000000
> 000240 000001 00 AX 0 0 4
> -# ELF64-NEXT: [ 2] .rela.text RELA 0000000000000000
> 000248 000000 18 5 1 8
> -# ELF64-NEXT: [ 3] .data PROGBITS 0000000000000000
> 000248 000000 00 WA 0 0 4
> -# ELF64-NEXT: [ 4] .bss NOBITS 0000000000000000
> 000248 000000 00 WA 0 0 4
> -# ELF64-NEXT: [ 5] .symtab SYMTAB 0000000000000000
> 000248 000030 18 6 2 8
> -# ELF64-NEXT: [ 6] .strtab STRTAB 0000000000000000
> 000278 000007 00 0 0 1
> -# ELF64-NEXT: [ 7] .shstrtab STRTAB 0000000000000000
> 00027f 000031 00 0 0 1
> +# ELF64-NEXT: [ 1] .text PROGBITS 0000000000000000
> 000040 000001 00 AX 0 0 4
> +# ELF64-NEXT: [ 2] .rela.text RELA 0000000000000000
> 000048 000000 18 5 1 8
> +# ELF64-NEXT: [ 3] .data PROGBITS 0000000000000000
> 000048 000000 00 WA 0 0 4
> +# ELF64-NEXT: [ 4] .bss NOBITS 0000000000000000
> 000048 000000 00 WA 0 0 4
> +# ELF64-NEXT: [ 5] .symtab SYMTAB 0000000000000000
> 000048 000030 18 6 2 8
> +# ELF64-NEXT: [ 6] .strtab STRTAB 0000000000000000
> 000078 000007 00 0 0 1
> +# ELF64-NEXT: [ 7] .shstrtab STRTAB 0000000000000000
> 00007f 000031 00 0 0 1
> # ELF64-NEXT: Key to Flags:
> # ELF64-NEXT: W (write), A (alloc), X (execute), M (merge), S
> (strings), l (large)
> # ELF64-NEXT: I (info), L (link order), G (group), T (TLS), E
> (exclude), x (unknown)
>
> Modified: llvm/trunk/test/tools/llvm-readobj/reloc-types-elf-i386.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/reloc-types-elf-i386.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/reloc-types-elf-i386.test (original)
> +++ llvm/trunk/test/tools/llvm-readobj/reloc-types-elf-i386.test Thu Sep
> 5 07:25:57 2019
> @@ -47,7 +47,7 @@
> # LLVM: Type: R_386_IRELATIVE (42)
> # LLVM: Type: R_386_GOT32X (43)
>
> -# GNU: Relocation section '.rel.text' at offset 0x128 contains 41
> entries:
> +# GNU: Relocation section '.rel.text' at offset 0x38 contains 41
> entries:
> # GNU-NEXT: Offset Info Type Sym. Value Symbol's
> Name
> # GNU-NEXT: 00000002 00000100 R_386_NONE 00000000 foo
> # GNU-NEXT: 00000008 00000101 R_386_32 00000000 foo
>
> Modified: llvm/trunk/test/tools/llvm-readobj/reloc-types-elf-x64.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/reloc-types-elf-x64.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/reloc-types-elf-x64.test (original)
> +++ llvm/trunk/test/tools/llvm-readobj/reloc-types-elf-x64.test Thu Sep 5
> 07:25:57 2019
> @@ -46,7 +46,7 @@
> # LLVM: Type: R_X86_64_GOTPCRELX (41)
> # LLVM: Type: R_X86_64_REX_GOTPCRELX (42)
>
> -# GNU: Relocation section '.rela.text' at offset 0x1c8 contains 40
> entries:
> +# GNU: Relocation section '.rela.text' at offset 0x48 contains 40
> entries:
> # GNU-NEXT: Offset Info Type
> Symbol's Value Symbol's Name + Addend
> # GNU-NEXT: 0000000000000003 0000000100000000 R_X86_64_NONE
> 0000000000000000 foo + 0
> # GNU-NEXT: 000000000000000a 0000000100000001 R_X86_64_64
> 0000000000000000 foo + 0
>
> Modified: llvm/trunk/test/tools/llvm-readobj/unwind.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/unwind.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-readobj/unwind.test (original)
> +++ llvm/trunk/test/tools/llvm-readobj/unwind.test Thu Sep 5 07:25:57 2019
> @@ -3,7 +3,7 @@
>
> # CHECK: EH_FRAME Header [
> # CHECK-NEXT: Address: 0x4013c0
> -# CHECK-NEXT: Offset: 0x27c
> +# CHECK-NEXT: Offset: 0xbc
> # CHECK-NEXT: Size: 0x3c
> # CHECK-NEXT: Corresponding Section: .eh_frame_hdr
> # CHECK-NEXT: Header {
> @@ -40,7 +40,7 @@
> # CHECK-NEXT: }
> # CHECK-NEXT:]
>
> -# CHECK: .eh_frame section at offset 0x2b8 address 0x401400:
> +# CHECK: .eh_frame section at offset 0xf8 address 0x401400:
> # CHECK-NEXT: [0x401400] CIE length=20
> # CHECK-NEXT: version: 1
> # CHECK-NEXT: augmentation: zR
>
> Modified:
> llvm/trunk/test/tools/yaml2obj/dynsymtab-implicit-sections-size-content.yaml
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/dynsymtab-implicit-sections-size-content.yaml?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> ---
> llvm/trunk/test/tools/yaml2obj/dynsymtab-implicit-sections-size-content.yaml
> (original)
> +++
> llvm/trunk/test/tools/yaml2obj/dynsymtab-implicit-sections-size-content.yaml
> Thu Sep 5 07:25:57 2019
> @@ -75,7 +75,7 @@ DynamicSymbols:
> # CASE4-NEXT: SHF_ALLOC
> # CASE4-NEXT: ]
> # CASE4-NEXT: Address: 0x0
> -# CASE4-NEXT: Offset: 0x180
> +# CASE4-NEXT: Offset: 0x40
> # CASE4-NEXT: Size: 2
> # CASE4-NEXT: Link: 0
> # CASE4-NEXT: Info: 1
> @@ -107,7 +107,7 @@ Sections:
> # CASE5-NEXT: SHF_ALLOC
> # CASE5-NEXT: ]
> # CASE5-NEXT: Address: 0x0
> -# CASE5-NEXT: Offset: 0x180
> +# CASE5-NEXT: Offset: 0x40
> # CASE5-NEXT: Size: 5
> # CASE5-NEXT: Link: 0
> # CASE5-NEXT: Info: 1
> @@ -141,7 +141,7 @@ Sections:
> # CASE6-NEXT: SHF_ALLOC
> # CASE6-NEXT: ]
> # CASE6-NEXT: Address: 0x0
> -# CASE6-NEXT: Offset: 0x180
> +# CASE6-NEXT: Offset: 0x40
> # CASE6-NEXT: Size: 4
> # CASE6-NEXT: Link: 0
> # CASE6-NEXT: Info: 1
> @@ -175,7 +175,7 @@ Sections:
> # CASE7-NEXT: SHF_ALLOC
> # CASE7-NEXT: ]
> # CASE7-NEXT: Address: 0x0
> -# CASE7-NEXT: Offset: 0x180
> +# CASE7-NEXT: Offset: 0x40
> # CASE7-NEXT: Size: 2
> # CASE7-NEXT: Link: 0
> # CASE7-NEXT: Info: 1
>
> Modified: llvm/trunk/test/tools/yaml2obj/elf-custom-null-section.yaml
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/elf-custom-null-section.yaml?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/yaml2obj/elf-custom-null-section.yaml (original)
> +++ llvm/trunk/test/tools/yaml2obj/elf-custom-null-section.yaml Thu Sep 5
> 07:25:57 2019
> @@ -8,9 +8,9 @@
> # DEFAULT: Section Headers:
> # DEFAULT-NEXT: [Nr] Name Type Address Off Size ES
> Flg Lk Inf Al
> # DEFAULT-NEXT: [ 0] NULL 0000000000000000 000000 000000 00
> 0 0 0
> -# DEFAULT-NEXT: [ 1] .symtab SYMTAB 0000000000000000 000140 000018 18
> 2 1 8
> -# DEFAULT-NEXT: [ 2] .strtab STRTAB 0000000000000000 000158 000001 00
> 0 0 1
> -# DEFAULT-NEXT: [ 3] .shstrtab STRTAB 0000000000000000 000159 00001b 00
> 0 0 1
> +# DEFAULT-NEXT: [ 1] .symtab SYMTAB 0000000000000000 000040 000018 18
> 2 1 8
> +# DEFAULT-NEXT: [ 2] .strtab STRTAB 0000000000000000 000058 000001 00
> 0 0 1
> +# DEFAULT-NEXT: [ 3] .shstrtab STRTAB 0000000000000000 000059 00001b 00
> 0 0 1
>
> --- !ELF
> FileHeader:
> @@ -104,10 +104,10 @@ Sections:
> # OTHER-SECTION: Section Headers:
> # OTHER-SECTION-NEXT: [Nr] Name Type Address Off
> Size ES Flg Lk Inf Al
> # OTHER-SECTION-NEXT: [ 0] NULL 0000000000000000 000000
> 000000 00 0 0 0
> -# OTHER-SECTION-NEXT: [ 1] foo PROGBITS 0000000000000000 000180
> 000000 00 0 0 0
> -# OTHER-SECTION-NEXT: [ 2] .symtab SYMTAB 0000000000000000 000180
> 000018 18 3 1 8
> -# OTHER-SECTION-NEXT: [ 3] .strtab STRTAB 0000000000000000 000198
> 000001 00 0 0 1
> -# OTHER-SECTION-NEXT: [ 4] .shstrtab STRTAB 0000000000000000 000199
> 00001f 00 0 0 1
> +# OTHER-SECTION-NEXT: [ 1] foo PROGBITS 0000000000000000 000040
> 000000 00 0 0 0
> +# OTHER-SECTION-NEXT: [ 2] .symtab SYMTAB 0000000000000000 000040
> 000018 18 3 1 8
> +# OTHER-SECTION-NEXT: [ 3] .strtab STRTAB 0000000000000000 000058
> 000001 00 0 0 1
> +# OTHER-SECTION-NEXT: [ 4] .shstrtab STRTAB 0000000000000000 000059
> 00001f 00 0 0 1
>
> --- !ELF
> FileHeader:
> @@ -164,7 +164,7 @@ Sections:
> # MULTIPLE: Section Headers:
> # MULTIPLE-NEXT: [Nr] Name Type Address Off Size ES Flg Lk
> Inf Al
> # MULTIPLE-NEXT: [ 0] NULL 0000000000000000 000000 000000 00 0 0
> 0
> -# MULTIPLE-NEXT: [ 1] .foo NULL 0000000000000123 000180 000020 10 A 1
> 2 0
> +# MULTIPLE-NEXT: [ 1] .foo NULL 0000000000000123 000040 000020 10 A 1
> 2 0
>
> --- !ELF
> FileHeader:
>
> Modified: llvm/trunk/test/tools/yaml2obj/elf-header-sh-fields.yaml
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/elf-header-sh-fields.yaml?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/yaml2obj/elf-header-sh-fields.yaml (original)
> +++ llvm/trunk/test/tools/yaml2obj/elf-header-sh-fields.yaml Thu Sep 5
> 07:25:57 2019
> @@ -6,7 +6,7 @@
> # RUN: yaml2obj --docnum=1 %s -o %t1
> # RUN: llvm-readelf --file-headers %t1 | FileCheck %s
> --check-prefix=DEFAULT
>
> -# DEFAULT: Start of section headers: 64 (bytes into file)
> +# DEFAULT: Start of section headers: 120 (bytes into file)
> # DEFAULT: Size of section headers: 64 (bytes)
> # DEFAULT: Number of section headers: 4
> # DEFAULT: Section header string table index: 3
>
> Modified: llvm/trunk/test/tools/yaml2obj/elf-override-shsize.yaml
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/elf-override-shsize.yaml?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/yaml2obj/elf-override-shsize.yaml (original)
> +++ llvm/trunk/test/tools/yaml2obj/elf-override-shsize.yaml Thu Sep 5
> 07:25:57 2019
> @@ -7,17 +7,17 @@
> # CASE1: Section Headers:
> # CASE1-NEXT: [Nr] Name Type Address Off Size
> # CASE1-NEXT: [ 0] NULL 0000000000000000 000000 000000
> -# CASE1-NEXT: [ 1] .dynsym DYNSYM 0000000000000000 000380 000001
> -# CASE1-NEXT: [ 2] .symtab SYMTAB 0000000000000000 000398 000002
> -# CASE1-NEXT: [ 3] .dynamic DYNAMIC 0000000000000000 0003b0 000003
> -# CASE1-NEXT: [ 4] .rela RELA 0000000000000000 0003b0 000004
> -# CASE1-NEXT: [ 5] .nobits NOBITS 0000000000000000 0003b0 000005
> -# CASE1-NEXT: [ 6] .group GROUP 0000000000000000 0003b0 000006
> -# CASE1-NEXT: [ 7] .gnu.version VERSYM 0000000000000000 0003b0 000007
> -# CASE1-NEXT: [ 8] .gnu.version_r VERNEED 0000000000000000 0003b0 000008
> -# CASE1-NEXT: [ 9] .gnu.version_d VERDEF 0000000000000000 0003b0 000009
> -# CASE1-NEXT: [10] .regular PROGBITS 0000000000000000 0003b0 00000a
> -# CASE1-NEXT: [11] .strtab STRTAB 0000000000000000 0003b0 00000b
> +# CASE1-NEXT: [ 1] .dynsym DYNSYM 0000000000000000 000040 000001
> +# CASE1-NEXT: [ 2] .symtab SYMTAB 0000000000000000 000058 000002
> +# CASE1-NEXT: [ 3] .dynamic DYNAMIC 0000000000000000 000070 000003
> +# CASE1-NEXT: [ 4] .rela RELA 0000000000000000 000070 000004
> +# CASE1-NEXT: [ 5] .nobits NOBITS 0000000000000000 000070 000005
> +# CASE1-NEXT: [ 6] .group GROUP 0000000000000000 000070 000006
> +# CASE1-NEXT: [ 7] .gnu.version VERSYM 0000000000000000 000070 000007
> +# CASE1-NEXT: [ 8] .gnu.version_r VERNEED 0000000000000000 000070 000008
> +# CASE1-NEXT: [ 9] .gnu.version_d VERDEF 0000000000000000 000070 000009
> +# CASE1-NEXT: [10] .regular PROGBITS 0000000000000000 000070 00000a
> +# CASE1-NEXT: [11] .strtab STRTAB 0000000000000000 000070 00000b
>
> --- !ELF
> FileHeader:
>
> Modified: llvm/trunk/test/tools/yaml2obj/explicit-dynsym-no-dynstr.yaml
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/explicit-dynsym-no-dynstr.yaml?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/yaml2obj/explicit-dynsym-no-dynstr.yaml
> (original)
> +++ llvm/trunk/test/tools/yaml2obj/explicit-dynsym-no-dynstr.yaml Thu Sep
> 5 07:25:57 2019
> @@ -9,7 +9,7 @@
> # CHECK: Section Headers:
> # CHECK-NEXT: [Nr] Name Type Address Off Size ES Flg
> Lk
> # CHECK-NEXT: [ 0] NULL 0000000000000000 000000 000000 00 0 0
> -# CHECK-NEXT: [ 1] .dynsym DYNSYM 0000000000000000 000180 000018 18 A 0
> +# CHECK-NEXT: [ 1] .dynsym DYNSYM 0000000000000000 000040 000018 18 A 0
>
> --- !ELF
> FileHeader:
>
> Modified: llvm/trunk/test/tools/yaml2obj/implicit-sections.test
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/implicit-sections.test?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/yaml2obj/implicit-sections.test (original)
> +++ llvm/trunk/test/tools/yaml2obj/implicit-sections.test Thu Sep 5
> 07:25:57 2019
> @@ -11,12 +11,12 @@
> # CHECK: Section Headers:
> # CHECK-NEXT: [Nr] Name Type Address Off Size
> # CHECK-NEXT: [ 0] NULL 0000000000000000 000000 000000
> -# CHECK-NEXT: [ 1] .dynstr STRTAB 0000000000000100 000200 000009
> -# CHECK-NEXT: [ 2] .dynsym DYNSYM 0000000000000150 000209 000030
> -# CHECK-NEXT: [ 3] .symtab SYMTAB 0000000000000000 000239 000018
> -# CHECK-NEXT: [ 4] .strtab STRTAB 0000000000000000 000251 000001
> -# CHECK-NEXT: [ 5] .shstrtab STRTAB 0000000000000000 000252 000035
> -# CHECK-NEXT: [ 6] .text.foo PROGBITS 0000000000000200 000287 000000
> +# CHECK-NEXT: [ 1] .dynstr STRTAB 0000000000000100 000040 000009
> +# CHECK-NEXT: [ 2] .dynsym DYNSYM 0000000000000150 000049 000030
> +# CHECK-NEXT: [ 3] .symtab SYMTAB 0000000000000000 000079 000018
> +# CHECK-NEXT: [ 4] .strtab STRTAB 0000000000000000 000091 000001
> +# CHECK-NEXT: [ 5] .shstrtab STRTAB 0000000000000000 000092 000035
> +# CHECK-NEXT: [ 6] .text.foo PROGBITS 0000000000000200 0000c7 000000
>
> --- !ELF
> FileHeader:
> @@ -55,12 +55,12 @@ DynamicSymbols:
> # NODYNSYM: Section Headers:
> # NODYNSYM-NEXT: [Nr] Name Type Address Off Size
> # NODYNSYM-NEXT: [ 0] NULL 0000000000000000 000000 000000
> -# NODYNSYM-NEXT: [ 1] .dynstr STRTAB 0000000000000100 000200 000001
> -# NODYNSYM-NEXT: [ 2] .dynsym DYNSYM 0000000000000150 000201 000018
> -# NODYNSYM-NEXT: [ 3] .symtab SYMTAB 0000000000000000 000219 000018
> -# NODYNSYM-NEXT: [ 4] .strtab STRTAB 0000000000000000 000231 000001
> -# NODYNSYM-NEXT: [ 5] .shstrtab STRTAB 0000000000000000 000232 000035
> -# NODYNSYM-NEXT: [ 6] .text.foo PROGBITS 0000000000000200 000267 000000
> +# NODYNSYM-NEXT: [ 1] .dynstr STRTAB 0000000000000100 000040 000001
> +# NODYNSYM-NEXT: [ 2] .dynsym DYNSYM 0000000000000150 000041 000018
> +# NODYNSYM-NEXT: [ 3] .symtab SYMTAB 0000000000000000 000059 000018
> +# NODYNSYM-NEXT: [ 4] .strtab STRTAB 0000000000000000 000071 000001
> +# NODYNSYM-NEXT: [ 5] .shstrtab STRTAB 0000000000000000 000072 000035
> +# NODYNSYM-NEXT: [ 6] .text.foo PROGBITS 0000000000000200 0000a7 000000
>
> --- !ELF
> FileHeader:
>
> Modified: llvm/trunk/test/tools/yaml2obj/program-header-align.yaml
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/program-header-align.yaml?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/yaml2obj/program-header-align.yaml (original)
> +++ llvm/trunk/test/tools/yaml2obj/program-header-align.yaml Thu Sep 5
> 07:25:57 2019
> @@ -37,7 +37,7 @@ ProgramHeaders:
> #CHECK: ProgramHeaders [
> #CHECK-NEXT: ProgramHeader {
> #CHECK-NEXT: Type: PT_LOAD
> -#CHECK-NEXT: Offset: 0x230
> +#CHECK-NEXT: Offset: 0xB0
> #CHECK-NEXT: VirtualAddress: 0xAAAA1030
> #CHECK-NEXT: PhysicalAddress: 0xFFFF1030
> #CHECK-NEXT: FileSize: 4
> @@ -50,7 +50,7 @@ ProgramHeaders:
> #CHECK-NEXT: }
> #CHECK-NEXT: ProgramHeader {
> #CHECK-NEXT: Type: PT_LOAD
> -#CHECK-NEXT: Offset: 0x240
> +#CHECK-NEXT: Offset: 0xC0
> #CHECK-NEXT: VirtualAddress: 0xAAAA2040
> #CHECK-NEXT: PhysicalAddress: 0xFFFF2040
> #CHECK-NEXT: FileSize: 4
>
> Modified: llvm/trunk/test/tools/yaml2obj/section-size-content.yaml
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/section-size-content.yaml?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/yaml2obj/section-size-content.yaml (original)
> +++ llvm/trunk/test/tools/yaml2obj/section-size-content.yaml Thu Sep 5
> 07:25:57 2019
> @@ -31,7 +31,7 @@ Sections:
> # CASE2-NEXT: Flags [
> # CASE2-NEXT: ]
> # CASE2-NEXT: Address: 0x0
> -# CASE2-NEXT: Offset: 0x180
> +# CASE2-NEXT: Offset: 0x40
> # CASE2-NEXT: Size: 1
> # CASE2-NEXT: Link: 0
> # CASE2-NEXT: Info: 0
> @@ -79,7 +79,7 @@ Sections:
> # CASE3-NEXT: Flags [
> # CASE3-NEXT: ]
> # CASE3-NEXT: Address: 0x0
> -# CASE3-NEXT: Offset: 0x180
> +# CASE3-NEXT: Offset: 0x40
> # CASE3-NEXT: Size: 1
> # CASE3-NEXT: Link: 0
> # CASE3-NEXT: Info: 0
> @@ -112,7 +112,7 @@ Sections:
> # CASE4-NEXT: Flags [
> # CASE4-NEXT: ]
> # CASE4-NEXT: Address: 0x0
> -# CASE4-NEXT: Offset: 0x180
> +# CASE4-NEXT: Offset: 0x40
> # CASE4-NEXT: Size: 3
> # CASE4-NEXT: Link: 0
> # CASE4-NEXT: Info: 0
> @@ -144,7 +144,7 @@ Sections:
> # CASE5-NEXT: Flags [
> # CASE5-NEXT: ]
> # CASE5-NEXT: Address: 0x0
> -# CASE5-NEXT: Offset: 0x180
> +# CASE5-NEXT: Offset: 0x40
> # CASE5-NEXT: Size: 0
>
> --- !ELF
>
> Modified:
> llvm/trunk/test/tools/yaml2obj/strtab-implicit-sections-size-content.yaml
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/strtab-implicit-sections-size-content.yaml?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> ---
> llvm/trunk/test/tools/yaml2obj/strtab-implicit-sections-size-content.yaml
> (original)
> +++
> llvm/trunk/test/tools/yaml2obj/strtab-implicit-sections-size-content.yaml
> Thu Sep 5 07:25:57 2019
> @@ -34,7 +34,7 @@ Symbols:
> # CASE2-NEXT: Flags [
> # CASE2-NEXT: ]
> # CASE2-NEXT: Address: 0x0
> -# CASE2-NEXT: Offset: 0x140
> +# CASE2-NEXT: Offset: 0x40
> # CASE2-NEXT: Size: 2
> # CASE2-NEXT: Link: 0
> # CASE2-NEXT: Info: 0
> @@ -69,7 +69,7 @@ Symbols:
> # CASE3-NEXT: Flags [
> # CASE3-NEXT: ]
> # CASE3-NEXT: Address: 0x0
> -# CASE3-NEXT: Offset: 0x140
> +# CASE3-NEXT: Offset: 0x40
> # CASE3-NEXT: Size: 2
> # CASE3-NEXT: Link: 0
> # CASE3-NEXT: Info: 0
> @@ -105,7 +105,7 @@ Symbols:
> # CASE4-NEXT: Flags [
> # CASE4-NEXT: ]
> # CASE4-NEXT: Address: 0x0
> -# CASE4-NEXT: Offset: 0x140
> +# CASE4-NEXT: Offset: 0x40
> # CASE4-NEXT: Size: 3
> # CASE4-NEXT: Link: 0
> # CASE4-NEXT: Info: 0
> @@ -141,7 +141,7 @@ Symbols:
> # CASE5-NEXT: Flags [ (0x0)
> # CASE5-NEXT: ]
> # CASE5-NEXT: Address: 0x0
> -# CASE5-NEXT: Offset: 0x140
> +# CASE5-NEXT: Offset: 0x40
> # CASE5-NEXT: Size: 2
> # CASE5-NEXT: Link: 0
> # CASE5-NEXT: Info: 0
>
> Modified:
> llvm/trunk/test/tools/yaml2obj/symtab-implicit-sections-size-content.yaml
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/symtab-implicit-sections-size-content.yaml?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> ---
> llvm/trunk/test/tools/yaml2obj/symtab-implicit-sections-size-content.yaml
> (original)
> +++
> llvm/trunk/test/tools/yaml2obj/symtab-implicit-sections-size-content.yaml
> Thu Sep 5 07:25:57 2019
> @@ -70,7 +70,7 @@ Symbols:
> # CASE4-NEXT: Flags [ (0x0)
> # CASE4-NEXT: ]
> # CASE4-NEXT: Address: 0x0
> -# CASE4-NEXT: Offset: 0x140
> +# CASE4-NEXT: Offset: 0x40
> # CASE4-NEXT: Size: 2
> # CASE4-NEXT: Link: 2
> # CASE4-NEXT: Info: 1
> @@ -101,7 +101,7 @@ Sections:
> # CASE5-NEXT: Flags [ (0x0)
> # CASE5-NEXT: ]
> # CASE5-NEXT: Address: 0x0
> -# CASE5-NEXT: Offset: 0x140
> +# CASE5-NEXT: Offset: 0x40
> # CASE5-NEXT: Size: 5
> # CASE5-NEXT: Link: 2
> # CASE5-NEXT: Info: 1
> @@ -134,7 +134,7 @@ Sections:
> # CASE6-NEXT: Flags [
> # CASE6-NEXT: ]
> # CASE6-NEXT: Address: 0x0
> -# CASE6-NEXT: Offset: 0x140
> +# CASE6-NEXT: Offset: 0x40
> # CASE6-NEXT: Size: 4
> # CASE6-NEXT: Link: 2
> # CASE6-NEXT: Info: 1
> @@ -167,7 +167,7 @@ Sections:
> # CASE7-NEXT: Flags [
> # CASE7-NEXT: ]
> # CASE7-NEXT: Address: 0x0
> -# CASE7-NEXT: Offset: 0x140
> +# CASE7-NEXT: Offset: 0x40
> # CASE7-NEXT: Size: 2
> # CASE7-NEXT: Link: 2
> # CASE7-NEXT: Info: 1
>
> Modified: llvm/trunk/test/tools/yaml2obj/versym-section.yaml
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/yaml2obj/versym-section.yaml?rev=371074&r1=371073&r2=371074&view=diff
>
> ==============================================================================
> --- llvm/trunk/test/tools/yaml2obj/versym-section.yaml (original)
> +++ llvm/trunk/test/tools/yaml2obj/versym-section.yaml Thu Sep 5 07:25:57
> 2019
> @@ -7,7 +7,7 @@
> # CHECK: Version symbols {
> # CHECK-NEXT: Section Name: .gnu.version
> # CHECK-NEXT: Address: 0x200210
> -# CHECK-NEXT: Offset: 0x240
> +# CHECK-NEXT: Offset: 0x40
> # CHECK-NEXT: Link: 6
> # CHECK-NEXT: Symbols [
> # CHECK-NEXT: Symbol {
> @@ -97,7 +97,7 @@ DynamicSymbols:
>
> # ENTSIZE: Section Headers:
> # ENTSIZE: [Nr] Name Type Address Off Size ES
> -# ENTSIZE: [ 1] .gnu.version VERSYM 0000000000000000 000180 000000 03
> +# ENTSIZE: [ 1] .gnu.version VERSYM 0000000000000000 000040 000000 03
>
> --- !ELF
> FileHeader:
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://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/20190906/2a6f2b0c/attachment-0001.html>
More information about the llvm-commits
mailing list