简体   繁体   中英

Where can I find specific Linux system libraries' source code?

I'm working on a product where we ship binaries with Linux system libs from our environment like ld-2.19.so , libdl-2.19.so , libgcc_s.so.1 etc.

Now we are expected to provide the source codes of these libs (for management and software clearing reasons).

These are Linux libraries and yeah it's opensource, but the expectation is to provide az exact.tar.gz.

I have 2 questions.

  1. As I investigate, some of these libraries come from GNU libc? So glibc is not only one.so file, many.so files are come from GNU libc such as libc, libpthread etc.

  2. Two of the mentoined libs end with 2.19. How can I tell a.so file comes from what "package"? For example, these.so files comes from GNU libc?

Thank you

Go to the source where the file comes from. On a typical linux distribution you do:

  • query the package manager from which package does the file come from
  • get that package build scripts
  • in that build script is the source location

Major distributions have similar sites like https://packages.ubuntu.com/ or https://pkgs.alpinelinux.org/packages or https://archlinux.org/packages/ with sources on how to build packages. RPM packages have -source packages with the sources for packages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM