public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: why no gcc3_compiled symbol
@ 2002-07-31 19:03 Robert Dewar
  0 siblings, 0 replies; 12+ messages in thread
From: Robert Dewar @ 2002-07-31 19:03 UTC (permalink / raw)
  To: dberlin, zack; +Cc: gcc, howarth

> Not to mention the ironic part of all this, which is that other 
> compilers started adding  gcc2_compiled symbols too, defeating the 
> whole purpose of it in the first place.

it's like intel compatible processors pretending they are made  by intel :-)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: why no gcc3_compiled symbol
  2002-08-03 13:31     ` Nix
@ 2002-08-03 15:00       ` John David Anglin
  0 siblings, 0 replies; 12+ messages in thread
From: John David Anglin @ 2002-08-03 15:00 UTC (permalink / raw)
  To: Nix; +Cc: phil, gcc, drow

> ... except, of course, that the file date inclusion breaks GCC bootstrap
> comparison (as you know) :)

I am sure there are ways to fix that if it was deemed useful to include
such information.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: why no gcc3_compiled symbol
  2002-08-01 11:12   ` John David Anglin
@ 2002-08-03 13:31     ` Nix
  2002-08-03 15:00       ` John David Anglin
  0 siblings, 1 reply; 12+ messages in thread
From: Nix @ 2002-08-03 13:31 UTC (permalink / raw)
  To: John David Anglin; +Cc: Phil Edwards, gcc, drow

On Thu, 1 Aug 2002, John David Anglin spake:
> HP appears to include file dates and compiler version as well.  For
> people seriously involved in software maintenance, this is obviously
> very useful information to have.

... except, of course, that the file date inclusion breaks GCC bootstrap
comparison (as you know) :)

-- 
`There's something satisfying about killing JWZ over and over again.'
                                        -- 1i, personal communication

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: why no gcc3_compiled symbol
  2002-08-01 10:39 ` Phil Edwards
@ 2002-08-01 11:12   ` John David Anglin
  2002-08-03 13:31     ` Nix
  0 siblings, 1 reply; 12+ messages in thread
From: John David Anglin @ 2002-08-01 11:12 UTC (permalink / raw)
  To: Phil Edwards; +Cc: gcc, drow

> There's a wishlist PR, c/2676, asking for the command-line options to
> be recorded in the object files.  I implemented most of it, but there's
> no useful way of getting the information back out, because nobody ever
> finished writing the BFD/libbfd.a documentation.  So the patch rotted.

HP appears to include file dates and compiler version as well.  For
people seriously involved in software maintenance, this is obviously
very useful information to have.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: why no gcc3_compiled symbol
  2002-07-31 23:38 John David Anglin
@ 2002-08-01 10:39 ` Phil Edwards
  2002-08-01 11:12   ` John David Anglin
  0 siblings, 1 reply; 12+ messages in thread
From: Phil Edwards @ 2002-08-01 10:39 UTC (permalink / raw)
  To: John David Anglin; +Cc: gcc, drow

On Wed, Jul 31, 2002 at 08:21:32PM +2000, John David Anglin wrote:
> > Debuggers and related tools use it to identify the object.
> 
> I had a question today from a developer working on purify for
> hppa64-hpux.  He wanted to know how to identify a gcc compiled
> object.  As far as I know, there isn't any direct way.  The HP
> compiler/ assembler stick a bunch of stuff into .note.  However,
> gcc/binutils doesn't seem to do this.

There's a wishlist PR, c/2676, asking for the command-line options to
be recorded in the object files.  I implemented most of it, but there's
no useful way of getting the information back out, because nobody ever
finished writing the BFD/libbfd.a documentation.  So the patch rotted.


Phil

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: why no gcc3_compiled symbol
@ 2002-07-31 23:38 John David Anglin
  2002-08-01 10:39 ` Phil Edwards
  0 siblings, 1 reply; 12+ messages in thread
From: John David Anglin @ 2002-07-31 23:38 UTC (permalink / raw)
  To: gcc; +Cc: drow

> Debuggers and related tools use it to identify the object.

I had a question today from a developer working on purify for
hppa64-hpux.  He wanted to know how to identify a gcc compiled
object.  As far as I know, there isn't any direct way.  The HP
compiler/ assembler stick a bunch of stuff into .note.  However,
gcc/binutils doesn't seem to do this.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: why no gcc3_compiled symbol
  2002-07-31 15:59     ` Zack Weinberg
@ 2002-07-31 18:57       ` Daniel Berlin
  0 siblings, 0 replies; 12+ messages in thread
From: Daniel Berlin @ 2002-07-31 18:57 UTC (permalink / raw)
  To: Zack Weinberg; +Cc: Jack Howarth, gcc


On Wednesday, July 31, 2002, at 03:44  PM, Zack Weinberg wrote:

> On Wed, Jul 31, 2002 at 03:23:07PM -0400, Jack Howarth wrote:
>> ...what I was actually wondering was if anyone knew the original
>> intent of the gcc2_compiled symbol?  Was its presence intended to
>> keep object files from being empty of symbols or was there some
>> other reason for it?
>
> Its purpose was to indicate to GDB that an object file had been
> compiled by GCC 2 as opposed to some other compiler.  It turned
> out that GDB did not need this information, and the presence of
> the symbol caused other problems, so we removed it.

Not to mention the ironic part of all this, which is that other 
compilers started adding  gcc2_compiled symbols too, defeating the 
whole purpose of it in the first place.

>
> zw
>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: why no gcc3_compiled symbol
  2002-07-31 15:36   ` Jack Howarth
  2002-07-31 15:48     ` Daniel Jacobowitz
@ 2002-07-31 15:59     ` Zack Weinberg
  2002-07-31 18:57       ` Daniel Berlin
  1 sibling, 1 reply; 12+ messages in thread
From: Zack Weinberg @ 2002-07-31 15:59 UTC (permalink / raw)
  To: Jack Howarth; +Cc: gcc

On Wed, Jul 31, 2002 at 03:23:07PM -0400, Jack Howarth wrote:
> ...what I was actually wondering was if anyone knew the original
> intent of the gcc2_compiled symbol?  Was its presence intended to
> keep object files from being empty of symbols or was there some
> other reason for it?

Its purpose was to indicate to GDB that an object file had been
compiled by GCC 2 as opposed to some other compiler.  It turned
out that GDB did not need this information, and the presence of
the symbol caused other problems, so we removed it.

zw

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: why no gcc3_compiled symbol
  2002-07-31 15:36   ` Jack Howarth
@ 2002-07-31 15:48     ` Daniel Jacobowitz
  2002-07-31 15:59     ` Zack Weinberg
  1 sibling, 0 replies; 12+ messages in thread
From: Daniel Jacobowitz @ 2002-07-31 15:48 UTC (permalink / raw)
  To: Jack Howarth; +Cc: gcc

On Wed, Jul 31, 2002 at 03:23:07PM -0400, Jack Howarth wrote:
> Andreas,
>     Thats fine as I am currently testing proposed patches to the
> XFree86 loader for HJ. However what I was actually wondering was
> if anyone knew the original intent of the gcc2_compiled symbol?
> Was its presence intended to keep object files from being empty
> of symbols or was there some other reason for it?

Debuggers and related tools use it to identify the object.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: why no gcc3_compiled symbol
@ 2002-07-31 15:36   ` Jack Howarth
  2002-07-31 15:48     ` Daniel Jacobowitz
  2002-07-31 15:59     ` Zack Weinberg
  0 siblings, 2 replies; 12+ messages in thread
From: Jack Howarth @ 2002-07-31 15:36 UTC (permalink / raw)
  To: gcc

Andreas,
    Thats fine as I am currently testing proposed patches to the
XFree86 loader for HJ. However what I was actually wondering was
if anyone knew the original intent of the gcc2_compiled symbol?
Was its presence intended to keep object files from being empty
of symbols or was there some other reason for it?
                        Jack

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: why no gcc3_compiled symbol
  2002-07-31  8:54 Jack Howarth
@ 2002-07-31  9:33 ` Andreas Schwab
  2002-07-31 15:36   ` Jack Howarth
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2002-07-31  9:33 UTC (permalink / raw)
  To: Jack Howarth; +Cc: gcc

Jack Howarth <howarth@bromo.msbb.uc.edu> writes:

|>      Does anyone know why gcc >= 3.0 doesn't have a gcc3_compiled
|> symbol like gcc 2.9x had a gcc2_compiled symbol? I ask because in
|> tracking down a problem with a gcc 3.1.1 built XFree86 loading its
|> libGLcore.a xserver module we found gcc 3.1.1 will create completely
|> empty object files. This compares to gcc 2.95.4 or 2.96 which would
|> always leave a gcc2_compiled placekeeper symbol in an empty object
|> file. This is arose because when you strip a gcc 3.1.1 built 
|> static lib that has such an empty object file linked in you get
|> a object file with no symbols at all. This breaks the current
|> XFree86 loader.

Then the XFree86 loader is broken, IMHO.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 12+ messages in thread

* why no gcc3_compiled symbol
@ 2002-07-31  8:54 Jack Howarth
  2002-07-31  9:33 ` Andreas Schwab
  0 siblings, 1 reply; 12+ messages in thread
From: Jack Howarth @ 2002-07-31  8:54 UTC (permalink / raw)
  To: gcc

     Does anyone know why gcc >= 3.0 doesn't have a gcc3_compiled
symbol like gcc 2.9x had a gcc2_compiled symbol? I ask because in
tracking down a problem with a gcc 3.1.1 built XFree86 loading its
libGLcore.a xserver module we found gcc 3.1.1 will create completely
empty object files. This compares to gcc 2.95.4 or 2.96 which would
always leave a gcc2_compiled placekeeper symbol in an empty object
file. This is arose because when you strip a gcc 3.1.1 built 
static lib that has such an empty object file linked in you get
a object file with no symbols at all. This breaks the current
XFree86 loader. Thanks in advance for any explanation.
                          Jack
ps This can be seen by...

#touch x.c
#gcc-2.95 -c x.c
#nm x.o
00000000 t gcc2_compiled.
#strip --strip-debug x.o
#nm x.o
00000000 t gcc2_compiled.

compared to

#touch x.c
#gcc-3.1 -c x.c
#nm x.o
#
#strip --strip-debug x.o
#nm x.o
nm: x.o: no symbols

Do we really want to create completely empty object files in gcc 3.1?

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2002-08-03 22:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-31 19:03 why no gcc3_compiled symbol Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
2002-07-31 23:38 John David Anglin
2002-08-01 10:39 ` Phil Edwards
2002-08-01 11:12   ` John David Anglin
2002-08-03 13:31     ` Nix
2002-08-03 15:00       ` John David Anglin
2002-07-31  8:54 Jack Howarth
2002-07-31  9:33 ` Andreas Schwab
2002-07-31 15:36   ` Jack Howarth
2002-07-31 15:48     ` Daniel Jacobowitz
2002-07-31 15:59     ` Zack Weinberg
2002-07-31 18:57       ` Daniel Berlin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).