avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] RE: internal error: out of range error (Theodore A. Roth)


From: Dafni & Robert Berger
Subject: [avr-gcc-list] RE: internal error: out of range error (Theodore A. Roth)
Date: Sat, 11 Sep 2004 16:14:51 +0300

Ted wrote:
>SNIP
>No, the linker scripts come from binutils.
>
>The avrN.x scripts have the correct ALIGN(2) parts and would not show
>this error if used.

That's correct, if I have my suspicions line in the testcase only, there is
no problem.
Unfortunately I like to program components, which end up in libraries.
>
>Robert, why are you using the *.xr scripts instead of the *.x versions?

If I use the avrN.x to build my libraries, I get the errors, you see below
when I try to link an executable, which uses my libraries.

That's why I made it a habit to use different linker scripts for libraries
and executables.
*.r for libraries and *.x for executables.
As you can see, there are multiple definitions of some symbols in the .x
linker scripts.

Also it's a matter of style, but I like to write small modules, which end up
in libraries, which I can test and debug easily.

What you see here as one example project uses a library, which initialized
the hardware, the serial driver, the RTOS, the 7-Segment
driver and the testcase for the 7-Segment Driver.

Regards,

Robert

---- link executable -----
avr-gcc  -TF:/projects/undercvs/bergomat/config/atmega128_341.x  -Wl,-Map=ma
x7219_test.elf.map,--cref -mmcu=atmega128 -o
 max7219_test.out
max7219_test.elf -LF:/projects/undercvs/bergomat/lib  -lboardinit -lcomm -lu
cos_ii -lmax7219
F:/projects/undercvs/bergomat/lib\libcomm.a(.text+0x868): In function
`_etext':
: multiple definition of `_etext'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.text+0x3be): first defined
here
F:/projects/undercvs/bergomat/lib\libcomm.a(*ABS*+0x86a): In function
`__data_load_end':
avr_atmega_128.c: multiple definition of `__data_load_end'
F:/projects/undercvs/bergomat/lib\libcomm.a(*ABS*+0x868): In function
`__data_load_start':
avr_atmega_128.c: multiple definition of `__data_load_start'
F:/projects/undercvs/bergomat/lib\libcomm.a(.text+0x0): In function
`__ctors_end':
: multiple definition of `__dtors_end'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.text+0x0):F:/projects/unde
rcvs/bergomat/src/boardinit/memtest.c:49: fi
rst defined here
F:/projects/undercvs/bergomat/lib\libcomm.a(.eeprom+0x0): In function
`__eeprom_end':
: multiple definition of `__eeprom_end'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.eeprom+0x0): first defined
here
F:/projects/undercvs/bergomat/lib\libcomm.a(.text+0x0): In function
`__ctors_end':
: multiple definition of `__ctors_start'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.text+0x0):F:/projects/unde
rcvs/bergomat/src/boardinit/memtest.c:49: fi
rst defined here
F:/projects/undercvs/bergomat/lib\libcomm.a(.text+0x0): In function
`__ctors_end':
: multiple definition of `__dtors_start'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.text+0x0):F:/projects/unde
rcvs/bergomat/src/boardinit/memtest.c:49: fi
rst defined here
F:/projects/undercvs/bergomat/lib\libcomm.a(.text+0x0): In function
`__ctors_end':
: multiple definition of `__ctors_end'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.text+0x0):F:/projects/unde
rcvs/bergomat/src/boardinit/memtest.c:49: fi
rst defined here
F:/projects/undercvs/bergomat/lib\libcomm.a(.data+0x2): In function
`_edata':
: multiple definition of `_edata'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.data+0x32): first defined
here
F:/projects/undercvs/bergomat/lib\libcomm.a(.noinit+0x0): In function
`_end':
: multiple definition of `_end'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.noinit+0x0): first defined
here
F:/projects/undercvs/bergomat/lib\libucos_ii.a(.text+0x3f12): In function
`_etext':
: multiple definition of `_etext'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.text+0x3be): first defined
here
F:/projects/undercvs/bergomat/lib\libucos_ii.a(*ABS*+0x4044): In function
`__data_load_end':
os_cpu.c: multiple definition of `__data_load_end'
F:/projects/undercvs/bergomat/lib\libucos_ii.a(*ABS*+0x3f12): In function
`__data_load_start':
os_cpu.c: multiple definition of `__data_load_start'
F:/projects/undercvs/bergomat/lib\libucos_ii.a(.text+0x0): In function
`OS_StrCopy':
F:/projects/undercvs/bergomat/src/ucos_ii/os_core.c:1239: multiple
definition of `__dtors_end'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.text+0x0):F:/projects/unde
rcvs/bergomat/src/boardinit/memtest.c:49: fi
rst defined here
F:/projects/undercvs/bergomat/lib\libucos_ii.a(.eeprom+0x0): In function
`__eeprom_end':
: multiple definition of `__eeprom_end'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.eeprom+0x0): first defined
here
F:/projects/undercvs/bergomat/lib\libucos_ii.a(.text+0x0): In function
`OS_StrCopy':
F:/projects/undercvs/bergomat/src/ucos_ii/os_core.c:1239: multiple
definition of `__ctors_start'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.text+0x0):F:/projects/unde
rcvs/bergomat/src/boardinit/memtest.c:49: fi
rst defined here
F:/projects/undercvs/bergomat/lib\libucos_ii.a(.text+0x0): In function
`OS_StrCopy':
F:/projects/undercvs/bergomat/src/ucos_ii/os_core.c:1239: multiple
definition of `__dtors_start'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.text+0x0):F:/projects/unde
rcvs/bergomat/src/boardinit/memtest.c:49: fi
rst defined here
F:/projects/undercvs/bergomat/lib\libucos_ii.a(.text+0x0): In function
`OS_StrCopy':
F:/projects/undercvs/bergomat/src/ucos_ii/os_core.c:1239: multiple
definition of `__ctors_end'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.text+0x0):F:/projects/unde
rcvs/bergomat/src/boardinit/memtest.c:49: fi
rst defined here
F:/projects/undercvs/bergomat/lib\libucos_ii.a(.data+0x132): In function
`_edata':
: multiple definition of `_edata'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.data+0x32): first defined
here
F:/projects/undercvs/bergomat/lib\libucos_ii.a(.noinit+0x0): In function
`_end':
: multiple definition of `_end'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.noinit+0x0): first defined
here
F:/projects/undercvs/bergomat/lib\libmax7219.a(.text+0x3c): In function
`_etext':
: multiple definition of `_etext'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.text+0x3be): first defined
here
F:/projects/undercvs/bergomat/lib\libmax7219.a(*ABS*+0x3c): In function
`__data_load_start':
max7219.c: multiple definition of `__data_load_end'
F:/projects/undercvs/bergomat/lib\libmax7219.a(*ABS*+0x3c):max7219.c:
multiple definition of `__data_load_start'
F:/projects/undercvs/bergomat/lib\libmax7219.a(.text+0x0): In function
`__ctors_end':
: multiple definition of `__dtors_end'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.text+0x0):F:/projects/unde
rcvs/bergomat/src/boardinit/memtest.c:49: fi
rst defined here
F:/projects/undercvs/bergomat/lib\libmax7219.a(.eeprom+0x0): In function
`__eeprom_end':
: multiple definition of `__eeprom_end'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.eeprom+0x0): first defined
here
F:/projects/undercvs/bergomat/lib\libmax7219.a(.text+0x0): In function
`__ctors_end':
: multiple definition of `__ctors_start'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.text+0x0):F:/projects/unde
rcvs/bergomat/src/boardinit/memtest.c:49: fi
rst defined here
F:/projects/undercvs/bergomat/lib\libmax7219.a(.text+0x0): In function
`__ctors_end':
: multiple definition of `__dtors_start'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.text+0x0):F:/projects/unde
rcvs/bergomat/src/boardinit/memtest.c:49: fi
rst defined here
F:/projects/undercvs/bergomat/lib\libmax7219.a(.text+0x0): In function
`__ctors_end':
: multiple definition of `__ctors_end'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.text+0x0):F:/projects/unde
rcvs/bergomat/src/boardinit/memtest.c:49: fi
rst defined here
F:/projects/undercvs/bergomat/lib\libmax7219.a(.data+0x0): In function
`_edata':
: multiple definition of `_edata'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.data+0x32): first defined
here
F:/projects/undercvs/bergomat/lib\libmax7219.a(.noinit+0x0): In function
`_end':
: multiple definition of `_end'
F:/projects/undercvs/bergomat/lib\libboardinit.a(.noinit+0x0): first defined
here
gmake[1]: *** [max7219_test.out] Error 1
gmake[1]: Leaving directory
`F:/projects/undercvs/bergomat/src/max7219/hw_test1/objs/AVR128_UCOSII'
gmake: *** [default] Error 2





reply via email to

[Prev in Thread] Current Thread [Next in Thread]