[klibc] mips: use -Ttext-segment when linking shared library

Most architectures use the -Ttext option to move the klibc shared
library out of the way of the normal load address. Unfortunately MIPS
has some extra sections which are positioned before the .text section
and are therefore not repositioned by the -Ttext option.

Fix this by using the -Ttext-segment option. Instead of changing the
address of the .text section, this option changes the .text segment
which happens to include all the special MIPS sections. After this we
can drop the linker script which we no longer need.

Signed-off-by: James Cowgill <james.cowgill@mips.com>
Link: https://www.zytor.com/pipermail/klibc/2018-March/003981.html
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2 files changed