* Linking error: undefined reference __umoddi3, __udivdi3
@ 2003-12-30 8:31 Ganeshan
0 siblings, 0 replies; only message in thread
From: Ganeshan @ 2003-12-30 8:31 UTC (permalink / raw)
To: ecos-maintainers
[-- Attachment #1: Type: text/plain, Size: 4007 bytes --]
I am building the application for h8300 series on linux.
I have built the toolchain, followed the
http://ecos.sourceware.org/build-toolchain.html with
target as h8300-elf. and it is in /gnutools/h8300-elf
my system is installed Linux-9.0, kernel- 2.4.20-8
gcc native compiler version is 3.2.2 (which has been used to build the
h8300-elf toolchain).
GNU tools used:
binutils-2.13.1.tar.bz2
gcc-core-3.2.1.tar.gz
gcc-g++-3.2.1.tar.gz
newlib-1.11.0.tar.gz
insight-5.3.tar.bz2
eCos - 2.0
I could not able to build the a simple 'c' program.
The following command used to build.
#mpco is the target which I have created.
ecosconfig new h8max // even I tried to build
h8300h_sim target
ecosconfig remove CYGPKG_LIBM //since the math library build is
given problem & also right it is not required for me
ecosconfig remove CYGPKG_KERNEL //Right now it is not required for me
ecosconfig tree
make
###############################
test.c
##############################
cyg_start()
{
int i,j,k;
i=5;
j=8;
k=i+j;
}
############ end of test.c ########
To compile and link with my small 'c' program. I used the following
command
h8300-elf-gcc -g -mh -I./install/include -L./install/lib -Ttarget.ld
-nostdlib test.c
I got following errors
Reading specs from /gnutools/lib/gcc-lib/h8300-elf/3.2.1/specs
Configured with: /src/gcc-3.2.1/configure --target=h8300-elf
--prefix=/gnutools --enable-languages=c,c++ --with-gnu-as --with-gnu-ld
--with-newlib --with-gxx-include-dir=/gnutools/h8300-elf/include -v :
(reconfigured) /src/gcc-3.2.1/configure --target=h8300-elf
--prefix=/gnutools --enable-languages=c,c++ --with-gnu-as --with-gnu-ld
--with-newlib --with-gxx-include-dir=/gnutools/h8300-elf/include -v
Thread model: single
gcc version 3.2.1
/gnutools/lib/gcc-lib/h8300-elf/3.2.1/cc1 -lang-c -v
-I./install/include -D__GNUC__=3 -D__GNUC_MINOR__=2
-D__GNUC_PATCHLEVEL__=1 -D__GXX_ABI_VERSION=102
-D__LONG_MAX__=2147483647L -D__LONG_MAX__=2147483647L -D__NO_INLINE__
-D__STDC_HOSTED__=1 -D__H8300H__ -D__SIZE_TYPE__=unsigned long
-D__PTRDIFF_TYPE__=long -Acpu=h8300h -Amachine=h8300h
-D__INT_MAX__=32767 -D__LONG_LONG_MAX__=2147483647L -D__ELF__ hello.c
-quiet -dumpbase hello.c -mh -g -version -o /tmp/ccGL5leO.s
GNU CPP version 3.2.1 (cpplib) (Hitachi H8/300)
GNU C version 3.2.1 (h8300-elf)
compiled by GNU C version 3.2.2 20030222 (Red Hat Linux 3.2.2-5).
ignoring nonexistent directory "/gnutools/h8300-elf/sys-include"
#include "..." search starts here:
#include <...> search starts here:
install/include
/gnutools/include
/gnutools/lib/gcc-lib/h8300-elf/3.2.1/include
/gnutools/h8300-elf/include
End of search list.
/gnutools/lib/gcc-lib/h8300-elf/3.2.1/../../../../h8300-elf/bin/as
--traditional-format -o /tmp/ccW0tsgt.o /tmp/ccGL5leO.s
/gnutools/lib/gcc-lib/h8300-elf/3.2.1/collect2 -m h8300helf
-L./install/lib -L/gnutools/lib/gcc-lib/h8300-elf/3.2.1/h8300h
-L/gnutools/lib/gcc-lib/h8300-elf/3.2.1
-L/gnutools/lib/gcc-lib/h8300-elf/3.2.1/../../../../h8300-elf/lib/h8300h
-L/gnutools/lib/gcc-lib/h8300-elf/3.2.1/../../../../h8300-elf/lib
/tmp/ccW0tsgt.o -Ttarget.ld
./install/lib/libtarget.a(infra_diag.o): In function `.LM38':
infra_diag.o(.text+0x233): undefined reference to `___umoddi3'
./install/lib/libtarget.a(infra_diag.o): In function `.LM40':
infra_diag.o(.text+0x27d): undefined reference to `___udivdi3'
./install/lib/libtarget.a(infra_diag.o): In function `.LM65':
infra_diag.o(.text+0x437): undefined reference to `___umoddi3'
./install/lib/libtarget.a(infra_diag.o): In function `.LM66':
infra_diag.o(.text+0x47d): undefined reference to `___udivdi3'
./install/lib/libtarget.a(infra_diag.o): In function `.LM141':
infra_diag.o(.text+0x8ef): undefined reference to `___ashrdi3'
./install/lib/libtarget.a(infra_diag.o): In function `.LM162':
infra_diag.o(.text+0xa4b): undefined reference to `___negdi2'
collect2: ld returned 1 exit status
What could be the wrong?
Thanks in advance
[-- Attachment #2: Card for Ganeshan --]
[-- Type: text/x-vcard, Size: 348 bytes --]
begin:vcard
n:Ganeshan;N
tel;fax:2296502
tel;home:3592259
tel;work:2296484 Ext:25
x-mozilla-html:FALSE
url:www.ads-networks.com
org:Analog and Digital Systems;Networking
version:2.1
email;internet:ganeshan@ads-networks.com
adr;quoted-printable:;;Lavelle Mansion,=0D=0ALavelle Road=0D=0A;Bangalore;Karnataka;560 001;INDIA
fn:Ganeshan
end:vcard
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-12-30 8:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-30 8:31 Linking error: undefined reference __umoddi3, __udivdi3 Ganeshan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).