Closed WX10 closed 6 years ago
@kito-cheng Thank U very much!According to your answer, I have solved the problem successfully.
RISC-V newlib does not have -shared support. This was causing binutils testsuite failures, as the riscv*-elf toolchain claimed to have shared support, but it did not work. Disabling shared support solved the problem. Most bare metal toolchains have shared support turned off, so this is normal behavior.
Note that linux and bare metal toolchains often have different ABIs. Using an elf toolchain on a linux kernel is risky. You really should use the linux toolchain to ensure that you get the right ABI.
It seem like because -shared and -pie support is removed from riscv elf binutils. So that's mean you must use linux toolchain to compile linux kernel.
@palmer-dabbelt @jim-wilson just curious why those option are removed in elf bare-metal toolchain? AArch64 and ARM's elf toolchain seems support -shared and -pie?