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.