4

I am trying setup wireless network.

I referred to Cross Compiling iw_wpa_supplicant_hostapd_rfkill for ARM.

In the iw part, he used ldconfig -v, but it is not in my rootfs. I searched my busybox, but could not find it.

How to get the ldconfig command?

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
Kim Gwanyoung
  • 53
  • 2
  • 6

1 Answers1

0

ldconfig is a part of libc (C library). In various distros name of the package may vary, for instance:

[yurij@centos7 gpg]$ rpm -qf /usr/sbin/ldconfig
glibc-2.17-196.el7_4.2.x86_64

yurij@debian9:~/trash/gpg$ dpkg -S /sbin/ldconfig
libc-bin: /sbin/ldconfig

So in Centos 7 it's glibc package, in Debian - libc-bin.

Indeed you can get can source of glibc - glibc official site.

Yurij Goncharuk
  • 4,177
  • 2
  • 19
  • 36
  • Thanks a lot. I am compiling it for my system. I chose the version v2.11, and completed build. But I need to reduce the size of binaries. I don't know what the option is to reduce size(without debug symbols). Let me know how please. – Kim Gwanyoung Apr 02 '18 at 02:25
  • It's depend on compiler and therefore compile options. I will show you examples about `gcc`. At first, you can enable `-O3` flag for general optimisation. Secondly, you can disable LTO (Link Time Optimisation) `-fno-lto`. It's useful feature but it enlarge produced binaries. Also you need ensure that you have disabled debug symbols. – Yurij Goncharuk Apr 02 '18 at 08:52
  • Thanks, I checked the non-debug info by using command "readelf -S". But, I have to reduce a bit more. I will test more. – Kim Gwanyoung Apr 02 '18 at 09:45