This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/81653] gcc configured with --enable-default-pie on SPARC miscompiles hand-written .s files
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 05 Aug 2017 16:04:35 +0000
- Subject: [Bug driver/81653] gcc configured with --enable-default-pie on SPARC miscompiles hand-written .s files
- Auto-submitted: auto-generated
- References: <bug-81653-4@http.gcc.gnu.org/bugzilla/>
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.