[klibc] x86_64: Use -Ttext-segment to avoid address collision
Building klibc for x86_64 with binutils 2.31 adds an extra
.note.gnu.property section to klibc.so, the address of which is not
affected by the -Ttext option. Loading a klibc executable then
fails with the following kernel log message:
9409 (sh.shared): Uhuuh, elf segment at 0000000000200000 requested but the memory is mapped already
I don't exactly see why this is happening, but it is triggered by the
new section and the collision can be avoided by passing -Ttext-segment
instead of -Ttext. A similar change was applied to MIPS recently.
Link: https://www.zytor.com/pipermail/klibc/2019-January/004024.html
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
1 file changed