Hi all, I,m having some problem... let-me try to explain.
I have 2 case!
case 1: using .bss non initialized var.
unsigned char cmdargs[10][32];
memset((unsigned char *)&cmdargs, 0, sizeof(cmdargs));
this at my os, I can use a lot! no problem!
bute when I try to put my CommandLineInterpreter inside in a elf relocatable file and try to do a memset like above... all my operating system goes crazy...
and case 2:
unsigned char cmdargs[10][32] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
memset((unsigned char *)&cmdargs, 0, sizeof(cmdargs));
at this case my Command Line Interpreter works fine inside in a .elf relocatable file...
with this second case my var cmdargs goes into .data section, right ? and other on not initialized in case one goes into .bss section...
now I don´t understand why that happens...
could anyone help me trying to solve that mistake! please!
tnx a lot and forgive-me all common mistakes...
Relocatable elf problem
Re: Relocatable elf problem
OK! the problem was solved!
I found this on OSD tutorials.
ld option -d is equivalent to the FORCE_COMMON_ALLOCATION command in a linker script
this happens on global vars that are not initialized.
thnx so much all.
I found this on OSD tutorials.
ld option -d is equivalent to the FORCE_COMMON_ALLOCATION command in a linker script
this happens on global vars that are not initialized.
thnx so much all.
Re: Relocatable elf problem
You are welcome!digo_rp wrote:thnx so much all.