How to get *.a files for different versions of linux?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to get *.a files for different versions of linux?
Hi,
I'm trying to get all *.a files from different versions of linux. It's for a pattern matching project I'm doing and I can't quite seem to find an easy way other than downloading VMWare images of each version of linux and extracting the *.a files from there. I was wondering if there might be some convenient place where different versions of *.a are stored? Thanks.
It's because I need the *.a library files(libc.a and the like) to make binary pattern signatures to aid in reverse engineering statically linked binaries. They're usually located in /usr/lib. Really, is there no good way other than installing each and every version of linux and extracting the files from there? That would be my last resort but I hope someone knows a more easier way.
Every file in binary linux distributions belongs to some package, and all packages are freely available from the internet. You should find out the package you need, download it and unpack.
e.g. for debian you can visit http://debian.org/distrib/packages official web-site.
These days static linking is strongly discouraged - for reasons related to security and space saving - but some distributions still ship static libraries (.a files), usually you'll find these in dev packages (Debian-family of distributions) and Slackware also keeps these around in some cases. You can convert packages to tar.gz archives with tools like rpm2tgz (for .rpm's) and deb2targz (for .deb's) which would allow you to get your hands on the libraries without the need to install each and every distribution. Once converted simply extract these with "tar xzvf <packagename>.tgz". Slackware's tgz files can easily be extracted with the same tar command without any conversion (same goes for CRUX, I believe). If you want to go deeper and extract the object code from the static library then the command "ar x libc.a" will do the trick.
Last edited by overlook; 07-12-2009 at 02:23 PM.
Reason: Typo
Hey thanks for the replies. I think I should've elaborated more. My intention was to get the libcs contained for different version 'numbers' of a certain linux distro. i.e. libc.a for ubuntu 7.04, 7.10, 8.04, 8.10 etc... I've followed your advice and was able to find different versions of *.a files for some distros, but other distros only contained the packages of the latest release. So I decided to download VMware images of different versions of all the distros on a site where they provide VMware images. Thanks for all the advice!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.