Re: object code from which compiler




In article <1125393744.976811.222620@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, "ajm" <a_j_moran@xxxxxxxxxxx> writes:
>
> given an object file is there any way (or tool) to determine which
> compiler created it ?

There is no standard mechanism for doing so; the standard does not
even require that there be an "object file", though it does discuss
the result of translation, which is probably close enough. (There
are implementations which do not treat the result of translation as
a file of "object code", exactly, but close enough.)

[OT] In general, there's no way to do this. Some implementations may
include identifying information in their output, but no doubt there
are others which do not. You could analyze sample outputs of various
implementations and devise heuristics to guess which implementation
produced which output, but you'd never have anything better than a
heuristic solution, and I suspect it wouldn't be terribly accurate in
the general case.

--
Michael Wojcik michael.wojcik@xxxxxxxxxxxxxx

Sure we're tossing out fluff, but tell me, where does anyone deal in words
with substance? -- Haruki Murakami (trans Alfred Birnbaum)
.



Relevant Pages

  • Re: Part 3 of Short Steps Toward Generic Programming: Attribute Inquiry
    ... >> ultimately you will be able to control in source (though I can't force ... >> implementations to work as I want) which instances can be created ... >> compiled early and kept in a procedure library or object file. ... no deficiencies and the other way is to make it so complicated ...
    (comp.lang.fortran)
  • Re: IBM/Absoft bug on Mac OS-X
    ... > is a reference to a function or data object defined in the object file. ... BLOCK DATA problem), but the same thing occurred to me, and yes, that's ... > the object file test_mod.o to be extracted in most implementations. ...
    (comp.lang.fortran)