[LLVMbugs] [Bug 7292] New: Adding version ident to clang-compiled object files

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 3 06:12:32 PDT 2010


http://llvm.org/bugs/show_bug.cgi?id=7292

           Summary: Adding version ident to clang-compiled object files
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: dimitry at andric.com
                CC: llvmbugs at cs.uiuc.edu


Unless using the -fno-ident option (which clang also supports :), gcc
adds a .ident statement to each .s file that is produced, e.g with the
FreeBSD standard gcc:

        .ident  "GCC: (GNU) 4.2.1 20070719  [FreeBSD]"

or with a more recent gcc build:

        .ident  "GCC: (GNU) 4.5.1 20100527 (prerelease)"

These .ident statements are usually (depending on arch) translated as
.comment sections in the produced .o files, and even propagate to the
final executable or shared library.

This is very handy to identify the specific compiler version (or
versions, even) later on, for example during bug-hunting, or some other
forensic post-mortem analysis.

Could something like this be added to clang?  For example, using the
same version string that is shown with clang -v:

clang version 2.0 (trunk 105388)

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list