Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ld: -shared not supported #3

Open
ardeal opened this issue Jan 12, 2023 · 0 comments
Open

ld: -shared not supported #3

ardeal opened this issue Jan 12, 2023 · 0 comments

Comments

@ardeal
Copy link

ardeal commented Jan 12, 2023

Hi,

my envrionment:
ubuntu 20.04,
toolchain: riscv32-elf-ubuntu-20.04-nightly-2022.12.17-nightly.tar.gz
riscv-linux link: https://github.com/CSL-KU/riscv-linux

I would like to build riscv-linux and then run it on embedded RISCV MCU. I am experiencing the following issue

I searched the issue in Google, and found out a few links that are very similar with my issue:

riscv-collab/riscv-gnu-toolchain#335
riscv-collab/riscv-gnu-toolchain#803
michaeljclark/busybear-linux#5

according to those above links, the most possible solution may be change a new toolchain. My question is: which toolchain I should use?

in the above 335 link, the answer is:
You have to use a linux toolchain instead of an elf toolchain to build the kernel.
it asks me to use a linux toolchain, where is it?
I am going to run the compiled linux on riscv, could I use the PC Linux toolchain? I got confused!!!

  CALL    scripts/checksyscalls.sh
  CHK     scripts/mod/devicetable-offsets.h
  CHK     include/generated/compile.h
  VDSOLD  arch/riscv/kernel/vdso/vdso.so.dbg
/opt/riscv/lib/gcc/riscv32-unknown-elf/12.2.0/../../../../riscv32-unknown-elf/bin/ld: -shared not supported
collect2: error: ld returned 1 exit status
  OBJCOPY arch/riscv/kernel/vdso/vdso.so
riscv32-unknown-elf-objcopy: 'arch/riscv/kernel/vdso/vdso.so.dbg': No such file
make[2]: *** [arch/riscv/kernel/vdso/Makefile:48: arch/riscv/kernel/vdso/vdso.so] Error 1
make[1]: *** [scripts/Makefile.build:575: arch/riscv/kernel/vdso] Error 2
make: *** [Makefile:1018: arch/riscv/kernel] Error 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant