Re: [dev] Are all dlopen() functions in the stali suppressed?

From: k.suzaki <k.suzaki_AT_aist.go.jp>
Date: Wed, 10 Jan 2018 12:22:35 +0900

On 2018/01/09 17:10, k.suzaki wrote:

> On 2018/01/09 15:49, Daniel Cegiełka wrote:
>> 2018-01-09 3:22 GMT+01:00 k.suzaki <k.suzaki_AT_aist.go.jp>:
>>> Dear,
>>>
>>> I found some dlopen() functions in the stali source code. I guess
>>> they are obstacle of static linking.
>>> However, the configure files and .m4 files have the open
>>> "enable_dlopen=no".
>>>
>>> Are all dlopen() functions suppressed when the source files are
>>> compiled as static linking?
>>> # If so, it is a good job.
>> http://www.openwall.com/lists/musl/2012/12/08/4
> I read the article "static linking and dlopen". There are many
> following threads discussing static linking and dlopen.
> However, I cannot understand the solution for stali.
>
> I found the useful thread which describes the dlopen in musl clearly.
>   http://www.openwall.com/lists/musl/2012/12/09/7
>     musl includes a dlopen function.
>     When a binary is statically linked, it is a stub.
>     When a binary is dynamically linked, it loads the shared library
> requested.
>
> Does a static linked binary in stali have a stub?
> Does the binary is suppressed by "enable_dlopen=no" at configure level?
> Or both?

I do objdump all arm ELF binaries and found that "ip and "debugfs"
include <dlopen> symbol name.

.c and .cpp files which include "dlopen" are as following.
Except for "ip and "debugfs", the ELF binaries which are created from
these files are suppressed at compile time, I guess.

----- list of .c and .cpp files which include "dlopen"----------------
sys.pi/tools/testing/selftests/x86/test_syscall_vdso.c
sys.pi/tools/lib/traceevent/event-plugin.c
sys.pi/tools/perf/ui/setup.c
sys.pi/tools/perf/util/usage.c
lib/ncurses/ncurses/base/lib_mouse.c
lib/libressl/crypto/dso/dso_dlfcn.c
bin/e2fsprogs/lib/support/plausible.c
bin/e2fsprogs/lib/ss/get_readline.c
bin/git/usage.c
bin/parted/libparted/fs/reiserfs/reiserfs.c
bin/iproute2/ip/iplink.c
bin/iproute2/genl/genl.c
bin/iproute2/tc/m_action.c
bin/iproute2/tc/m_ipt.c
bin/iproute2/tc/m_ematch.c
bin/iproute2/tc/tc_exec.c
bin/iproute2/tc/m_pedit.c
bin/iproute2/tc/tc.c
bin/curl/packages/vms/report_openssl_version.c
bin/curl/lib/strerror.c

-----
suzaki

>
> -------
> suzaki
>
>
>>
>> Best regards,
>> Daniel
>>
>>
>>> -----
>>> suzaki
>>>
>>>
>> .
>>
>
> .
>
Received on Wed Jan 10 2018 - 04:22:35 CET

This archive was generated by hypermail 2.3.0 : Wed Jan 10 2018 - 04:24:18 CET