AArch64 gas: Block section relative symbols in GOT relocations
This patch prevents the AArch64 assembler from incorrectly using section-relative symbols in GOT relocations, fixing PR30788.
Wilco Dijkstra proposes a patch to the AArch64 assembler to prevent the generation of section-relative symbols in Global Offset Table (GOT) relocations. This is incorrect because GOT relocations do not support offsets. The patch updates aarch64_fix_adjustable() to explicitly disallow this, resolving PR30788.
In Details
This patch addresses an issue in the AArch64 assembler's handling of GOT relocations. The assembler was incorrectly allowing section-relative symbols to be used in GOT relocations, which is invalid on AArch64. This could lead to runtime errors due to incorrect address calculations.
For Context
The Global Offset Table (GOT) is a data structure used in position-independent code (PIC) to hold the addresses of global variables. This patch fixes a bug in the AArch64 assembler that could cause it to generate incorrect code when accessing global variables, potentially leading to crashes or incorrect program behavior.