Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dld: error: Can't relocate

Status
Not open for further replies.

scrooge1

Technical User
Mar 8, 2012
1
DE
on compiling my project i get the following error.
i am using Windriver workbench with Diab compiler

dld: "D:/Work/Test_bench/Transient_corr/windiss.dld", line 103: warning: Section '.text2' is not allocable, '> rom2' specification is ignored
dld: Symbol FLOAT_TEMP.1387 is out of address range
dld: - Symbol is addressed using Small Data Area relative addressing
dld: - Area name is SDA, SDA2 or SD0
dld: - Area base is _SDA0_BASE_ 0x00000000
dld: - Either the area has overflowed
dld: or the symbol is not defined in the area
dld: or the area sections are not placed in a same GROUP
dld: or symbol _SDA0_BASE_ is not referenced from any object file
dld: - Symbol is defined in section .sdata2 in file Delta_Nox/PPC5500FFdiab_DEBUG/DeltaNOxBerechnung_Component.o
dld: - Symbol section is allocated at address 0x0002b010
dld: - Symbol is referenced from file Delta_Nox/PPC5500FFdiab_DEBUG/DeltaNOxBerechnung_Component.o, at address 0x000209a0
dld: - Symbol is referenced from section .text, section is allocated at 0x00020970
dld: - Symbol is defined at address 0x0002b010
dld: - Symbol is referenced with offset 0x00000000
dld: error: Can't relocate
X:\WindRiver\utilities-1.0\x86-win32\bin\make.exe: *** [PPC5500FFdiab_DEBUG/ECU9_FSW_SWIntegration.elf] Error 1


regards
 
Hi !

I had the same problem and after hours of searching I found the solution in a Windriver forum thread:

Solution:
Please check if the _SDA_BASE_ and _SDA2_BASE_ symbols are referenced in the code. The linker does not define these symbols
unless they are referenced and this also causes this out of range
error.

If a startup file similar to 4.3f/src/crtppc/crt0.s is used ,then
this is automatically taken care of. If a startup file which refers to these symbols is not used, then define these symbols in the linker command file like as below :

_SDA2_BASE_ = ADDR(.sdata2) + 0x7ff0;
_SDA_BASE_ = ADDR(.sdata) + 0x7ff0;
__SDA2_BASE_ = _SDA2_BASE_;
__SDA_BASE_ = _SDA_BASE_;

And a hint from my side: look at the .map file of the linker (which is already created when this error appears) to see if _SDA_BASE and _SDA_BASE2 is there or not.

Regards,
Galileo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top