I am making an elf with diab dld, but got small data area problems, saying symbol __DATA_ROM is out of address rangecorrect, coz they are all 32bit address data which are longer than 8, and they should stay in .data section. The point is why they are addressed using small data area relative addressing? They are declared in .c files like: extern CPU_32U __DATA_ROM
- symbol is addressed using small data area relative addressing
- area name is SDA, SDA2 or SD0
- area base is _SDA0_BASE_ 0x00000000
....
....
I checked the manual, but can not find anything about SD0....
My -Xsmall-data and -Xsmall-const are both 8. I also set r2 and r13 with _SDA2_BASE_ and _SDA_BASE in crt0.o
Several symbols(eg. __DATA_RAM, __DATA_END) have the same problems, which are all from the .dld file. From the error message I can see all the symbols are defined in .data section of RAM, and is referenced from .text section in ROM. This should be
Anybody has any idea about how the symbols in .dld file are allocated by diab linker, which section do they go and how do we assign where they go?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 353 |
Nodes: | 16 (2 / 14) |
Uptime: | 75:43:28 |
Calls: | 7,639 |
Files: | 12,802 |
Messages: | 5,691,803 |