This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
LD_PRELOAD doesn't work with dynamic object built with `-static-pie`
- From: Baojun Wang <wangbj at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Mon, 20 May 2019 18:56:22 -0400
- Subject: LD_PRELOAD doesn't work with dynamic object built with `-static-pie`
Hi libc,
I tried to build a shared object with `-static-pie`, and then used it as
`LD_PRELOAD`, but it didn't work, do you know why it failed? I put more
details in a gist:
https://gist.github.com/wangbj/3fb7356286ee38755005cbde26ca84ae
The reason I'm using this is to hope to create a shared object (.so)
without dependencies on any other libraries, but the shared object itself
can use library such as glibc.
Thanks
Baojun