File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1660,7 +1660,7 @@ template <class ELFT> void Writer<ELFT>::setPhdrs() {
1660
1660
P.p_paddr = First->getLMA ();
1661
1661
}
1662
1662
if (P.p_type == PT_LOAD)
1663
- P.p_align = Config->MaxPageSize ;
1663
+ P.p_align = std::max< uint64_t >(P. p_align , Config->MaxPageSize ) ;
1664
1664
else if (P.p_type == PT_GNU_RELRO) {
1665
1665
P.p_align = 1 ;
1666
1666
// The glibc dynamic loader rounds the size down, so we need to round up
Original file line number Diff line number Diff line change 2
2
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3
3
# RUN: echo "SECTIONS { .foo : ALIGN(2M) { *(.foo) } }" > %t.script
4
4
# RUN: ld.lld -o %t --script %t.script %t.o -shared
5
- # RUN: llvm-readelf -S %t | FileCheck %s
5
+ # RUN: llvm-readelf -S -l %t | FileCheck %s
6
6
7
7
# CHECK: .foo PROGBITS 0000000000200000 200000 000008 00 WA 0 0 2097152
8
+ # CHECK: LOAD 0x200000 0x0000000000200000 0x0000000000200000 {{.*}} RW 0x200000
8
9
9
10
.section .foo, "aw"
10
11
.quad 42
You can’t perform that action at this time.
0 commit comments