Red Hat Bugzilla – Bug 250793
showing data from -frecord-gcc-switches
Last modified: 2013-08-09 01:48:15 EDT
Description of problem:
Gcc 4.2.x and above have a new switch, "-frecord-gcc-switches" which puts data
into a special section (.GCC.command.line). This data is pretty useful: the list
of compiler options uses to generate a given object file.
However, eu-readelf cannot deal with this.
instead, one must use something like:
objdump --full-contents --section .GCC.command.line test.o
readelf -x4 foo.o
readelf -x .GCC.command.line try.o
Even these incantations are not as good as it could be: ideally, just the string
data would be dumped, not the (useless?) hex output.
Version-Release number of selected component (if applicable):
try compiling any .c or .cc file with -frecord-gcc-switches
Steps to Reproduce:
I'm not fond of putting anything specifically for this magically-named section
into generic ELF tools. What I've done as a draft is to add a generic option to
eu-readelf, --strings (-p), which prints out (uninterpreted, assumed printable)
the strings in every SHT_PROGBITS, SHF_STRINGS section in the file. It looks
String section  '.some.strings' contains 15 bytes at offset 0x40:
[ 0] hi there
[ 9] buddy
elfutils-0.129-1.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report.
elfutils-0.129-1.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.