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