https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81653
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Obviously, if you are compiling hand written assembly and linking it into PIEs the code must be PIC. So what is written in #c2 is not a workaround, but the right fix. If you have assembly that is not PIC compatible and you don't want to link it into a PIE, either don't configure the compiler with --enable-default-pie, or compile it with -fno-pie and link with -no-pie. This isn't any different from any other arch; if you link in non-PIC assembly into PIEs, either stuff doesn't link, or you get text relocations.