Hi Antoine, On Tuesday 10 March 2009 18:34:35 Antoine Calando wrote: > My system is composed of 2 cpus, including a microblaze and an arm, with a > shared ram mapped at a fixed range 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, e.g.: > > shared_struct.member = 0x1234;
How are you sure that both compiler agree about the exact layout of these structs? Remember that a compiler is free to do padding and reordering of structure elements. And this may change from compiler version to compiler version. Most people do not code this crazy way. Structs are not made for communication across different compilers and/or CPUs. By the way: are your structure elements all declared volatile? > My first problem is that I tried hundreds of different syntaxes, > instructions, whatever; I also tried to merge this declaration is the > default gcc linker script; nothing to do, the linking step always fails: Flat binaries are a "hack", and I would it EXPECT to fail. regards Wolfgang -- Wahre Worte sind nicht schön. Schöne Worte sind nicht wahr. (Laotse) _______________________________________________ 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
