I am using a "trick" to simulate __attribute__(at()) from the ARM toolchain in GCC. I have a macro defined as
#define __AT(name, addr) asm(".equ " #name ", " #addr)
Then I have something like the following:
extern volatile struct SomeStruct_t thing; __AT(thing, 0xa0000000);
When I use this with compilers targeted at arm-none or arm-elf, it works fine and I get the desired result that I can access the "thing" structure instance and it accesses the correct memory location.
However, when I use this with aarch64-none or aarch64-elf compilers, I get the following:
C:\msys64\tmp\cc8js1P1.s: Assembler messages: C:\msys64\tmp\cc8js1P1.s: Internal error in md_apply_fix at /tmp/dgboter/bbs/dsggnu-vm-1-x86_64--mingw32-i686/buildbot/mingw32-i686--aarch64-elf/build/src/binutils-gdb/gas/config/tc-aarch64.c:8095. Please report this bug.
Is anyone aware of any workaround that would me to achieve the result I am looking for? I do not have the option of modifying the linker script for this.
I'll take a look at that. Thanks.