[openssl-users] build.info

Wouter Verhelst wouter.verhelst at bosa.fgov.be
Tue Sep 4 06:55:33 UTC 2018


On 9/3/18 9:05 PM, Thomás Inskip wrote:
> Does anyone know how I can specify that a specific shared library (in
> this case an engine) is dependent on a system-installed shared library
> (i.e. not built along with openssl)?.  Basically the equivalent of
> LDFLAGS += -lsomelib
The GNU runtime dynamic library will honor DT_NEEDED flags of libraries,
too. That is,  you can just do LDFLAGS += -lsomelib on a library target
and it will work. Check libgtk-3.so, for instance:

objdump -x /usr/lib/x86_64-linux-gnu/libgtk-3.so

will show a bunch of lines like...

Dynamic Section:
  NEEDED               libgdk-3.so.0
  NEEDED               libgmodule-2.0.so.0
  NEEDED               libpangocairo-1.0.so.0
  NEEDED               libX11.so.6
  NEEDED               libXi.so.6
  NEEDED               libXcomposite.so.1
  NEEDED               libXdamage.so.1
(...)

Meaning, all these libraries need to be loaded for libgtk-3.so to work.

Beware gotchas:

- Not all rtdl implementations do so, so if you're not using a GNU
platform (e.g., Linux), then check the documentation of your runtime
dynamic linker.
- This works for shared libraries, but not for static ones.

Regards,


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20180904/5a413727/attachment.html>


More information about the openssl-users mailing list