ARM: Fix global_variable_offset() for aarch64
Not all toolchains use pc relative addresses for global variables. Apparently the gcc 8.3.0 YOCTO toolchain uses absolute addresses. This means can't simply return 0 for global_variable_offset() but instead have to calculate the offset between the compile addresses for global variables and their runtime address. We do this by getting the address of a global variable pc relative explicitely in assembly and substracting that address from the location the C compiler thinks they are. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> |
---|
|
arch/arm/include/asm/barebox-arm.h |
---|