01.09.2014 Views

The Linux Development Platform Configuring, Using, and ... - Classes

The Linux Development Platform Configuring, Using, and ... - Classes

The Linux Development Platform Configuring, Using, and ... - Classes

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CH07.fm Page 236 Monday, October 7, 2002 9:12 PM<br />

236 Chapter 7 • Miscellaneous Tools<br />

8048469: 68 e8 84 04 08 push $0x80484e8<br />

804846e: e8 c9 fe ff ff call 804833c <br />

8048473: 83 c4 10 add $0x10,%esp<br />

}<br />

7.7.6.5 Displaying Information about Library Files<br />

<strong>The</strong> comm<strong>and</strong> can also be used to display information about library files. <strong>The</strong> following<br />

comm<strong>and</strong> displays information about the library file libcommon.a <strong>and</strong> shows the object file<br />

names from which this library is built.<br />

[root@boota]# objdump -a libcommon.a<br />

In archive ../../chap-04/make/libcommon.a:<br />

common.o: file format elf32-i386<br />

rw-r--r-- 0/0 11668 Nov 13 19:48 2001 common.o<br />

ftp.o: file format elf32-i386<br />

rw-r--r-- 0/0 11824 Nov 13 19:53 2001 ftp.o<br />

[root@boota ltrace]#<br />

Common options that are used with this comm<strong>and</strong> are listed in Table 7-5.<br />

Table 7-5 Common options used with objdump comm<strong>and</strong><br />

Option<br />

Description<br />

-a Display information about library files<br />

--debugging<br />

Show debugging information<br />

-d Disassemble an object file<br />

-f Show file headers summary<br />

-S Display source code with disassembly information<br />

-t Display symbol table entries<br />

7.7.7 <strong>Using</strong> the size Utility<br />

<strong>The</strong> size utility displays sizes of each section in an object file. <strong>The</strong> following comm<strong>and</strong> displays<br />

sizes for the object file a.out.<br />

[root@boota]# size a.out<br />

text data bss dec hex filename<br />

1015 232 24 1271 4f7 a.out<br />

[root@boota]#

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!