[Pkg-openssl-devel] Bug#677468: Bug#677468: Bug#677468: Bug#677468: more info

Kurt Roeckx kurt at roeckx.be
Sun Jul 29 12:30:42 UTC 2012


On Tue, Jul 17, 2012 at 10:31:01PM +0200, Kurt Roeckx wrote:
> On Thu, Jun 14, 2012 at 06:46:52PM +0200, Kurt Roeckx wrote:
> > On Thu, Jun 14, 2012 at 08:36:53PM +1000, Russell Coker wrote:
> > > I have just built openssl from source and when run on the build tree I get the 
> > > following:
> > > $ eu-findtextrel i686/cmov/libcrypto.so
> > > /tmp/openssl-1.0.1c/crypto/x86cpuid.s not compiled with -fpic/-fPIC
> > > 
> > > This looks familiar, I think I filed a bug about x86cpuid.s before.  What 
> > > happened to that?
> > 
> > 1.0.1-1:
> >   * pic.patch: Make OPENSSL_ia32cap_P hidden on i386 too (Closes: #663977)
> 
> So hidding the symbol does not seem to have fixed it, and the
> 3 functions in x86cpuid.s that use OPENSSL_ia32cap_P all have a
> relocation against it.  I will have to rewrite them to be PIC.

So it turned out the be something different.  After I fix the
problem originally, I also clean up the pic.patch.  One of the
things I did was converting x86cpuid.S back to x86cpuid.s.
However the file got an #ifdef OPENSSL_PIC in it, and .s files
don't get pre-processed.  As a result I actually created the
relocation in the init segment again.

The file generating x86cpuid.s actually generates PIC code for
the 3 functions using OPENSSL_ia32cap_P (and those 3 functions
actually don't seem to be used or exported).  I've now changed
the script that generates the x86cpuid.s file to write either
the pic or non-pic version based on the variable it uses for
the other cases, and the text relocations are gone again.


Kurt



More information about the Pkg-openssl-devel mailing list