[klibc] x86_64: Reduce ld max-page-size option again
Building klibc with binutils 2.30 results in the following layout
for klibc.so:
Idx Name Size VMA LMA File off Algn
0 .text 0000d1ff 0000000000200200 0000000000200200 00000200 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .rodata 000031af 0000000000300000 0000000000300000 00100000 2**5
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .data.rel.ro 00000990 0000000000403660 0000000000403660 00103660 2**5
CONTENTS, ALLOC, LOAD, DATA
3 .data 00000140 0000000000404000 0000000000404000 00104000 2**5
CONTENTS, ALLOC, LOAD, DATA
4 .bss 000042f8 0000000000404140 0000000000404140 00104140 2**5
ALLOC
The .text and .rodata sections have each been padded to the specified
maximum page size of 1 MB, causing the following sections to overlap
the executable.
This causes all klibc executables to crash immediately.
Since there's no architectural page size betwen 4 KB and 2MB, set
max-page-size to 4 KB.
Link: https://www.zytor.com/pipermail/klibc/2018-July/003998.html
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
1 file changed