New issue
Advanced search Search tips

Issue 669699 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jun 2017
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Record command lines in objects built by clang

Project Member Reported by laszio@chromium.org, Nov 29 2016

Issue description

gcc has a .note section recording how an object is built.
 
Owner: zhizhouy@chromium.org
Status: Assigned (was: Untriaged)
assigning to Zhizhou, please talk to me/cmtice about this feature.
srhines is also interested in it. 
The .note section does not say how the object was built; in only list info like this:

Displaying notes found at file offset 0x00000254 with length 0x00000020:
  Owner                 Data size	Description
  GNU                  0x00000010	NT_GNU_ABI_TAG (ABI version tag)
    OS: Linux, ABI: 2.6.24

Displaying notes found at file offset 0x00000274 with length 0x00000024:
  Owner                 Data size	Description
  GNU                  0x00000014	NT_GNU_BUILD_ID (unique build ID bitstring)
    Build ID: 6b572eaa73419420e462ff8778203218aba5edae

pretty sure they meant the .comment and .GCC.command.line sections.  they aren't notes in the traditional ELF sense.
and, for the record, we could not use the .GCC.command.line section generated by GCC because it gets merged for all object files into the final executable. So, you don't know if one object file was using a particular option or ALL of them were using it. 

For us, it is probably better to look at what is generated in the debug info which will keep the information per object file. 
Clang does not currently support putting this information in the debug information.

Comment 5 by cmt...@chromium.org, Jun 21 2017

Status: Fixed (was: Assigned)
Status: Verified (was: Fixed)
Closing. Please reopen it if its not fixed. Thanks!

Sign in to add a comment