Cross gcc Mailing List Archive

[Prev][Next][Index][Thread]

Re: ident problems using gnu tools



>>>>> "Stephen" == Stephen Williams <steve@icarus.com> writes:

    Stephen> leisner@sdsp.mc.xerox.com said:
    >> Is an ident string from the #ident non-ansi nonsense?

    Stephen> The ANSI equivilent is ``#pragma ident'', but #ident is
    Stephen> more ubiquitous.  The reason for using the pragma is to
    Stephen> mark the object file but not consume runtime memory. In
    Stephen> large projects, I've seen memory images shrink
    Stephen> frightfully when I removed all the rcsid nonsense. It's
    Stephen> well worth the non-conformance.

    Stephen> Object formats such as ELF and COFF support comment
    Stephen> sections, and this is the PERFECT place to put such ident
    Stephen> strings. That is in fact what the .ident does in
    Stephen> assemblers that support it. The ``#ident'' then generates
    Stephen> strings in the .comment section, the linker combines them
    Stephen> into a common place, and the loader ignores them so they
    Stephen> do not hurt the performance of the executable.

    Stephen> Also, a good compiler will notice that rcsid is static,
    Stephen> and not used, and give you a warning that you probably
    Stephen> don't want to be bothered with.  Furthermore, such
    Stephen> nonsense in a header file simply will not work (#ident
    Stephen> works fine) and even if it did the memory consumption in
    Stephen> the loaded image would be impractically high.

I commented in a similar vein earlier in this thread.  What I am doing
now whenever I make a rom image is to put a single ascii text
identifier in the rom image itself that is the "bill of materials"
version number, not the version number of any particular object file,
much less all of them.  I then keep a flat ascii text file that
contains the RCS headers from each of the source files that went into
the load.  Each of these headers contains the RCS file name and
version identifier, together with the date modified and the username
of the modifier who checked that file into RCS for that version.  This
bill of materials is output automatically by the script that builds
the rom image, and is then checked into RCS as the *.bom file for that
load.  It is the RCS identification string for this *.bom file that
gets placed in the rom images as an ascii string at a known location,
and from that one can determine exactly how to reconstruct that rom
image directly from the sources.

-- 
--------  "And there came a writing to him from Elijah"  [2Ch 21:12]  --------
Robert Jay Brown III  rj@eli.wariat.org  http://eli.wariat.org  1 847 705-0424
Elijah Laboratories Inc.;  37 South Greenwood Avenue;  Palatine, IL 60067-6328
-----  M o d e l i n g   t h e   M e t h o d s   o f   t h e   M i n d  ------

References:

Home | Subject Index | Thread Index