https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101448
--- Comment #3 from Richard Earnshaw <rearnsha at gcc dot gnu.org> --- What optimization level are you building with? The R_AARCH64_CALL26 relocation has a branch range of +/-2^27 bytes, or 128MBytes, so that puts a limit on the size of the code segment of a binary. If you're not building with optimization turned on code can bloat very quickly. You could try just -Og if you want minimal optimization or -Os if you really want to reduce code size as much as possible.