We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
For RVCT, the answer is (Example) 42 in "Using the Compiler ":http://infocenter.ar...f/Chdcceie.html
I'm not sure you can in GCC assembler - I've never seen it attempted directly.The obvious workaround is calculate the necessary offsets in C and pass then in to the assembler function as parameters.
I haven't ever come across a way to communicate this information from GCC to GAS. I use #defines in my assembly files to specify the offsets. I usually create them manually. But you could write a program which converts a header and all the structs in it into a C program which creates a new ASM safe offset header files that you can #include from the ASM. The tricky part here is that the program has to run on the same device that's executing the C code, which may not be an option for some embedded platforms. So it's not something you can easily put in a makefile if you're cross-compiling.Doing it manually does at least help you pay more attention to organizing your data efficiently.