[cfe-dev] How to force Clang to put a variable at specific absolute address?

octal at pocketmt.com octal at pocketmt.com
Fri Mar 22 09:15:31 PDT 2013


How to force Clang to put a variable at specific absolute address?

(PS. I don't want solution purely based on linker scripts)

On some Gcc versions, we use __attribute__((address(0xnnnn))) tu put a 
variable at adress 0xnnnn
On Clang I have seen something like "address_space" but it doesn't 
seem to do anything on MIPS port of LLVM.
Is this the correct attribute to use, or do I have to implement a new 
attribute?

Regards
Ahmed




More information about the cfe-dev mailing list