Solaris Application Programming, 1/e - Chapter 4 - Parent Directory
Solaris Application Programming, 1/e - Chapter 4 - Parent Directory Solaris Application Programming, 1/e - Chapter 4 - Parent Directory
92 Chapter 4 Informational Tools .strtab: Name a.out crti.s crt1.s __get_exit_frame_monitor_ptr ... .stab.indexstr: Name /tmp/;/opt/SUNWspro/prod/bin/f90 -g -qoption f90comp - h.XAzwWCA01y4\$DCK. test.f90 ... The mcs tool, which is shipped with Solaris, manipulates the comments section in elf files. The -p option will print the comments. It is possible to delete the comments section using -d, or append more strings using -a. The comments section often holds details of the compiler version used and the header files included. An example of manipulating the comments section is shown in Example 4.66. The initial comments section shows the version information for the compiler, together with details of the header files included at compile time. Using the mcs flag -a, it is possible to append another comment to the file. $ cc -O code.c $ mcs -p a.out a.out: Example 4.65 Example of Output from dump (continued ) Example 4.66 Manipulating the Comments Section Using mcs cg: Sun Compiler Common 11 2005/10/13 cg: Sun Compiler Common 11 2005/10/13 @(#)stdio.h 1.84 04/09/28 SMI @(#)feature_tests.h 1.25 07/02/02 SMI ... ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.486 $ mcs -a "Hello" a.out $ mcs -p a.out a.out: ... ld: Software Generation Utilities - Solaris Link Editors: 5.10-1.486 Hello
- Page 1 and 2: Informational Tools 4.1 Chapter Obj
- Page 3 and 4: 4.2 TOOLS THAT REPORT SYSTEM CONFIG
- Page 5 and 6: 4.2 TOOLS THAT REPORT SYSTEM CONFIG
- Page 7 and 8: 4.3 TOOLS THAT REPORT CURRENT SYSTE
- Page 9 and 10: 4.3 TOOLS THAT REPORT CURRENT SYSTE
- Page 11 and 12: 4.3 TOOLS THAT REPORT CURRENT SYSTE
- Page 13 and 14: 4.3 TOOLS THAT REPORT CURRENT SYSTE
- Page 15 and 16: 4.3 TOOLS THAT REPORT CURRENT SYSTE
- Page 17 and 18: 4.3 TOOLS THAT REPORT CURRENT SYSTE
- Page 19 and 20: 4.3 TOOLS THAT REPORT CURRENT SYSTE
- Page 21 and 22: 4.3 TOOLS THAT REPORT CURRENT SYSTE
- Page 23 and 24: 4.3 TOOLS THAT REPORT CURRENT SYSTE
- Page 25 and 26: 4.4 PROCESS- AND PROCESSOR-SPECIFIC
- Page 27 and 28: 4.4 PROCESS- AND PROCESSOR-SPECIFIC
- Page 29 and 30: 4.4 PROCESS- AND PROCESSOR-SPECIFIC
- Page 31 and 32: 4.4 PROCESS- AND PROCESSOR-SPECIFIC
- Page 33 and 34: 4.4 PROCESS- AND PROCESSOR-SPECIFIC
- Page 35 and 36: 4.4 PROCESS- AND PROCESSOR-SPECIFIC
- Page 37 and 38: 4.5 INFORMATION ABOUT APPLICATIONS
- Page 39 and 40: 4.5 INFORMATION ABOUT APPLICATIONS
- Page 41 and 42: 4.5 INFORMATION ABOUT APPLICATIONS
- Page 43: 4.5 INFORMATION ABOUT APPLICATIONS
92 <strong>Chapter</strong> 4 Informational Tools<br />
.strtab:<br />
Name<br />
<br />
a.out<br />
crti.s<br />
crt1.s<br />
__get_exit_frame_monitor_ptr<br />
...<br />
.stab.indexstr:<br />
Name<br />
/tmp/;/opt/SUNWspro/prod/bin/f90 -g -qoption f90comp -<br />
h.XAzwWCA01y4\$DCK. test.f90<br />
...<br />
The mcs tool, which is shipped with <strong>Solaris</strong>, manipulates the comments section<br />
in elf files. The -p option will print the comments. It is possible to delete the comments<br />
section using -d, or append more strings using -a. The comments section<br />
often holds details of the compiler version used and the header files included. An<br />
example of manipulating the comments section is shown in Example 4.66. The initial<br />
comments section shows the version information for the compiler, together<br />
with details of the header files included at compile time. Using the mcs flag -a, it<br />
is possible to append another comment to the file.<br />
$ cc -O code.c<br />
$ mcs -p a.out<br />
a.out:<br />
Example 4.65 Example of Output from dump (continued )<br />
Example 4.66 Manipulating the Comments Section Using mcs<br />
cg: Sun Compiler Common 11 2005/10/13<br />
cg: Sun Compiler Common 11 2005/10/13<br />
@(#)stdio.h 1.84 04/09/28 SMI<br />
@(#)feature_tests.h 1.25 07/02/02 SMI<br />
...<br />
ld: Software Generation Utilities - <strong>Solaris</strong> Link Editors: 5.10-1.486<br />
$ mcs -a "Hello" a.out<br />
$ mcs -p a.out<br />
a.out:<br />
...<br />
ld: Software Generation Utilities - <strong>Solaris</strong> Link Editors: 5.10-1.486<br />
Hello