It contained libssl.a and libcrypto.a.
For whatever reason, I did a "file" on them and got this response:
file libssl.a libcrypto.a
libcrypto.a: archive (big format)
libssl.a: archive (big format)
What I'd like to know is "what is big format" ???
Here's an example (snippet of the output) of its contents:
ar -w libssl.a
.BIO_ssl_shutdown libssl.so.0.9.8
.BIO_ssl_copy_session_id libssl.so.0.9.8
.BIO_new_buffer_ssl_connect libssl.so.0.9.8
.BIO_new_ssl_connect libssl.so.0.9.8
.BIO_new_ssl libssl.so.0.9.8
.BIO_f_ssl libssl.so.0.9.8
BIO_ssl_shutdown libssl.so.0.9.8
BIO_ssl_copy_session_id libssl.so.0.9.8
BIO_new_buffer_ssl_connect libssl.so.0.9.8
BIO_new_ssl_connect libssl.so.0.9.8
BIO_new_ssl libssl.so.0.9.8
BIO_f_ssl libssl.so.0.9.8
I want to make sure I can use these to "statically" link ssl into my
application.
Thanks,
-tony
An AIX-specific enhancement that provides support for both 32-bit
and 64-bit object files within an archive. We ship .a files that
can be used to build apps of either bitness.
>
> Here's an example (snippet of the output) of its contents:
>
> ar -w libssl.a
> .BIO_ssl_shutdown libssl.so.0.9.8
> .BIO_ssl_copy_session_id libssl.so.0.9.8
> .BIO_new_buffer_ssl_connect libssl.so.0.9.8
> .BIO_new_ssl_connect libssl.so.0.9.8
> .BIO_new_ssl libssl.so.0.9.8
> .BIO_f_ssl libssl.so.0.9.8
> BIO_ssl_shutdown libssl.so.0.9.8
> BIO_ssl_copy_session_id libssl.so.0.9.8
> BIO_new_buffer_ssl_connect libssl.so.0.9.8
> BIO_new_ssl_connect libssl.so.0.9.8
> BIO_new_ssl libssl.so.0.9.8
> BIO_f_ssl libssl.so.0.9.8
Yeah, that's not good enough. If you want to see everything
in the archive, use ar -X32_64 -tv libssl.a, or -X32_64 -w. Note
that this -X option is documented.
> I want to make sure I can use these to "statically" link ssl into my
> application.
AIX allows you to put dynamically loadable modules into an archive, then
link against the aggregation plus run with the aggregation. Aside from
me discouraging static linking, the linker's -bstatic/-bdynamic options
should work as you expect. Otherwise, you can create yourself a
non-shared copy of the archive via
ld -r -o foo.o -bnso /opt/freeware/lib/libssl.a
Thanks, Gary....great advise, as usual.
The following worked for me:
xlc_r -I./my_incdir -ocheck_env check_env.c \
-L./my_lib -lcnf \
-bstatic -L./openssl/usr/lib -lssl -lcrypto -bshared
It created an executable without the "ssl" shared object referenced in
the header...
...i.e. here's without the "-bstatic" and "-bshared" specified:
INDEX PATH BASE
MEMBER
0 /home/dms/source:/home/trbennet/openssl/usr/lib:/usr/vac/lib:/
usr/lib/threads:/usr/lib:/lib
1 libc.a
shr.o
2 libpthreads.a
shr_xpg5.o
3 libcrypto.a libcrypto.so.
0.9.8
Here's "with" the "-bstatic" and "-bshared" specified:
INDEX PATH BASE
MEMBER
0 /home/dms/source:/home/trbennet/openssl/usr/lib:/usr/vac/lib:/
usr/lib/threads:/usr/lib:/lib
1 libc.a
shr.o
2 libpthreads.a
shr_xpg5.o
-tony
Gary,
When using the 2nd methodology that you recommended
(i.e.: ld -r -o foo.o -bnso /opt/freeware/lib/libssl.a)
which "version" is extracted from libssl.a and put into
foo.o... 32bit or 64bit, and how do I tell...???
Thanks,
-tony
The version that matches the mode you're working in. Unless
you set OBJECT_MODE in your environment or use -b64 it's going to be 32-bit.