Sign in

username:

password:



Not a member?

Search AT91SAM



Search tips

Subscribe to AT91SAM



Ads

Discussion Groups

Discussion Groups | AT91SAM ARM | AW: Arm Linking Problem

For users of the Atmel AT91SAM7 and AT91SAM9 ARM CPU chips. Atmel has taken a new direction by combining on chip flash and ram with the ARM CPU on a single die. This provides low cost devices for small systems using the ARM CPU. This group is to exchange information to help users get started and learn how to use the devices.

AW: Arm Linking Problem - "ICLI, Bekir (EXT)" - Feb 12 12:28:40 2008

Hi,

I have somehow managed the FP problem, but now it is much worse, there are hundreds of:

..\lib_usb\boot.lib:(.data+0x4): multiple definition of `__dso_handle'
d:/a/t/gnu/arm/bin/../lib/gcc/arm-elf/4.2.2/crtbegin.o:(.data+0x4): first defined here
..\lib_usb\boot.lib: In function `start':
reent.c:(.text+0xe0): multiple definition of `_mainCRTStartup'
d:/a/t/gnu/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib/crt0.o:(.text+0x0): first defined here
..\lib_usb\boot.lib: In function `_init':
reent.c:(.init+0x0): multiple definition of `_init'
d:/a/t/gnu/arm/bin/../lib/gcc/arm-elf/4.2.2/crti.o:crti.asm:(.init+0x0): first defined here
..\lib_usb\boot.lib: In function `__stack_base__':
reent.c:(.data+0x14): multiple definition of `__stack_base__'
d:/a/t/gnu/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib/crt0.o:(.data+0x8): first defined here
..\lib_usb\boot.lib: In function `start':
reent.c:(.text+0xe0): multiple definition of `_start'
d:/a/t/gnu/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib/crt0.o:(.text+0x0): first defined here
..\lib_usb\boot.lib: In function `_fini':
reent.c:(.fini+0x0): multiple definition of `_fini'
d:/a/t/gnu/arm/bin/../lib/gcc/arm-elf/4.2.2/crti.o:crti.asm:(.fini+0x0): first defined here
..\lib_usb\boot.lib: In function `start':
reent.c:(.text+0xe0): multiple definition of `start'
d:/a/t/gnu/arm/bin/../lib/gcc/arm-elf/4.2.2/../../../../arm-elf/lib/crt0.o:(.text+0x0): first defined here

kind of errors :(
Any idea? I am seeing these functions for the first time in my life.. So definitely not my functions..

Mit freundlichem Gruß / Best regards

Bekir ICLI

Siemens AG
Automation and Drives, Automation and Drives, A&D SC IC RD4
Tel. : +49 (721) 595-3280
mailto:b...@siemens.com
http://www.siemens.com/automation

Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme
Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer;
Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt, Hermann Requardt,
Siegfried Russwurm, Peter Y. Solmssen
Registered offices: Berlin and Munich;
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684
WEEE-Reg.-No. DE 23691322

________________________________

Von: A...@yahoogroups.com [mailto:A...@yahoogroups.com] Im Auftrag von 42Bastian
Gesendet: Dienstag, 12. Februar 2008 17:57
An: A...@yahoogroups.com
Betreff: Re: [AT91SAM] Arm Linking Problem

> I am trying to get my code compiled and linked, but there seems to
> be a problem saying " undefined reference to `__udivsi3' "

Seems you try to link with ld. Try gcc(or g++ if you use C++) and
supply linker specific options with -Wl.

--
42Bastian



(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )


Re: AW: Arm Linking Problem - 42Bastian - Feb 12 22:08:00 2008


> I have somehow managed the FP problem, but now it is much worse,
> there are hundreds of:

Try -nostartfiles for the (linker) gcc options:

arm-elf-gcc -nostartfiles ...

Also note: You should give the same CPU type options to all stages,
i.e. if you
call gcc for compiling with -mthumb do this as well for the linking stage.

--
42Bastian



(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )

AW: AW: Arm Linking Problem - "ICLI, Bekir (EXT)" - Feb 13 2:39:06 2008

I've tried "-nostartfiles" option, and it reduced the errors from millions to 5-6.
But the error is still the same. At the end, when i am trying to link multiple .lib files to generate the .bin file,
it says there are multiple definitions in 2 of these .lib files. And the files that hold the definitions are the same.

..\lib_usb\boot.lib: In function `__aeabi_uidiv':
C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:730: multiple definition of `__udivsi3'
..\..\hardware\hardware_arm\lib\hardware.lib:C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:730: first defined here
..\lib_usb\boot.lib: In function `__aeabi_idiv0':
C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:981: multiple definition of `__aeabi_ldiv0'
..\..\hardware\hardware_arm\lib\hardware.lib:C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:981: first defined here
..\lib_usb\boot.lib: In function `__aeabi_idiv0':
C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:981: multiple definition of `__div0'
..\..\hardware\hardware_arm\lib\hardware.lib:C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:981: first defined here
..\lib_usb\boot.lib: In function `__aeabi_uidiv':
C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:730: multiple definition of `__aeabi_uidiv'
..\..\hardware\hardware_arm\lib\hardware.lib:C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:730: first defined here
..\lib_usb\boot.lib: In function `__aeabi_uidivmod':
C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:765: multiple definition of `__aeabi_uidivmod'
..\..\hardware\hardware_arm\lib\hardware.lib:C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:765: first defined here
..\lib_usb\boot.lib: In function `__aeabi_idiv0':
C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:981: multiple definition of `__aeabi_idiv0'
..\..\hardware\hardware_arm\lib\hardware.lib:C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:981: first defined here
collect2: ld returned 1 exit status

As it can be seen, it complains about the same error 3 times (`__aeabi_idiv0')
Any suggestions?

Mit freundlichem Gruß / Best regards

Bekir ICLI

Siemens AG
Automation and Drives, Automation and Drives, A&D SC IC RD4
Tel. : +49 (721) 595-3280
mailto:b...@siemens.com
http://www.siemens.com/automation

Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme
Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer;
Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt, Hermann Requardt,
Siegfried Russwurm, Peter Y. Solmssen
Registered offices: Berlin and Munich;
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684
WEEE-Reg.-No. DE 23691322

________________________________

Von: A...@yahoogroups.com [mailto:A...@yahoogroups.com] Im Auftrag von 42Bastian
Gesendet: Dienstag, 12. Februar 2008 20:50
An: A...@yahoogroups.com
Betreff: Re: AW: [AT91SAM] Arm Linking Problem

> I have somehow managed the FP problem, but now it is much worse,
> there are hundreds of:

Try -nostartfiles for the (linker) gcc options:

arm-elf-gcc -nostartfiles ...

Also note: You should give the same CPU type options to all stages,
i.e. if you
call gcc for compiling with -mthumb do this as well for the linking stage.

--
42Bastian



(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )

Re: AW: AW: Arm Linking Problem - 42Bastian - Feb 13 3:13:37 2008

Hi
> I've tried "-nostartfiles" option, and it reduced the errors from millions to 5-6.
> But the error is still the same. At the end, when i am trying to link multiple .lib files to generate the .bin file,
> it says there are multiple definitions in 2 of these .lib files. And the files that hold the definitions are the same.
>
> ..\lib_usb\boot.lib: In function `__aeabi_uidiv':
> C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:730: multiple definition of `__udivsi3'

Next option would be -nostdlib. I just wonder, where does boot.lib come
from ? Is it really a library ?
--
42Bastian

Note: SPAM-only account, direct mail to bs42@...



(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )

AW: AW: Arm Linking Problem - "ICLI, Bekir (EXT)" - Feb 14 9:53:30 2008

Hi all,

I have solved the linking problem, but the .bin file that is generated is too large "180053 bytes".
When i generate the same code for power pc it is "19020 bytes".
I've seen that for powerpc what makes it much smaller is the option "--oformat=binary", but the same option does not change anything with my arm linking.
Do you have any suggestions?

Mit freundlichem Gruß / Best regards

Bekir ICLI

Siemens AG
Automation and Drives, Automation and Drives, A&D SC IC RD4
Tel. : +49 (721) 595-3280
mailto:b...@siemens.com
http://www.siemens.com/automation

Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme
Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer;
Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt, Hermann Requardt,
Siegfried Russwurm, Peter Y. Solmssen
Registered offices: Berlin and Munich;
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684
WEEE-Reg.-No. DE 23691322

________________________________

Von: A...@yahoogroups.com [mailto:A...@yahoogroups.com] Im Auftrag von ICLI, Bekir (EXT)
Gesendet: Mittwoch, 13. Februar 2008 08:32
An: A...@yahoogroups.com
Betreff: AW: AW: [AT91SAM] Arm Linking Problem

I've tried "-nostartfiles" option, and it reduced the errors from millions to 5-6.
But the error is still the same. At the end, when i am trying to link multiple .lib files to generate the .bin file,
it says there are multiple definitions in 2 of these .lib files. And the files that hold the definitions are the same.

..\lib_usb\boot.lib: In function `__aeabi_uidiv':
C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:730: multiple definition of `__udivsi3'
..\..\hardware\hardware_arm\lib\hardware.lib:C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:730: first defined here
..\lib_usb\boot.lib: In function `__aeabi_idiv0':
C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:981: multiple definition of `__aeabi_ldiv0'
..\..\hardware\hardware_arm\lib\hardware.lib:C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:981: first defined here
..\lib_usb\boot.lib: In function `__aeabi_idiv0':
C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:981: multiple definition of `__div0'
..\..\hardware\hardware_arm\lib\hardware.lib:C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:981: first defined here
..\lib_usb\boot.lib: In function `__aeabi_uidiv':
C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:730: multiple definition of `__aeabi_uidiv'
..\..\hardware\hardware_arm\lib\hardware.lib:C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:730: first defined here
..\lib_usb\boot.lib: In function `__aeabi_uidivmod':
C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:765: multiple definition of `__aeabi_uidivmod'
..\..\hardware\hardware_arm\lib\hardware.lib:C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:765: first defined here
..\lib_usb\boot.lib: In function `__aeabi_idiv0':
C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:981: multiple definition of `__aeabi_idiv0'
..\..\hardware\hardware_arm\lib\hardware.lib:C:\msys\1.0\home\yagarto\gcc-build\gcc/../../gcc-4.2.2/gcc/config/arm/lib1funcs.asm:981: first defined here
collect2: ld returned 1 exit status

As it can be seen, it complains about the same error 3 times (`__aeabi_idiv0')
Any suggestions?

Mit freundlichem Gruß / Best regards

Bekir ICLI

Siemens AG
Automation and Drives, Automation and Drives, A&D SC IC RD4
Tel. : +49 (721) 595-3280
mailto:b...@siemens.com
http://www.siemens.com/automation

Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme
Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer;
Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Erich R. Reinhardt, Hermann Requardt,
Siegfried Russwurm, Peter Y. Solmssen
Registered offices: Berlin and Munich;
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684
WEEE-Reg.-No. DE 23691322

________________________________

Von: A...@yahoogroups.com [mailto:A...@yahoogroups.com] Im Auftrag von 42Bastian
Gesendet: Dienstag, 12. Februar 2008 20:50
An: A...@yahoogroups.com
Betreff: Re: AW: [AT91SAM] Arm Linking Problem

> I have somehow managed the FP problem, but now it is much worse,
> there are hundreds of:

Try -nostartfiles for the (linker) gcc options:

arm-elf-gcc -nostartfiles ...

Also note: You should give the same CPU type options to all stages,
i.e. if you
call gcc for compiling with -mthumb do this as well for the linking stage.

--
42Bastian



(You need to be a member of AT91SAM -- send a blank email to AT91SAM-subscribe@yahoogroups.com )