Hi Jan,

----- Jan Ringoš <[email protected]> a écrit :
> >  struct shared_def shared_struct __attribute__ ((section("shared_ram")));
> 
> if I understand it right, the bFLT binaries (see: 
> http://www.beyondlogic.org/uClinux/bflt.htm) cannot contain other sections 
> than .text and .data (and .bss, though this is not actually there either). 
> There is nowhere to write settings for your 'shared_ram' section in the 
> binary, so the linker returns error.

Actually, the linker process fails before generating the ELF file.

There was also a case (which a specific linker script) where the linker
produced an ELF file that was not accepted by elf2flt (which crashed
silently). The problem was that the accesses at 0x8800xxxx were seen
as normal accesses to the .data section and elf2flt was trying to relocate
them (it was actually the BFD library that provided wrong data to elf2flt).

But at this point I could not understand why gcc put the structure in
the .data section and not in my custom section (moreover, the structure
is uninitialized!).



> Wouldn't something like this suffice?
> 
> struct shared_struct volatile * my_shared_memory = (struct shared_struct 
> volatile *) 0x88000000;

This would have been a simpler choice, the problem is that the code has
already been written without pointers, through direct structures access,
because it is a bit faster and smaller.

Regards,

Antoine
_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to