This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/79066] New: [7 Regression] non-PIC code generated for powerpc glibc with -fpic


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79066

            Bug ID: 79066
           Summary: [7 Regression] non-PIC code generated for powerpc
                    glibc with -fpic
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jsm28 at gcc dot gnu.org
  Target Milestone: ---
            Target: powerpc-linux-gnu

Created attachment 40506
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40506&action=edit
Preprocessed source

GCC, configured thus for 32-bit powerpc hard-float, produces non-PIC code when
building glibc libm.

Target: powerpc-glibc-linux-gnu
Configured with: /scratch/jmyers/glibc/many7/src/gcc/configure
--prefix=/scratch/jmyers/glibc/many7/install/compilers/powerpc-linux-gnu
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=powerpc-glibc-linux-gnu
--with-sysroot=/scratch/jmyers/glibc/many7/install/compilers/powerpc-linux-gnu/sysroot
--disable-multilib --enable-secureplt --disable-libsanitizer --disable-libssp
--with-gmp=/scratch/jmyers/glibc/many7/install/host-libraries
--with-mpfr=/scratch/jmyers/glibc/many7/install/host-libraries
--with-mpc=/scratch/jmyers/glibc/many7/install/host-libraries
--enable-languages=c,c++ --enable-shared --enable-threads
Thread model: posix
gcc version 7.0.0 20170112 (experimental) [trunk revision 244346] (GCC) 

Compile with:

powerpc-glibc-linux-gnu-gcc -S -std=gnu11 -fgnu89-inline  -O2
-fmerge-all-constants -fno-stack-protector -frounding-math -fpic e_asin.i

The resulting code contains, towards the end of __ieee754_asin (and again for
__ieee754_acos):

        lis 9,.LC44@ha
[...]
        la 9,.LC44@l(9)

These are absolute non-PIC relocations and result in text relocations in
libm.so.

This appeared with r242908 but presumably was latent before then.

Preprocessed source attached.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]