Bug 250793 - showing data from -frecord-gcc-switches
Summary: showing data from -frecord-gcc-switches
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: elfutils (Show other bugs)
(Show other bugs)
Version: rawhide
Hardware: All Linux
low
low
Target Milestone: ---
Assignee: Roland McGrath
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-08-03 17:21 UTC by Benjamin Kosnik
Modified: 2013-08-09 05:48 UTC (History)
3 users (show)

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: ---


Attachments (Terms of Use)

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.


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