Which GCC Built My Kernel?

Login or Register to Reply

Thread Tools Search this Thread
# 1  
Old 06-19-2007
Which GCC Built My Kernel?

I'm playing around with the kqemu accelerator for the QEMU virtualization software. I can't remember which version of gcc I used to build my kernel. I have 3.4.6 and 4.1.1 on this (Gentoo) system. I seem to remember there is some command I can run against binaries that will tell me what gcc (and linker, etc..) built them. so far my searches have only turned up:

gcc -v (Shows me what version of GCC I have)


uname -a (which shows me all the kernel info except which GCC built it)

Any suggestions?
# 2  
Old 06-19-2007
Try nm on the binary and see what symbols it spits out.
# 3  
Old 06-20-2007
Originally Posted by porter
Try nm on the binary and see what symbols it spits out.
But if the binary is stripped i.e. built with the -s flag, then I dont think nm will output anything.
# 5  
Old 07-17-2007
awk '{print $5,$6,$7}' /proc/version

or just
awk '{print $7}' /proc/version

to get the version number directly - 4.1.1 in my case.

Last edited by sysgate; 07-17-2007 at 10:02 AM..
# 6  
Old 08-07-2007

I've been on vacation, but the answers referring to /proc/version are exactly what I needed!Smilie
Login or Register to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Unload kernel module at boot time (Debian Wheezy 7.2, 3.2.0-4-686-pae kernel) gacanepa Linux 0 01-01-2014 02:21 PM
Kernel Modules Not geting built rupeshkp728 UNIX for Advanced & Expert Users 1 01-28-2012 12:34 PM
Manually built the code below. shoaibjameel123 Shell Programming and Scripting 1 10-18-2011 09:08 AM
OpenSSH built in chroot facility h@foorsa.biz AIX 2 06-14-2011 07:00 PM
bash built-in gwgreen1 Shell Programming and Scripting 4 06-09-2010 03:33 AM
Which file is read by kernel to set its default system kernel parameters values? girish.batra Solaris 1 03-28-2010 04:09 AM
distro with built in java. zius_oram Linux 2 03-24-2009 06:40 PM
built-in hex editor? Loriel Shell Programming and Scripting 7 12-02-2008 03:56 PM
How to convert Linux Kernel built-in module into a loadable module anitemp Linux 0 10-10-2008 02:33 AM
Installing gcc - recieve error message gcc : cannot execute Ackers Solaris 8 08-08-2008 04:38 PM
max number of slabs per kernel module (kernel 2.6.17, suse) Brendan Kennedy SuSE 4 01-23-2008 09:40 AM
ksh built-in function solea Shell Programming and Scripting 1 09-23-2004 09:25 AM
BUILT-IN command scripts JSP Shell Programming and Scripting 2 03-11-2002 09:52 AM
awk built in variables Reza Nazarian UNIX for Dummies Questions & Answers 4 02-18-2002 01:50 AM