Index: ELF/Writer.cpp =================================================================== --- ELF/Writer.cpp +++ ELF/Writer.cpp @@ -1945,6 +1945,29 @@ Load->add(Out::ElfHeader); Load->add(Out::ProgramHeaders); + // PT_GNU_RELRO includes all sections that should be marked as + // read-only by dynamic linker after proccessing relocations. + // Current dynamic loaders only support one PT_GNU_RELRO PHDR, give + // an error message if more than one PT_GNU_RELRO PHDR is required. + PhdrEntry *RelRo = make(PT_GNU_RELRO, PF_R); + bool InRelroPhdr = false; + OutputSection *RelroEnd = nullptr; + for (OutputSection *Sec : OutputSections) { + if (!needsPtLoad(Sec)) + continue; + if (isRelroSection(Sec)) { + InRelroPhdr = true; + if (!RelroEnd) + RelRo->add(Sec); + else + error("section: " + Sec->Name + " is not contiguous with other relro" + + " sections"); + } else if (InRelroPhdr) { + InRelroPhdr = false; + RelroEnd = Sec; + } + } + for (OutputSection *Sec : OutputSections) { if (!(Sec->Flags & SHF_ALLOC)) break; @@ -1962,7 +1985,8 @@ if (((Sec->LMAExpr || (Sec->LMARegion && (Sec->LMARegion != Load->FirstSec->LMARegion))) && Load->LastSec != Out::ProgramHeaders) || - Sec->MemRegion != Load->FirstSec->MemRegion || Flags != NewFlags) { + Sec->MemRegion != Load->FirstSec->MemRegion || Flags != NewFlags || + Sec == RelroEnd) { Load = AddHdr(PT_LOAD, NewFlags); Flags = NewFlags; @@ -1983,28 +2007,6 @@ if (OutputSection *Sec = In.Dynamic->getParent()) AddHdr(PT_DYNAMIC, Sec->getPhdrFlags())->add(Sec); - // PT_GNU_RELRO includes all sections that should be marked as - // read-only by dynamic linker after proccessing relocations. - // Current dynamic loaders only support one PT_GNU_RELRO PHDR, give - // an error message if more than one PT_GNU_RELRO PHDR is required. - PhdrEntry *RelRo = make(PT_GNU_RELRO, PF_R); - bool InRelroPhdr = false; - bool IsRelroFinished = false; - for (OutputSection *Sec : OutputSections) { - if (!needsPtLoad(Sec)) - continue; - if (isRelroSection(Sec)) { - InRelroPhdr = true; - if (!IsRelroFinished) - RelRo->add(Sec); - else - error("section: " + Sec->Name + " is not contiguous with other relro" + - " sections"); - } else if (InRelroPhdr) { - InRelroPhdr = false; - IsRelroFinished = true; - } - } if (RelRo->FirstSec) Ret.push_back(RelRo); Index: test/ELF/aarch64-copy.s =================================================================== --- test/ELF/aarch64-copy.s +++ test/ELF/aarch64-copy.s @@ -90,4 +90,4 @@ // RODATA: Contents of section .rodata: // S(z) = 0x230014 -// RODATA-NEXT: 2002e0 14002300 +// RODATA-NEXT: 200318 14002300 Index: test/ELF/amdgpu-relocs.s =================================================================== --- test/ELF/amdgpu-relocs.s +++ test/ELF/amdgpu-relocs.s @@ -110,7 +110,7 @@ # CHECK-NEXT: ] # OBJDUMP: Contents of section .rodata: -# OBJDUMP: d0f8ffff ffffffff +# OBJDUMP: 98f8ffff ffffffff # OBJDUMP: Contents of section nonalloc: # OBJDUMP-NEXT: 0000 00000000 14380000 00000000 18340000 Index: test/ELF/arm-copy.s =================================================================== --- test/ELF/arm-copy.s +++ test/ELF/arm-copy.s @@ -78,4 +78,4 @@ // RODATA: Contents of section .rodata: // S(z) = 0x13004 -// RODATA-NEXT: 10190 04300100 +// RODATA-NEXT: 101b0 04300100 Index: test/ELF/arm-exidx-shared.s =================================================================== --- test/ELF/arm-exidx-shared.s +++ test/ELF/arm-exidx-shared.s @@ -42,4 +42,4 @@ // CHECK-EXTAB: Contents of section .ARM.extab: // 0x0210 + 0x0e20 = 0x1030 = __gxx_personality_v0(PLT) -// CHECK-EXTAB-NEXT: 0210 200e0000 b0b0b000 00000000 +// CHECK-EXTAB-NEXT: 0230 000e0000 b0b0b000 00000000 Index: test/ELF/basic-ppc64.s =================================================================== --- test/ELF/basic-ppc64.s +++ test/ELF/basic-ppc64.s @@ -63,8 +63,8 @@ // CHECK-NEXT: Flags [ (0x2) // CHECK-NEXT: SHF_ALLOC (0x2) // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x1C8 -// CHECK-NEXT: Offset: 0x1C8 +// CHECK-NEXT: Address: 0x200 +// CHECK-NEXT: Offset: 0x200 // CHECK-NEXT: Size: 24 // CHECK-NEXT: Link: 3 // CHECK-NEXT: Info: 1 @@ -82,8 +82,8 @@ // CHECK-NEXT: Flags [ (0x2) // CHECK-NEXT: SHF_ALLOC (0x2) // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x1E0 -// CHECK-NEXT: Offset: 0x1E0 +// CHECK-NEXT: Address: 0x218 +// CHECK-NEXT: Offset: 0x218 // CHECK-NEXT: Size: 16 // CHECK-NEXT: Link: 1 // CHECK-NEXT: Info: 0 @@ -100,8 +100,8 @@ // CHECK-NEXT: Flags [ (0x2) // CHECK-NEXT: SHF_ALLOC (0x2) // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x1F0 -// CHECK-NEXT: Offset: 0x1F0 +// CHECK-NEXT: Address: 0x228 +// CHECK-NEXT: Offset: 0x228 // CHECK-NEXT: Size: 1 // CHECK-NEXT: Link: 0 // CHECK-NEXT: Info: 0 @@ -146,12 +146,12 @@ // CHECK-NEXT: AddressAlignment: 8 // CHECK-NEXT: EntrySize: 16 // CHECK-NEXT: SectionData ( -// CHECK-NEXT: 0000: 06000000 00000000 C8010000 00000000 |................| -// CHECK-NEXT: 0010: 0B000000 00000000 18000000 00000000 |................| -// CHECK-NEXT: 0020: 05000000 00000000 F0010000 00000000 |................| -// CHECK-NEXT: 0030: 0A000000 00000000 01000000 00000000 |................| -// CHECK-NEXT: 0040: 04000000 00000000 E0010000 00000000 |................| -// CHECK-NEXT: 0050: 00000000 00000000 00000000 00000000 |................| +// CHECK-NEXT: 0000: 06000000 00000000 00020000 00000000 | +// CHECK-NEXT: 0010: 0B000000 00000000 18000000 00000000 | +// CHECK-NEXT: 0020: 05000000 00000000 28020000 00000000 | +// CHECK-NEXT: 0030: 0A000000 00000000 01000000 00000000 | +// CHECK-NEXT: 0040: 04000000 00000000 18020000 00000000 | +// CHECK-NEXT: 0050: 00000000 00000000 00000000 00000000 | // CHECK-NEXT: ) // CHECK-NEXT: } // CHECK-NEXT: Section { @@ -254,8 +254,8 @@ // CHECK-NEXT: Offset: 0x40 // CHECK-NEXT: VirtualAddress: 0x40 // CHECK-NEXT: PhysicalAddress: 0x40 -// CHECK-NEXT: FileSize: 392 -// CHECK-NEXT: MemSize: 392 +// CHECK-NEXT: FileSize: 448 +// CHECK-NEXT: MemSize: 448 // CHECK-NEXT: Flags [ (0x4) // CHECK-NEXT: PF_R (0x4) // CHECK-NEXT: ] @@ -266,8 +266,8 @@ // CHECK-NEXT: Offset: 0x0 // CHECK-NEXT: VirtualAddress: 0x0 // CHECK-NEXT: PhysicalAddress: 0x0 -// CHECK-NEXT: FileSize: 497 -// CHECK-NEXT: MemSize: 497 +// CHECK-NEXT: FileSize: 553 +// CHECK-NEXT: MemSize: 553 // CHECK-NEXT: Flags [ (0x4) // CHECK-NEXT: PF_R (0x4) // CHECK-NEXT: ] @@ -292,7 +292,7 @@ // CHECK-NEXT: VirtualAddress: 0x20000 // CHECK-NEXT: PhysicalAddress: 0x20000 // CHECK-NEXT: FileSize: 96 -// CHECK-NEXT: MemSize: 65536 +// CHECK-NEXT: MemSize: 96 // CHECK-NEXT: Flags [ (0x6) // CHECK-NEXT: PF_R (0x4) // CHECK-NEXT: PF_W (0x2) Index: test/ELF/gnu-ifunc-dyntags.s =================================================================== --- test/ELF/gnu-ifunc-dyntags.s +++ test/ELF/gnu-ifunc-dyntags.s @@ -8,7 +8,7 @@ ## when there are no other relocations except R_*_IRELATIVE. # CHECK: Name Size VMA -# CHECK: .rela.plt 00000030 0000000000000210 +# CHECK: .rela.plt 00000030 0000000000000248 # CHECK: .got.plt 00000010 0000000000003000 # TAGS: Relocations [ @@ -19,7 +19,7 @@ # TAGS-NEXT: ] # TAGS: Tag Type Name/Value -# TAGS: 0x0000000000000017 JMPREL 0x210 +# TAGS: 0x0000000000000017 JMPREL 0x248 # TAGS: 0x0000000000000002 PLTRELSZ 48 # TAGS: 0x0000000000000003 PLTGOT 0x3000 # TAGS: 0x0000000000000014 PLTREL RELA Index: test/ELF/i386-merge.s =================================================================== --- test/ELF/i386-merge.s +++ test/ELF/i386-merge.s @@ -9,7 +9,7 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_MERGE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x158 +// CHECK-NEXT: Address: 0x178 // CHECK-NEXT: Offset: // CHECK-NEXT: Size: // CHECK-NEXT: Link: @@ -35,7 +35,7 @@ // CHECK-NEXT: AddressAlignment: 1 // CHECK-NEXT: EntrySize: 0 // CHECK-NEXT: SectionData ( -// CHECK-NEXT: 0000: 58010000 | +// CHECK-NEXT: 0000: 78010000 | // CHECK-NEXT: ) // The content of .data should be the address of .mysec. Index: test/ELF/linkerscript/align-section-offset.test =================================================================== --- test/ELF/linkerscript/align-section-offset.test +++ test/ELF/linkerscript/align-section-offset.test @@ -8,5 +8,5 @@ .foo : ALIGN(2M) { *(.foo) } } -# CHECK: .foo PROGBITS 0000000000200000 201000 000008 00 WA 0 0 2097152 -# CHECK: LOAD 0x001048 0x0000000000000048 0x0000000000000048 {{.*}} RW 0x200000 +# CHECK: .foo PROGBITS 0000000000200000 200000 000008 00 WA 0 0 2097152 +# CHECK: LOAD 0x200000 0x0000000000200000 0x0000000000200000 {{.*}} RW 0x200000 Index: test/ELF/linkerscript/overlapping-sections.s =================================================================== --- test/ELF/linkerscript/overlapping-sections.s +++ test/ELF/linkerscript/overlapping-sections.s @@ -66,8 +66,8 @@ # RUN: not ld.lld -o %t.so --script %t-both-overlap.script %t.o -shared 2>&1 | FileCheck %s -check-prefix BOTH-OVERLAP-ERR # BOTH-OVERLAP-ERR: error: section .sec1 file range overlaps with .sec2 -# BOTH-OVERLAP-ERR-NEXT: >>> .sec1 range is [0x9000, 0x90FF] -# BOTH-OVERLAP-ERR-NEXT: >>> .sec2 range is [0x9040, 0x913F] +# BOTH-OVERLAP-ERR-NEXT: >>> .sec1 range is [0x2000, 0x20FF] +# BOTH-OVERLAP-ERR-NEXT: >>> .sec2 range is [0x2040, 0x213F] # BOTH-OVERLAP-ERR: error: section .sec1 virtual address range overlaps with .sec2 # BOTH-OVERLAP-ERR-NEXT: >>> .sec1 range is [0x8000, 0x80FF] # BOTH-OVERLAP-ERR-NEXT: >>> .sec2 range is [0x8040, 0x813F] @@ -93,14 +93,14 @@ # RUN: llvm-readobj -sections -program-headers -elf-output-style=GNU %t.so | FileCheck %s -check-prefix BAD-BOTH # BAD-BOTH-LABEL: Section Headers: -# BAD-BOTH: .sec1 PROGBITS 0000000000008000 009000 000100 00 WA 0 0 1 -# BAD-BOTH: .sec2 PROGBITS 0000000000008040 009040 000100 00 WA 0 0 1 +# BAD-BOTH: .sec1 PROGBITS 0000000000008000 002000 000100 00 WA 0 0 1 +# BAD-BOTH: .sec2 PROGBITS 0000000000008040 002040 000100 00 WA 0 0 1 # BAD-BOTH-LABEL: Program Headers: # BAD-BOTH-NEXT: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align # BAD-BOTH-NEXT: LOAD 0x001000 0x0000000000000000 0x0000000000000000 0x000100 0x000100 R E 0x1000 -# BAD-BOTH-NEXT: LOAD 0x001100 0x0000000000000100 0x0000000000000100 0x008040 0x008040 RW 0x1000 +# BAD-BOTH-NEXT: LOAD 0x001100 0x0000000000000100 0x0000000000000100 0x000070 0x000070 RW 0x1000 # BAD-BOTH-LABEL: Section to Segment mapping: -# BAD-BOTH: 01 .text .dynamic .sec1 .sec2 +# BAD-BOTH: 01 .text .dynamic .section .first_sec,"aw",@progbits .rept 0x100 Index: test/ELF/linkerscript/repsection-symbol.s =================================================================== --- test/ELF/linkerscript/repsection-symbol.s +++ test/ELF/linkerscript/repsection-symbol.s @@ -10,13 +10,13 @@ # RUN: llvm-readobj -t %t1 | FileCheck %s # CHECK: Name: foo1 -# CHECK-NEXT: Value: 0x288 +# CHECK-NEXT: Value: 0x2C0 # CHECK: Name: foo2 -# CHECK-NEXT: Value: 0x290 +# CHECK-NEXT: Value: 0x2C8 # CHECK: Name: foo3 -# CHECK-NEXT: Value: 0x294 +# CHECK-NEXT: Value: 0x2CC .section .foo.1,"a" .long 1 Index: test/ELF/map-file.s =================================================================== --- test/ELF/map-file.s +++ test/ELF/map-file.s @@ -41,22 +41,22 @@ labs = 0x1AB5 // CHECK: VMA LMA Size Align Out In Symbol -// CHECK-NEXT: 2001c8 2001c8 78 8 .dynsym -// CHECK-NEXT: 2001c8 2001c8 78 8 :(.dynsym) -// CHECK-NEXT: 200240 200240 2c 8 .gnu.hash -// CHECK-NEXT: 200240 200240 2c 8 :(.gnu.hash) -// CHECK-NEXT: 20026c 20026c 30 4 .hash -// CHECK-NEXT: 20026c 20026c 30 4 :(.hash) -// CHECK-NEXT: 20029c 20029c 31 1 .dynstr -// CHECK-NEXT: 20029c 20029c 31 1 :(.dynstr) -// CHECK-NEXT: 2002d0 2002d0 30 8 .rela.dyn -// CHECK-NEXT: 2002d0 2002d0 30 8 :(.rela.dyn) -// CHECK-NEXT: 200300 200300 30 8 .rela.plt -// CHECK-NEXT: 200300 200300 30 8 :(.rela.plt) -// CHECK-NEXT: 200330 200330 64 8 .eh_frame -// CHECK-NEXT: 200330 200330 2c 1 {{.*}}{{/|\\}}map-file.s.tmp1.o:(.eh_frame+0x0) -// CHECK-NEXT: 200360 200360 14 1 {{.*}}{{/|\\}}map-file.s.tmp1.o:(.eh_frame+0x2c) -// CHECK-NEXT: 200378 200378 18 1 {{.*}}{{/|\\}}map-file.s.tmp2.o:(.eh_frame+0x18) +// CHECK-NEXT: 200200 200200 78 8 .dynsym +// CHECK-NEXT: 200200 200200 78 8 :(.dynsym) +// CHECK-NEXT: 200278 200278 2c 8 .gnu.hash +// CHECK-NEXT: 200278 200278 2c 8 :(.gnu.hash) +// CHECK-NEXT: 2002a4 2002a4 30 4 .hash +// CHECK-NEXT: 2002a4 2002a4 30 4 :(.hash) +// CHECK-NEXT: 2002d4 2002d4 31 1 .dynstr +// CHECK-NEXT: 2002d4 2002d4 31 1 :(.dynstr) +// CHECK-NEXT: 200308 200308 30 8 .rela.dyn +// CHECK-NEXT: 200308 200308 30 8 :(.rela.dyn) +// CHECK-NEXT: 200338 200338 30 8 .rela.plt +// CHECK-NEXT: 200338 200338 30 8 :(.rela.plt) +// CHECK-NEXT: 200368 200368 64 8 .eh_frame +// CHECK-NEXT: 200368 200368 2c 1 {{.*}}{{/|\\}}map-file.s.tmp1.o:(.eh_frame+0x0) +// CHECK-NEXT: 200398 200398 14 1 {{.*}}{{/|\\}}map-file.s.tmp1.o:(.eh_frame+0x2c) +// CHECK-NEXT: 2003b0 2003b0 18 1 {{.*}}{{/|\\}}map-file.s.tmp2.o:(.eh_frame+0x18) // CHECK-NEXT: 201000 201000 2d 4 .text // CHECK-NEXT: 201000 201000 28 4 {{.*}}{{/|\\}}map-file.s.tmp1.o:(.text) // CHECK-NEXT: 201000 201000 0 1 _start Index: test/ELF/merge-shared-str.s =================================================================== --- test/ELF/merge-shared-str.s +++ test/ELF/merge-shared-str.s @@ -19,10 +19,10 @@ // CHECK-NEXT: SHF_MERGE // CHECK-NEXT: SHF_STRINGS // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x228 +// CHECK-NEXT: Address: 0x260 // CHECK: Relocations [ // CHECK-NEXT: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x{{.*}} R_X86_64_RELATIVE - 0x229 +// CHECK-NEXT: 0x{{.*}} R_X86_64_RELATIVE - 0x261 // CHECK-NEXT: } // CHECK-NEXT: ] Index: test/ELF/merge-shared.s =================================================================== --- test/ELF/merge-shared.s +++ test/ELF/merge-shared.s @@ -17,10 +17,10 @@ // CHECK-NEXT: SHF_ALLOC // CHECK-NEXT: SHF_MERGE // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x228 +// CHECK-NEXT: Address: 0x260 // CHECK: Relocations [ // CHECK-NEXT: Section ({{.*}}) .rela.dyn { -// CHECK-NEXT: 0x{{.*}} R_X86_64_RELATIVE - 0x22A +// CHECK-NEXT: 0x{{.*}} R_X86_64_RELATIVE - 0x262 // CHECK-NEXT: } // CHECK-NEXT: ] Index: test/ELF/pack-dyn-relocs-loop.s =================================================================== --- test/ELF/pack-dyn-relocs-loop.s +++ test/ELF/pack-dyn-relocs-loop.s @@ -16,8 +16,8 @@ // CHECK-NEXT: Flags [ (0x2) // CHECK-NEXT: SHF_ALLOC (0x2) // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x210 -// CHECK-NEXT: Offset: 0x210 +// CHECK-NEXT: Address: 0x248 +// CHECK-NEXT: Offset: 0x248 // CHECK-NEXT: Size: 22 // CHECK: Name: x (43) @@ -25,8 +25,8 @@ // CHECK-NEXT: Flags [ (0x2) // CHECK-NEXT: SHF_ALLOC (0x2) // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x226 -// CHECK-NEXT: Offset: 0x226 +// CHECK-NEXT: Address: 0x25E +// CHECK-NEXT: Offset: 0x25E // CHECK-NEXT: Size: 64980 // CHECK: Name: barr (45) @@ -34,8 +34,8 @@ // CHECK-NEXT: Flags [ (0x2) // CHECK-NEXT: SHF_ALLOC (0x2) // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0xFFFA -// CHECK-NEXT: Offset: 0xFFFA +// CHECK-NEXT: Address: 0x10032 +// CHECK-NEXT: Offset: 0x10032 // CHECK-NEXT: Size: 0 // CHECK: Name: foo (71) @@ -44,8 +44,8 @@ // CHECK-NEXT: SHF_ALLOC (0x2) // CHECK-NEXT: SHF_WRITE (0x1) // CHECK-NEXT: ] -// CHECK-NEXT: Address: 0x20004 -// CHECK-NEXT: Offset: 0x20004 +// CHECK-NEXT: Address: 0x30004 +// CHECK-NEXT: Offset: 0x30004 // CHECK-NEXT: Size: 12 Index: test/ELF/ppc64-relocs.s =================================================================== --- test/ELF/ppc64-relocs.s +++ test/ELF/ppc64-relocs.s @@ -160,11 +160,11 @@ # DATALE: Disassembly of section .rodata: # DATALE: .rodata: -# DATALE: 10000190: b8 fe 00 00 +# DATALE: 100001c8: 80 fe 00 00 # DATABE: Disassembly of section .rodata: # DATABE: .rodata: -# DATABE: 10000190: 00 00 fe b8 +# DATABE: 100001c8: 00 00 fe 80 # Address of rodata + value stored at rodata entry # should equal address of LBB0_2. @@ -194,11 +194,11 @@ # 0x100001aa + 0xfeae = 0x10010058 # DATALE: Disassembly of section .eh_frame: # DATALE: .eh_frame: -# DATALE: 100001a8: {{.*}} ae fe +# DATALE: 100001d0: {{.*}} 00 00 # DATABE: Disassembly of section .eh_frame: # DATABE: .eh_frame: -# DATABE: 100001b0: fe ae {{.*}} +# DATABE: 100001e8: fe 76 {{.*}} # CHECK: __foo # CHECK-NEXT: 10010058: {{.*}} li 3, 0 Index: test/ELF/relocation.s =================================================================== --- test/ELF/relocation.s +++ test/ELF/relocation.s @@ -113,7 +113,7 @@ .quad R_X86_64_64 // CHECK: Contents of section .R_X86_64_64: -// CHECK-NEXT: 2002c0 c0022000 00000000 +// CHECK-NEXT: 2002f8 f8022000 00000000 .section .R_X86_64_GOTPCREL,"a",@progbits .global R_X86_64_GOTPCREL @@ -122,7 +122,7 @@ // 0x2020F0(.got) - 0x2002c8(.R_X86_64_GOTPCREL) = 0x1e28 // CHECK: Contents of section .R_X86_64_GOTPCREL -// CHECK-NEXT: 2002c8 281e0000 +// CHECK-NEXT: 200300 f01d0000 .section .R_X86_64_GOT32,"a",@progbits .global R_X86_64_GOT32 Index: test/ELF/relro.s =================================================================== --- test/ELF/relro.s +++ test/ELF/relro.s @@ -19,12 +19,13 @@ // CHECK-NEXT: LOAD // CHECK-NEXT: LOAD // CHECK-NEXT: LOAD +// CHECK-NEXT: LOAD // CHECK-NEXT: DYNAMIC // CHECK-NEXT: GNU_RELRO // CHECK: Section to Segment mapping: -// FULLRELRO: 05 .openbsd.randomdata .dynamic .got .got.plt {{$}} -// PARTRELRO: 05 .openbsd.randomdata .dynamic .got {{$}} +// FULLRELRO: 03 .openbsd.randomdata .dynamic .got .got.plt {{$}} +// PARTRELRO: 03 .openbsd.randomdata .dynamic .got {{$}} // NORELRO-NOT: GNU_RELRO Index: test/ELF/verdef-defaultver.s =================================================================== --- test/ELF/verdef-defaultver.s +++ test/ELF/verdef-defaultver.s @@ -150,8 +150,8 @@ # EXE-NEXT: ] # EXE-NEXT: Version symbols { # EXE-NEXT: Section Name: .gnu.version -# EXE-NEXT: Address: 0x200228 -# EXE-NEXT: Offset: 0x228 +# EXE-NEXT: Address: 0x200260 +# EXE-NEXT: Offset: 0x260 # EXE-NEXT: Link: 1 # EXE-NEXT: Symbols [ # EXE-NEXT: Symbol { Index: test/ELF/verdef.s =================================================================== --- test/ELF/verdef.s +++ test/ELF/verdef.s @@ -70,8 +70,8 @@ # MAIN: Version symbols { # MAIN-NEXT: Section Name: .gnu.version -# MAIN-NEXT: Address: 0x200228 -# MAIN-NEXT: Offset: 0x228 +# MAIN-NEXT: Address: 0x200260 +# MAIN-NEXT: Offset: 0x260 # MAIN-NEXT: Link: 1 # MAIN-NEXT: Symbols [ # MAIN-NEXT: Symbol { Index: test/ELF/verneed.s =================================================================== --- test/ELF/verneed.s +++ test/ELF/verneed.s @@ -16,8 +16,8 @@ # CHECK-NEXT: Flags [ (0x2) # CHECK-NEXT: SHF_ALLOC (0x2) # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x2001C8 -# CHECK-NEXT: Offset: 0x1C8 +# CHECK-NEXT: Address: 0x200200 +# CHECK-NEXT: Offset: 0x200 # CHECK-NEXT: Size: 96 # CHECK-NEXT: Link: [[DYNSTR:.*]] # CHECK-NEXT: Info: 1 @@ -47,7 +47,7 @@ # CHECK-NEXT: SHF_ALLOC (0x2) # CHECK-NEXT: ] # CHECK-NEXT: Address: [[VERNEED:.*]] -# CHECK-NEXT: Offset: 0x230 +# CHECK-NEXT: Offset: 0x268 # CHECK-NEXT: Size: 80 # CHECK-NEXT: Link: 5 # CHECK-NEXT: Info: 2 @@ -60,8 +60,8 @@ # CHECK-NEXT: Flags [ (0x2) # CHECK-NEXT: SHF_ALLOC (0x2) # CHECK-NEXT: ] -# CHECK-NEXT: Address: 0x2002A8 -# CHECK-NEXT: Offset: 0x2A8 +# CHECK-NEXT: Address: 0x2002E0 +# CHECK-NEXT: Offset: 0x2E0 # CHECK-NEXT: Size: 47 # CHECK-NEXT: Link: 0 # CHECK-NEXT: Info: 0