This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Difference in assemble language


I now have the lib includeed in my make but i still get the same "undefined
reference"? Since the -lc (libc.a) only includes a symbolic link to the
libcygwin.a i tried to include the libcygwin.a explicitly but it still
doesn't work. I must have made some fundamental error.....?

/Daniel


arm-elf-gcc -mcpu=arm7tdmi                       -L/lib  -o LED_BLINK
led_blink.o ../../periph/pio/lib_pio.o ../../periph/power_saving/lib_p
s40800.o ../../periph/aic/lib_aic.o ../../periph/ebi/lib_ebi.o
../../periph/mem/ram_test.o ../../periph/mem/relocate.o
../../periph/special_
function/lib_sf.o ../../periph/spi/lib_spi.o ../../periph/stdc/lib_err.o
../../periph/timer_counter/lib_tc.o ../../periph/usart/lib_usart.o
../../periph/watchdog/lib_wd.o ../../periph/watchdog/irq_wd.o -lcygwin -lc
-lgcc
crt0.o: In function `have_jeeni0':
crt0.o(.text+0xc0): undefined reference to `memcpy'
crt0.o: In function `have_jeeni1':
crt0.o(.text+0xdc): undefined reference to `memset'
crt0.o(.text+0xf0): undefined reference to `exit'
crt0.o(.text+0xf4): undefined reference to `__stack_start__'
crt0.o(.text+0xf8): undefined reference to `__stackirq_start__'
crt0.o(.text+0x104): undefined reference to `__start__'
led_blink.o: In function `delay':
led_blink.o(.text+0xdc): undefined reference to `PIO_DESC'
led_blink.o: In function `main':
led_blink.o(.text+0x1a4): undefined reference to `printf'
led_blink.o(.text+0x1c0): undefined reference to `PIO_DESC'
../../periph/watchdog/irq_wd.o: In function `PtWDBase':
../../periph/watchdog/irq_wd.o(.text+0x0): undefined reference to `WD_BASE'
/tools/H-i686-pc-cygwin/lib/gcc-lib/arm-elf/2.95.2/libgcc.a(__main.o): In
function `__do_global_ctors':
__main.o(.text+0xbc): undefined reference to `atexit'
collect2: ld returned 1 exit status
make: *** [LED_BLINK] Error 1
bash.exe-2.04$










-----Original Message-----
From: Richard Earnshaw [mailto:rearnsha@arm.com]
Sent: den 29 mars 2001 12:32
To: Andersson Daniel
Cc: crossgcc@sourceware.cygnus.com; Richard.Earnshaw@arm.com
Subject: Re: Difference in assemble language 


> Hi,
> 
> I am slightly coming around the assembler problem now by manually editing
> the files. However, when i compile my files a get some strange problem (se
> below)
> 
> bash.exe-2.04$ make
> arm-elf-gcc -mcpu=arm7tdmi                       -lgcc -nostdlib -o
> LED_BLINK led_blink.o ../../periph/pio/lib_pio.o ../../periph/power_savi
> ng/lib_ps40800.o ../../periph/aic/lib_aic.o ../../periph/ebi/lib_ebi.o
> ../../periph/mem/ram_test.o ../../periph/mem/relocate.o ../../periph/
> special_function/lib_sf.o ../../periph/spi/lib_spi.o
> ../../periph/stdc/lib_err.o ../../periph/timer_counter/lib_tc.o
> ../../periph/usart/lib_
> usart.o ../../periph/watchdog/lib_wd.o ../../periph/watchdog/irq_wd.o
> -Tlinkerscript.ld -lgcc
> crt0.o: In function `have_jeeni0':
> crt0.o(.text+0xc0): undefined reference to `memcpy'
> crt0.o(.text+0xc0): relocation truncated to fit: R_ARM_PC24 memcpy
> crt0.o: In function `have_jeeni1':
> crt0.o(.text+0xdc): undefined reference to `memset'
> crt0.o(.text+0xdc): relocation truncated to fit: R_ARM_PC24 memset
> crt0.o(.text+0xf0): undefined reference to `exit'
> crt0.o(.text+0xf0): relocation truncated to fit: R_ARM_PC24 exit

memcpy, memset and exit are all in libc.a, but you have told the linker 
not to include that when linking (-nostdlib).



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]