x86_64: Reduce ld max-page-size option again
authorBen Hutchings <ben@decadent.org.uk>
Sun, 15 Jul 2018 20:27:09 +0000 (21:27 +0100)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 19 Jul 2018 00:13:54 +0000 (01:13 +0100)
commit611c1aed0aa3397e71224daeb02d69d35278b340
treef7f7b8c130513ab0ebc8684d0968d84c6bd43bd1
parent6d3a26a631835d0d9a160b927655461f4297d2bf
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.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name x86_64-reduce-ld-max-page-size-option-again.patch
usr/klibc/arch/x86_64/MCONFIG