This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/11726] compiling programs with -static -fPIC produces code that will not run
- From: "pinskia at physics dot uc dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jul 2003 16:19:26 -0000
- Subject: [Bug c/11726] compiling programs with -static -fPIC produces code that will not run
- References: <20030730155600.11726.tausq@debian.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11726
------- Additional Comments From pinskia at physics dot uc dot edu 2003-07-30 16:19 -------
Actually you only see it on platforms where the PIC register is set (or not set) by the loader. On
i686-pc-linux-gnu, the PIC register is variable and is set by the code outputed by gcc, also in
powerpc-apple-darwin6.6 the same thing happens.
I think this really a bug in the executable loader rather than gcc as you should be able to mix pic
code and non-pic code just fine.