Bug 250793

Summary: showing data from -frecord-gcc-switches
Product: [Fedora] Fedora Reporter: Benjamin Kosnik <bkoz>
Component: elfutilsAssignee: Roland McGrath <roland>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: drepper, mnewsome, nickc
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 0.129-1.fc7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-08-29 17:30:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Benjamin Kosnik 2007-08-03 17:21:54 UTC
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):

all.

How reproducible:

try compiling any .c or .cc file with -frecord-gcc-switches

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Roland McGrath 2007-08-03 22:16:14 UTC
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
like this:

String section [4] '.some.strings' contains 15 bytes at offset 0x40:
  [     0]  hi there
  [     9]  buddy


Comment 2 Fedora Update System 2007-08-20 16:00:59 UTC
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.

Comment 3 Fedora Update System 2007-08-29 17:30:43 UTC
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.