OpenCores
no use no use 1/1 no use no use
undefined reference to `___umodsi3'
by nick02 on Jan 12, 2015
nick02
Posts: 9
Joined: Oct 21, 2014
Last seen: Dec 22, 2016
Hi all,

I am using pre-compiled version of toolchain for linux from the archive "or32-elf-linux-x86_64.tar.bz2".

I got this error message when I compiled the c code with modulo operation.

Can anyone help?

or32-elf-gcc -O2 -g -c -Wunknown-pragmas ./src/main.c -o obj/main.o
--- Linking ---
or32-elf-ld -Bstatic ./obj/reset.o ./obj/main.o ./obj/interrupt.o ./obj/support.o --stats -T link.ld -o boot.or32
./obj/main.o: In function `main':
/proj/OpenRISC/c/compiler_env/./src/main.c:43: undefined reference to `___umodsi3'


Nick
RE: undefined reference to `___umodsi3'
by stekern on Jan 12, 2015
stekern
Posts: 84
Joined: Apr 28, 2009
Last seen: Nov 10, 2016
You are not linking against libgcc (that contains ___umodsi3).
You can either do the linking with gcc directly and it will handle that for you
or you will need to provide the path to libgcc.a to ld.
'or32-linux-gcc -print-libgcc-file-name' will tell you the location.
RE: undefined reference to `___umodsi3'
by nick02 on Jan 14, 2015
nick02
Posts: 9
Joined: Oct 21, 2014
Last seen: Dec 22, 2016
Hi stekern,

Thanks for your help.

Nick
no use no use 1/1 no use no use
© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.