This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c/2678: gcc/g++ should stick compilation options into the .o file
- To: nobody at gcc dot gnu dot org
- Subject: Re: c/2678: gcc/g++ should stick compilation options into the .o file
- From: "Ronald F. Guilmette" <rfg at monkeys dot com>
- Date: 29 Apr 2001 18:56:00 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: "Ronald F. Guilmette" <rfg at monkeys dot com>
The following reply was made to PR c/2678; it has been noted by GNATS.
From: "Ronald F. Guilmette" <rfg@monkeys.com>
To: Phil Edwards <pedwards@disaster.jaj.com>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/2678: gcc/g++ should stick compilation options into the .o file
Date: Sun, 29 Apr 2001 11:47:39 -0700
In message <20010429055624.A28542@disaster.jaj.com>, you wrote:
>On Sat, Apr 28, 2001 at 08:36:49PM -0000, rfg@monkeys.com wrote:
>> And I don't think that it would
>> be very hard to get the front-end gcc/g++ driver to pass
>> ALL compilation options down to cc1 and/or cc1plus.
>
>We already do...
How convenient!
>> They
>> in turn could easily still the options into a suitable ELF
>> section.
>
>I can't see any obvious documentation of .note sections in the gas source,
>and I don't see .command mentioned at all. I wouldn't mind playing with this
>idea while waiting on compiles, if you can point me towards some usage docs.
My alopogies if my slippery fingers typed in `.command' when I intended
to write `.comment'.
For documentation of the intended usage and format of data in ELF .note
and .comment sections, you will need to refer to the original AT&T docu-
mentation of ELF. I know that documentation (in various non-modified
and slightly modified forms) is available on the web in various places,
because I found it on the web in several places when I went looking for
it a couple of months ago.
I'll find a URL or two for you if you need them. Just let me know.
Stuff that is placed into ELF .note sections is supposed to obey a very
well defined format. However stuff in .comment sections is more in the
nature of just free-form text lines, I believe. I can't remember anymore.
What gets put into a .note section is basically 100% implementation defined,
but when I glanced again at the original AT&T documentation on ELF the other
day, it appears to me that the contents of .note is supposed to be, in
effect, a set of name/value pairs (vaguely reminicent of UNIX environment
variables). The required ``structure'' of the .note section just tells
you where and how to encode one of these name/value pairs, in general.