[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 <firstname.lastname@example.org>
Signed-off-by: Ben Hutchings <email@example.com>
2 files changed