Can anyone tell what this error means and how to remove it
"Link Error: Relocation of the symbol is out of range"
Hi khurram712,
I'd suggest you to see this thread:
https://community.freescale.com/message/71562#71562
Stanish
thanks alot
Thanks for providing the solution but i came across another problem
first the pragma preprocessor could nt be added to function definition(it couldn't remove error)
so i added it to function declaration as a trial..it did work.The linking
error was removed.However during debugging the sequence of execution
doesnt follow these particular function's call( i .e the functions with pragma preprocessor) .
Instead it starts executing main.asm.i have wriiten nothing useful in main.asm and
i have n't invoked it in my code either.Even then it moves there which is making trace of bug
in program more difficult.
i would like to ask one more thing...can pragma preprocessor be used with assembly functions?
Regards
Khurram Hameed
Hi khurram712,
Yes you are right, pragma should be used in combination with function prototype declaration.
I can debug the RAM code without any limitations/confusions.
See below the example how to place standalone assembler function into RAM:
main.c
---------
#pragma push
#pragma section code_type ".my_RAM_code" ".my_RAM_code" data_mode=far_abs code_mode=far_abs
void my_C_ram_func(void);
extern void my_asm_ram_func(void);
#pragma pop
void my_C_ram_func(void)
{
asm (nop);
}
int main(void) {
my_C_ram_func();
my_asm_ram_func();
...
}
main_asm.s
----------
.globl my_asm_ram_func
.section .my_RAM_code,text
my_asm_ram_func:
nop
nop
blr
*.lcf
-----
...
SECTIONS
{
...
GROUP : {
.__uninitialized_intc_handlertable ALIGN(0x10) : {}
.data : {}
.sdata : {}
.sbss : {}
.sdata2 : {}
.sbss2 : {}
.bss : {}
.my_RAM_code: {}
} > internal_ram
}
Stanish