Bug 250793 - showing data from -frecord-gcc-switches
showing data from -frecord-gcc-switches
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: elfutils (Show other bugs)
rawhide
All Linux
low Severity low
: ---
: ---
Assigned To: Roland McGrath
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-03 13:21 EDT by Benjamin Kosnik
Modified: 2013-08-09 01:48 EDT (History)
3 users (show)

See Also:
Fixed In Version: 0.129-1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-29 13:30:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Benjamin Kosnik 2007-08-03 13:21:54 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):

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 18:16:14 EDT
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 12:00:59 EDT
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 13:30:43 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.