[openssl-dev] weird linker warnings on solaris 11

Erik Forsberg erik at efca.com
Mon Aug 15 01:43:33 UTC 2016


the issue appears to be not in the compiler, but the newer Soalris linker (ld)
I switched back to using 12.4 compiler, issue went away BUT now the issue surfaces
if building OpenSSL using GCC. Some examples during the test suite

ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol PKCS7_SIGNED_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol PKCS7_SIGN_ENVELOPE_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol PKCS7_SIGNER_INFO_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol PKCS8_PRIV_KEY_INFO_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol PKEY_USAGE_PERIOD_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol POLICY_CONSTRAINTS_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol POLICYINFO_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol POLICY_MAPPING_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol POLICY_MAPPINGS_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol POLICYQUALINFO_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol PROXY_CERT_INFO_EXTENSION_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol PROXY_POLICY_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol RSA_OAEP_PARAMS_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol RSAPrivateKey_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol RSA_PSS_PARAMS_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol RSAPublicKey_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol SXNET_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol SXNETID_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol USERNOTICE_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_ALGOR_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_ALGORS_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_ATTRIBUTE_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_CERT_AUX_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_CINF_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_CRL_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_CRL_INFO_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_EXTENSION_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_EXTENSIONS_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_NAME_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_NAME_ENTRY_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_PUBKEY_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_REQ_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_REQ_INFO_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_REVOKED_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_SIG_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol X509_VAL_it: relocation bound to a symbol with STV_PROTECTED visibility
ld: warning: relocation warning: R_386_COPY: file ./libcrypto.so: symbol ZLONG_it: relocation bound to a symbol with STV_PROTECTED visibility


>-- Original Message --
>
>support for attribute visibility is new in the studio 12.5 compiler
>so there seems to be some incompatibility between cc and gcc now
>
>>-- Original Message --
>>
>>On Sat, Aug 13, 2016 at 08:27:30PM -0700, Erik Forsberg wrote:
>>> 
>>> just updated to developer studio 12.5 on Solaris 11.3
>>> I see lot of warnings when linking OpenSSL 1.1
>>> looking like these
>>> 
>>>     link_app.solaris-shared
>>> LD_LIBRARY_PATH=.: cc -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM 
>>> -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPOLY1305_ASM -DOPENSSLDIR="/usr/local/ssl" -DENGINESDIR="/usr/local/lib/amd64/engines-1.1" -xc99 -m64 -xarch=gen
>>> eric -xstrconst -DL_ENDIAN -xO5 -xdepend -xbuiltin -D_REENTRANT -DFILIO_H -mt -R /usr/local/lib/amd64 -o apps/openssl apps/app_rand.o apps/apps.o apps/asn1pars.o apps/ca.o apps/ciphers.o apps/cms.o apps/crl.o apps/c
>>> rl2p7.o apps/dgst.o apps/dhparam.o apps/dsa.o apps/dsaparam.o apps/ec.o apps/ecparam.o apps/enc.o apps/engine.o apps/errstr.o apps/gendsa.o apps/genpkey.o apps/genrsa.o apps/nseq.o apps/ocsp.o apps/openssl.o apps/op
>>> t.o apps/passwd.o apps/pkcs12.o apps/pkcs7.o apps/pkcs8.o apps/pkey.o apps/pkeyparam.o apps/pkeyutl.o apps/prime.o apps/rand.o apps/rehash.o apps/req.o apps/rsa.o apps/rsautl.o apps/s_cb.o apps/s_client.o apps/s_ser
>>> ver.o apps/s_socket.o apps/s_time.o apps/sess_id.o apps/smime.o apps/speed.o apps/spkac.o apps/srp.o apps/ts.o apps/verify.o apps/version.o apps/x509.o -L. -lssl -L. -lcrypto -lresolv -lsocket -lnsl -ldl -lpthread
>>> ld: warning: relocation warning: R_AMD64_COPY: file ./libcrypto.so: symbol PBEPARAM_it: relocation bound to a symbol with STV_PROTECTED visibility
>>> ld: warning: relocation warning: R_AMD64_COPY: file ./libcrypto.so: symbol PBE2PARAM_it: relocation bound to a symbol with STV_PROTECTED visibility
>>> ld: warning: relocation warning: R_AMD64_COPY: file ./libcrypto.so: symbol PBKDF2PARAM_it: relocation bound to a symbol with STV_PROTECTED visibility
>>
>>I'm not sure why those symbols are marked as protected.  The only
>>thing we seem to be doing with visibilit is this:
>>./crypto/sparcv9cap.c:__attribute__ ((visibility("hidden")))
>>
>>And you're not on sparc.
>>
>>> seems the common thing here is that libcrypto.num does this, not sure what
>>> the implied effect is, but seems contradictory to me, one line says export as function
>>> the other one says ! (export as variable instead)
>>> 
>>> PBEPARAM_it                             1307    1_1_0   EXIST:!EXPORT_VAR_AS_FUNCTION:VARIABLE:
>>> PBEPARAM_it                             1307    1_1_0   EXIST:EXPORT_VAR_AS_FUNCTION:FUNCTION:
>>
>>As far as I know, this is a windows only thing.  For ELF files
>>everything is just a symbol.
>>
>>Anyway, from what I understand, it should be a harmless warning,
>>those variables should be read only and be in the .data.rel.ro
>>section.  But for some reason the solaris linker wants to make a
>>copy of it, so you'll end up with the same (read only) variable
>>twice.
>>
>>
>>Kurt
>>
>>-- 
>>openssl-dev mailing list
>>To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
>
>-- 
>openssl-dev mailing list
>To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev



More information about the openssl-dev mailing list