Cross gcc Mailing List Archive

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

Re: ident problems using gnu tools



>>>>> "Marty" == Marty Leisner <leisner@sdsp.mc.xerox.com> writes:

    Marty> In message <199610041655.MAA15297@jupiter.curtech.com>, you
    Marty> write:
    >>  I seem to be having problems when trying to find what makes up
    >> an executable using the "what" command. It looks like the gnu
    >> assembler and linker don't keep the .ident portion in the
    >> executable.
    >> 
    >> This is using gcc-2.7.2.1 and binutils 2.5.2. I have tried this
    >> as a native on Sunos4.1.3 and as a cross to m68k-coff, both
    >> strip out ident messages.
    >> 
    >> It seems to work if I use the native linker and assembler, but
    >> I would really like to use the GNU binutils, and in the case of
    >> cross-development need to use them. Are there any tricks to get
    >> as and ld to keep the .ident strings


    Marty> Is an ident string from the #ident non-ansi nonsense?

    Marty> just put in your source files:

    Marty> static char rcsid[] = "$Id$"

    Marty> or

    Marty> static char sccsid[] = "%W% %G% %U%"

    Marty> or whathaveyou for your source ontrol.

    Marty> marty

The trouble with this approach is that lots of small modules tends to
eat up a lot of ROM just for the ident strings.  Furthermore, you may
not want to ship this information in the ROM so the customer (or the
enemy, if he captures your equipment) can see it.  Also, if you put a
#ident in every source file, then each *.h file has one too, and that
could really start to add up if you did it with char literals in the
rom image.  With a real #ident, this info is only in the object file,
not the rom image.

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

Follow-Ups: References:

Home | Subject Index | Thread Index