[PATCH] D62059: [ELF] Don't align PT_TLS's p_memsz
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 17 05:49:06 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL361029: [ELF] Don't align PT_TLS's p_memsz (authored by MaskRay, committed by ).
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62059/new/
https://reviews.llvm.org/D62059
Files:
lld/trunk/ELF/Writer.cpp
lld/trunk/test/ELF/tls-align.s
Index: lld/trunk/ELF/Writer.cpp
===================================================================
--- lld/trunk/ELF/Writer.cpp
+++ lld/trunk/ELF/Writer.cpp
@@ -2202,11 +2202,6 @@
// done on other operating systems.
P->p_align = std::max<uint64_t>(P->p_align, Config->Wordsize * 8);
}
-
- // The TLS pointer goes after PT_TLS for variant 2 targets. At least glibc
- // will align it, so round up the size to make sure the offsets are
- // correct.
- P->p_memsz = alignTo(P->p_memsz, P->p_align);
}
}
}
Index: lld/trunk/test/ELF/tls-align.s
===================================================================
--- lld/trunk/test/ELF/tls-align.s
+++ lld/trunk/test/ELF/tls-align.s
@@ -1,21 +0,0 @@
-// REQUIRES: x86
-// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
-// RUN: ld.lld %t -o %tout -shared
-// RUN: llvm-readobj -l %tout | FileCheck %s
-
- .section .tbss,"awT", at nobits
- .align 8
- .long 0
-
-// CHECK: ProgramHeader {
-// CHECK: Type: PT_TLS
-// CHECK-NEXT: Offset:
-// CHECK-NEXT: VirtualAddress:
-// CHECK-NEXT: PhysicalAddress:
-// CHECK-NEXT: FileSize: 0
-// CHECK-NEXT: MemSize: 8
-// CHECK-NEXT: Flags [
-// CHECK-NEXT: PF_R (0x4)
-// CHECK-NEXT: ]
-// CHECK-NEXT: Alignment: 8
-// CHECK-NEXT: }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62059.200024.patch
Type: text/x-patch
Size: 1349 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190517/2d207309/attachment.bin>
More information about the llvm-commits
mailing list