On Sat, Feb 28, 2009 at 5:45 AM, Antoine Calando
<acalando@xxxxxxx> wrote:
My system is composed of 2 cpus, including a microblaze, with a shared
ram mapped at some place in the address space. I am porting some code
on the microblaze (as a process in user space) that assume to find
a C structure instanciated in the shared ram. Note that the code is not
using a pointer on the structure, but the structure itself:
[snip]
Did anybody ever succeded in using absolute symbols with a flat binary?
I've done it before but in a much simpler way, basically hard-coding pointers/addresses into the application. Once you cast a fixed address into a structure pointer, then it all gets pretty easy to work with.
As I can tell you are trying to place data objects at fixed addresses, and as you have seen it's far from straight-forward to do this.
Since you know the addresses of your objects, it seems a lot easier to use the fixed-pointer approach and just accept that your accesses to these objects will be via pointer dereferences.
If you do make a reasonably clean solution to the problem and it involves reasonable changes to elf2flt, it wouldn't be too hard to merge it to the main elf2flt and build it into the standard tools.
Regards,
John