Hi,
During the linker phase, the following errors "relocation truncated to fit:
R_MSP430_16_BYTE against `no symbol'" cause the linker to exit.
Also it appears `.text' will not fit in region `rom'.
I have built mspgcc 20120406 from source. I followed the install from source as
on the wiki. I had an issue with msp430-libc make install, but if I recall
correctly was only a directory that did not exist - which I manually created to
make the install work.
Please ignoere the "undefined references" in the compiler output snippet below.
That is due to a compiler option flag I removed.
I have swept trough a few previous posts in the archive and one suggests that
this issue might be related to:
<previous posting>
a validation done inside bfd/elf32-msp430.c "function
msp430_final_link_relocate" The MSP430_16_IN_RANGE (srel) returns 0 and and the
ld code goes on the error path from here.
<previous posting>
I would appreciated it if you coudl have a look at the compile log snippet
below and comment. I am compiling for the MSP420F2553.
Vincent
----------------------------------- snip
--------------------------------------------------------
GNU C (GCC) version 4.6.3 20120301 (mspgcc LTS 20120406 unpatched)
(msp430)compiled by GNU C version 4.6.3 20120306 (Red Hat 4.6.3-2), GMP version
4.3.2, MPFR version 3.0.0, MPC version 0.8.3-devGGC heuristics: --param
ggc-min-expand=100 --param ggc-min-heapsize=131072Compiler executable checksum:
c27679b30956b459154df91f6373f3cc/home/vincent/VinLaunchPad/AllExamples/Common/printf.c:32:13:
warning: ‘buf’ defined but not used
[-Wunused-variable]/home/vincent/VinLaunchPad/AllExamples/Common/printf.c:46:13:
warning: ‘divOut’ defined but not used
[-Wunused-function]COLLECT_GCC_OPTIONS='-mmcu=msp430g2553' '-D' 'LAUNCHPAD'
'-D' 'ZM_PHY_SPI' '-D' 'REGION_EUROPE' '-I' '/usr/local/msp430/include' '-O3'
'-Wall' '-c' '-fmessage-length=0' '-std=c99' '-v' '-MMD' '-MP' '-MF'
'Common/printf.d' '-MT' 'Common/printf.d' '-o' 'Common/printf.o' '-mcpu=430'
'-mmpy=none' '-mivcnt=16'
/usr/local/lib/gcc/msp430/4.6.3/../../../../msp430/bin/as -mcpu=430
-mmcu=msp430g2553 -o Common/printf.o
/tmp/ccVS2wxj.sCOMPILER_PATH=/usr/local/libexec/gcc/msp430/4.6.3/:/usr/local/libexec/gcc/msp430/4.6.3/:/usr/local/libexec/gcc/msp430/:/usr/local/lib/gcc/msp430/4.6.3/:/usr/local/lib/gcc/msp430/:/usr/local/lib/gcc/msp430/4.6.3/../../../../msp430/bin/LIBRARY_PATH=/usr/local/lib/gcc/msp430/4.6.3/:/usr/local/lib/gcc/msp430/4.6.3/../../../../msp430/lib/COLLECT_GCC_OPTIONS='-mmcu=msp430g2553'
'-D' 'LAUNCHPAD' '-D' 'ZM_PHY_SPI' '-D' 'REGION_EUROPE' '-I'
'/usr/local/msp430/include' '-O3' '-Wall' '-c' '-fmessage-length=0' '-std=c99'
'-v' '-MMD' '-MP' '-MF' 'Common/printf.d' '-MT' 'Common/printf.d' '-o'
'Common/printf.o' '-mcpu=430' '-mmpy=none' '-mivcnt=16'Using built-in
specs.Reading specs from
/usr/local/lib/gcc/msp430/4.6.3/../../../../msp430/lib/msp430mcu.specCOLLECT_GCC=msp430-gccCOLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/msp430/4.6.3/lto-wrapperTarget:
msp430Configured with: ../gcc-4.6.3/configure --target=msp430
--enable-languages=c --program-prefix=msp430-Thread model: singlegcc version
4.6.3 20120301 (mspgcc LTS 20120406 unpatched) (GCC)
COLLECT_GCC_OPTIONS='-mmcu=msp430g2553' '-D' 'LAUNCHPAD' '-D' 'ZM_PHY_SPI' '-D'
'REGION_EUROPE' '-I' '/usr/local/msp430/include' '-O3' '-Wall' '-c'
'-fmessage-length=0' '-std=c99' '-v' '-MMD' '-MP' '-MF' 'Common/utilities.d'
'-MT' 'Common/utilities.d' '-o' 'Common/utilities.o' '-mcpu=430' '-mmpy=none'
'-mivcnt=16' /usr/local/libexec/gcc/msp430/4.6.3/cc1 -quiet -v -I
/usr/local/msp430/include -MMD Common/utilities.d -MF Common/utilities.d -MP
-MT Common/utilities.d -D__MSP430G2553__ -D LAUNCHPAD -D ZM_PHY_SPI -D
REGION_EUROPE /home/vincent/VinLaunchPad/AllExamples/Common/utilities.c
-mcpu=430 -mmpy=none -mivcnt=16 -quiet -dumpbase utilities.c -mmcu=msp430g2553
-mcpu=430 -mmpy=none -mivcnt=16 -auxbase-strip Common/utilities.o -O3 -Wall
-std=c99 -version -fmessage-length=0 -o /tmp/cca1KY5m.sGNU C (GCC) version
4.6.3 20120301 (mspgcc LTS 20120406 unpatched) (msp430)compiled by GNU C
version 4.6.3 20120306 (Red Hat 4.6.3-2), GMP version 4.3.2, MPFR version
3.0.0, MPC version 0.8.3-devGGC heuristics: --param ggc-min-expand=100 --param
ggc-min-heapsize=131072ignoring nonexistent directory
"/usr/local/lib/gcc/msp430/4.6.3/../../../../msp430/sys-include"ignoring
duplicate directory "/usr/local/msp430/include" as it is a non-system
directory that duplicates a system directory#include "..." search starts
here:#include <...> search starts here: /usr/local/lib/gcc/msp430/4.6.3/include
/usr/local/lib/gcc/msp430/4.6.3/include-fixed
/usr/local/lib/gcc/msp430/4.6.3/../../../../msp430/includeEnd of search
list.GNU C (GCC) version 4.6.3 20120301 (mspgcc LTS 20120406 unpatched)
(msp430)compiled by GNU C version 4.6.3 20120306 (Red Hat 4.6.3-2), GMP version
4.3.2, MPFR version 3.0.0, MPC version 0.8.3-devGGC heuristics: --param
ggc-min-expand=100 --param ggc-min-heapsize=131072Compiler executable checksum:
c27679b30956b459154df91f6373f3ccCOLLECT_GCC_OPTIONS='-mmcu=msp430g2553' '-D'
'LAUNCHPAD' '-D' 'ZM_PHY_SPI' '-D' 'REGION_EUROPE' '-I'
'/usr/local/msp430/include' '-O3' '-Wall' '-c' '-fmessage-length=0' '-std=c99'
'-v' '-MMD' '-MP' '-MF' 'Common/utilities.d' '-MT' 'Common/utilities.d' '-o'
'Common/utilities.o' '-mcpu=430' '-mmpy=none' '-mivcnt=16'
/usr/local/lib/gcc/msp430/4.6.3/../../../../msp430/bin/as -mcpu=430
-mmcu=msp430g2553 -o Common/utilities.o
/tmp/cca1KY5m.sCOMPILER_PATH=/usr/local/libexec/gcc/msp430/4.6.3/:/usr/local/libexec/gcc/msp430/4.6.3/:/usr/local/libexec/gcc/msp430/:/usr/local/lib/gcc/msp430/4.6.3/:/usr/local/lib/gcc/msp430/:/usr/local/lib/gcc/msp430/4.6.3/../../../../msp430/bin/LIBRARY_PATH=/usr/local/lib/gcc/msp430/4.6.3/:/usr/local/lib/gcc/msp430/4.6.3/../../../../msp430/lib/COLLECT_GCC_OPTIONS='-mmcu=msp430g2553'
'-D' 'LAUNCHPAD' '-D' 'ZM_PHY_SPI' '-D' 'REGION_EUROPE' '-I'
'/usr/local/msp430/include' '-O3' '-Wall' '-c' '-fmessage-length=0' '-std=c99'
'-v' '-MMD' '-MP' '-MF' 'Common/utilities.d' '-MT' 'Common/utilities.d' '-o'
'Common/utilities.o' '-mcpu=430' '-mmpy=none'
'-mivcnt=16'/usr/local/lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld:
PrVinCoordinator.elf section `.text' will not fit in region
`rom'/usr/local/lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld: section
.vectors loaded at [0000ffe0,0000ffff] overlaps section .text loaded at
[0000c000,00011263]/usr/local/lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld:
region `rom' overflowed by 9890
bytes/usr/local/lib/gcc/msp430/4.6.3/libcrt0.a(_copy_data.o): In function
`__do_copy_data':/home/vincent/VinLaunchPad/bin_downloaded/mspgcc-20120406/gcc/gcc/../../gcc-4.6.3/gcc/config/msp430/crt0.S:195:
relocation truncated to fit: R_MSP430_16_BYTE against symbol
`__data_load_start' defined in *ABS* section in
PrVinCoordinator.elf./ZM_Examples/example_simple_application_coordinator_afzdo.o:
In function
`processButtonPress':example_simple_application_coordinator_afzdo.c:(.text+0x20):
relocation truncated to fit: R_MSP430_16_BYTE against `no
symbol'example_simple_application_coordinator_afzdo.c:(.text+0x28): relocation
truncated to fit: R_MSP430_16_BYTE against `no
symbol'example_simple_application_coordinator_afzdo.c:(.text+0x2c): relocation
truncated to fit: R_MSP430_16 against symbol `tfp_printf' defined in .text
section in
./Common/printf.oexample_simple_application_coordinator_afzdo.c:(.text+0x42):
relocation truncated to fit: R_MSP430_16_BYTE against `no
symbol'example_simple_application_coordinator_afzdo.c:(.text+0x46): relocation
truncated to fit: R_MSP430_16 against symbol `tfp_printf' defined in .text
section in
./Common/printf.oexample_simple_application_coordinator_afzdo.c:(.text+0x4c):
undefined reference to
`resetNominalTemperature'example_simple_application_coordinator_afzdo.c:(.text+0x50):
undefined reference to
`resetNominalColor'example_simple_application_coordinator_afzdo.c:(.text+0x72):
relocation truncated to fit: R_MSP430_16_BYTE against `no
symbol'./ZM_Examples/example_simple_application_coordinator_afzdo.o:(.rodata+0x26e):
relocation truncated to fit: R_MSP430_16_BYTE against `no
symbol'./ZM_Examples/example_simple_application_coordinator_afzdo.o:(.rodata+0x270):
relocation truncated to fit: R_MSP430_16_BYTE against `no
symbol'./ZM_Examples/example_simple_application_coordinator_afzdo.o:(.rodata+0x272):
relocation truncated to fit: R_MSP430_16_BYTE against `no
symbol'./ZM_Examples/example_simple_application_coordinator_afzdo.o: In
function `main':example_simple_application_coordinator_afzdo.c:(.init9+0x14):
additional relocation overflows omitted from the
outputexample_simple_application_coordinator_afzdo.c:(.init9+0x1d8): undefined
reference to
`displayTemperatureOnRgbLed'example_simple_application_coordinator_afzdo.c:(.init9+0x26c):
undefined reference to `displayColorOnRgbLed'collect2: ld returned 1 exit
statusmake: *** [PrVinCoordinator.elf] Error 1
----------------------------------- snip
--------------------------------------------------------
Sent from MWEB Message Centre - CONNECT AND YOU CAN
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users