LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to get *.a files for different versions of linux? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-get-%2A-a-files-for-different-versions-of-linux-739407/)

wringer 07-11-2009 11:17 AM

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.

fpmurphy 07-12-2009 07:41 AM

Quote:

I was wondering if there might be some convenient place where different versions of *.a are stored?
Nope

pixellany 07-12-2009 08:13 AM

I have probably installed 30 different versions of Linux and I have NEVER seen a file ending in ".a"----OK, I just did a search and found some.....

What is the signficance of the ".a", and why do you need to do this?

wringer 07-12-2009 12:01 PM

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.

Samotnik 07-12-2009 12:49 PM

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.

i92guboj 07-12-2009 01:51 PM

Just download the packages for the distros you want and compare them.

That will not help with source based distros or metadistros, like Gentoo or LFS, though.

overlook 07-12-2009 02:05 PM

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.

wringer 07-13-2009 03:52 AM

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! :)


All times are GMT -5. The time now is 08:31 AM.