Sponsored Content
Full Discussion: Which GCC Built My Kernel?
Operating Systems Linux Gentoo Which GCC Built My Kernel? Post 302122275 by vino on Wednesday 20th of June 2007 01:13:34 AM
Old 06-20-2007
Quote:
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.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

BUILT-IN command scripts

I am new to Unix scripting. I would like to know if someone can point me to a site which lists any built-in commands in there scripted form. I thought to start with the basics and learn from example. Thanks JSP (2 Replies)
Discussion started by: JSP
2 Replies

2. SuSE

max number of slabs per kernel module (kernel 2.6.17, suse)

Hi All, Is there a max number of slabs that can be used per kernel module? I'm having a tough time finding out that kind of information, but the array 'node_zonelists' (mmzone.h) has a size of 5. I just want to avoid buffer overruns and other bad stuff. Cheers, Brendan (4 Replies)
Discussion started by: Brendan Kennedy
4 Replies

3. Solaris

Installing gcc - recieve error message gcc : cannot execute

AIM- Install Oracle 11g on Solaris using VMWare Steps 1.Logged on as root 2.Created subfolders à /usr/local/bin & /usr/local/bin/gcc 3.Downloaded gcc & libiconv & unzipped them on my harddrive & burnt them on CD 4.Copied files from CD to /usr/local/bin/gcc 5.Terminal (root) à pkgadd -d... (8 Replies)
Discussion started by: Ackers
8 Replies

4. Linux

How to convert Linux Kernel built-in module into a loadable module

Hi all, I am working on USB data monitoring on Fedora Core 9. Kernel 2.6.25 has a built-in module (the one that isn't loadable, but compiles and links statically with the kernel during compilation) to snoop USB data. It is in <kernel_source_code>/drivers/usb/mon/. I need to know if I can... (0 Replies)
Discussion started by: anitemp
0 Replies

5. Linux

distro with built in java.

i installed fedora core6, then came to know that java is not supplied with it, can u help me by naming some distros with built in java, does RHL5+ has it? (2 Replies)
Discussion started by: zius_oram
2 Replies

6. Solaris

Which file is read by kernel to set its default system kernel parameters values?

Hi gurus Could anybody tell me which file is read by kernel to set its default system kernal parameters values in solaris. Here I am not taking about /etc/system file which is used to load kernal modules or to change any default system kernal parameter value Is it /dev/kmem file or something... (1 Reply)
Discussion started by: girish.batra
1 Replies

7. Shell Programming and Scripting

bash built-in

Is there any command or VARIABLE in unix to display only bash builtin commands?. Some days back I worked on that, but now I do not remember. Can anyone please reply for this?... (4 Replies)
Discussion started by: gwgreen1
4 Replies

8. Shell Programming and Scripting

Manually built the code below.

Hi All, I am faced with a problem. I came to know that large scale problems in MATLAB are very slow and with loops they are even slower. I have the MATLAB script below that does some large scale computation for my school project work. I've been running this code for long now but all it did... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

9. UNIX for Advanced & Expert Users

Kernel Modules Not geting built

I installed in VM the Mandriva Linux with 2.6.27 kernel. But presently when I fire make the modules .ko does not get built. I get the following output on firing command in the kernel module folder. $ make Building first_driver.c ... make: Entering directory... (1 Reply)
Discussion started by: rupeshkp728
1 Replies

10. Linux

Unload kernel module at boot time (Debian Wheezy 7.2, 3.2.0-4-686-pae kernel)

Hi everyone, I am trying to prevent the ehci_hcd kernel module to load at boot time. Here's what I've tried so far: 1) Add the following line to /etc/modprobe.d/blacklist.conf (as suggested here): 2) Blacklisted the module by adding the following string to 3) Tried to blacklist the module... (0 Replies)
Discussion started by: gacanepa
0 Replies
STRIP(1)						      General Commands Manual							  STRIP(1)

NAME
strip - remove symbols SYNOPSIS
strip [ option ] name ... DESCRIPTION
strip removes or modifies the symbol table attached to the output of the assembler and link editor. This is useful to save space after a program has been debugged and to limit dynamically bound symbols. strip no longer removes relocation entries under any condition. Instead, it updates the external relocation entries (and indirect symbol table entries) to reflect the resulting symbol table. strip prints an error message for those symbols not in the resulting symbol table that are needed by an external relocation entry or an indirect symbol table. The link editor ld(1) is the only program that can strip relocation entries and know if it is safe to do so. When strip is used with no options on an executable file, it checks that file to see if it uses the dynamic link editor. If it does, the effect of the strip command is the same as using the -u and -r options. If the file does not use the dynamic link editor, the effect of strip without any options is the same as using the -s option of ld(1). The options -S, -x, and -X have the same effect as the ld(1) options. The options to strip(1) can be combined to trim the symbol table to just what is desired. You should trim the symbol table of files used with dynamic linking so that only those symbols intended to be external interfaces are saved. Files used with dynamic linking include executables, objects that are loaded (usually bundles), and dynamic shared libraries. Only global symbols are used by the dynamic linking process. You should strip all non-global symbols. When an executable is built with all its dependent dynamic shared libraries, it is typically stripped with: % strip -u -r executable which saves all undefined symbols (usually defined in the dynamic shared libraries) and all global symbols defined in the executable refer- enced by the dynamic libraries (as marked by the static link editor when the executable was built). This is the maximum level of striping for an executable that will still allow the program to run correctly with its libraries. If the executable loads objects, however, the global symbols that the objects reference from the executable also must not be stripped. In this case, you should list the global symbols that the executable wants to allow the objects to reference in a file, and those global sym- bols are then saved when the executable is stripped. For example: % strip -u -r -s interface_symbols executable where the file interface_symbols would contain only those global symbols from the executable that the executable wants the loaded objects to have access to. For objects that will be loaded into an executable, you should trim the symbol table to limit the global symbols the executable will see. This would be done with: % strip -s interface_symbols -u object which would leave only the undefined symbols and symbols listed in the file interface_symbols in the object file. In this case, strip(1) has updated the relocation entries and indirect symbol table to reflect the new symbol table. For dynamic shared libraries, the maximum level of stripping is usually -x (to remove all non-global symbols). STRIPPING FILES FOR USE WITH RUNTIME LOADED CODE
Trimming the symbol table for programs that load code at runtime allows you to control the interface that the executable wants to provide to the objects that it will load; it will not have to publish symbols that are not part of its interface. For example, an executable that wishes to allow only a subset of its global symbols but all of the statically linked shared library's globals to be used would be stripped with: % strip -s interface_symbols -A executable where the file interface_symbols would contain only those symbols from the executable that it wishes the code loaded at runtime to have access to. Another example is an object that is made up of a number of other objects that will be loaded into an executable would built and then stripped with: % ld -o relocatable.o -r a.o b.o c.o % strip -s interface_symbols -u relocatable.o which would leave only the undefined symbols and symbols listed in the file interface_symbols in the object file. In this case strip(1) has updated the relocation entries to reflect the new symbol table. OPTIONS
The first set of options indicate symbols that are to be save in the resulting output file. -u Save all undefined symbols. This is intended for use with relocatable objects to save symbols referred to by external relocation entries. Note that common symbols are also referred to by external relocation entries and this flag does not save those symbols. -r Save all symbols referenced dynamically. -s filename Save the symbol table entries for the global symbols listed in filename. The symbol names listed in filename must be one per line. Leading and trailing white space are not part of the symbol name. Lines starting with # are ignored, as are lines with only white space. -R filename Remove the symbol table entries for the global symbols listed in filename. This file has the same format as the -s filename option above. This option is usually used in combination with other options that save some symbols, -S, -x, etc. -i Ignore symbols listed in the -s filename or -R filename options that are not in the files to be stripped (this is normally an error). -d filename Save the debugging symbol table entries for each source file name listed in filename. The source file names listed in filename must be one per line with no other white space in the file except the newlines on the end of each line. And they must be just the base name of the source file without any leading directories. -A Save all global absolute symbols except those with a value of zero, and save Objective C class symbols. This is intended for use of programs that load code at runtime and want the loaded code to use symbols from the shared libraries (this is only used with NEXTSTEP 3.3 and earlier releases). -n Save all N_SECT global symbols. This is intended for use with executable programs in combination with -A to remove the symbols needed for correct static link editing which are not needed for use with runtime loading interfaces where using the -s filename would be too much trouble (this is only used with NEXTSTEP 3.3 and earlier releases). These options specify symbols to be removed from the resulting output file. -S Remove the debugging symbol table entries (those created by the -g option to cc(1) and other compilers). -X Remove the local symbols whose names begin with `L'. -x Remove all local symbols (saving only global symbols). -c Remove the section contents of a dynamic library creating a stub library output file. And the last options: - Treat all remaining arguments as file names and not options. -o output Write the result into the file output. SEE ALSO
ld(1), cc(1) LIMITATIONS
Not every layout of a Mach-O file can be stripped by this program. But all layouts produced by the Apple compiler system can be stripped. Apple Computer, Inc. April 21, 2001 STRIP(1)
All times are GMT -4. The time now is 03:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy