Using openssl-1.0.1c, cross-compiling for x86 netbsd target.

When libcrypto.so is linked up, I get warnings due to the
OPENSSL_cpuid_setup call in x86cpuid.S:

../lib/gcc/i386--netbsdelf/4.1.3/../../../../i386--netbsdelf/bin/ld: warning:
dynamic relocation in readonly section `OPENSSL_cpuid_setup'
../lib/gcc/i386--netbsdelf/4.1.3/../../../../i386--netbsdelf/bin/ld: warning:
creating a DT_TEXTREL in a shared object.

I can resolve this warning (per latest changes in NetBSD) by changing
x86cpuid.S (prebuilt in the netbsd build approach), replacing:

.section        .init
        call OPENSSL_cpuid_setup

with
#include <machine/asm.h>
...
...
.section        .init
        PIC_PROLOGUE
        call PIC_PLT(OPENSSL_cpuid_setup)
        PIC_EPILOGUE


Now if I build libcrypto.so with the fips module I get a similar warning, I
believe for the similar code in x86cpuid.s in the FIPS module:

../lib/gcc/i386--netbsdelf/4.1.3/../../../../i386--netbsdelf/bin/ld:
warning: dynamic relocation in readonly section `fips_openssl_cpuid_setup'
../lib/gcc/i386--netbsdelf/4.1.3/../../../../i386--netbsdelf/bin/ld:
warning: creating a DT_TEXTREL in a shared object.

To make a similar change in the fips module, which generates the .s files
on the fly, will require modifying x86gas.pl.

So my questions:
1. For x86 platforms, do other users/builders encounter this warning when
building openssl-1.0.1c? (Or is it dependent on netbsd target, or the gcc
version I use)?
2. If so, have others simply ignored the warnings, or worked to resolve
them?
3. Is the change I made for openssl x86cpuid.S above an acceptable way to
resolve the warnings?
4. For fips-2.0 on x86 platforms, do other users/builders encounter the
fips_openssl_cpuid_setup warning when building fips-capable libcrypto.so?
5. If I have to modify the perl script in the fips module to eliminate the
warnings on building fips-capable libcrypto.so, will that modification
still qualify for a Change Letter validation?

Thanks...
Kevin

Reply via email to