public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* egcs on AIX: native or gnu ld?
@ 1997-10-17  3:12 Andrey Slepuhin
  1997-10-17 19:31 ` David Edelsohn
  0 siblings, 1 reply; 13+ messages in thread
From: Andrey Slepuhin @ 1997-10-17  3:12 UTC (permalink / raw)
  To: egcs

Hi,

Last week I had intensive testing of two builds of egcs-971008 on AIX
4.2.1 -
with gnu ld (from gas-970915) and with native ld (both with
--enable-shared option).
All my examples were compiled and executed fine with both installation
except
some questions.

1) what means gnu ld warning 

ld: warning: attempt to export undefined symbol `global constructors
keyed to f(void)'

when I tried to test -frepo option? Without this option I didn't get any
warnings.
And what means `global constructors keyed to f' in context of non-member
function f?
It seems that this warning does not affect program execution

2) It seems that I cannot use native linker with option -frepo, because
collect normally reads .rpo files but collect2 exits due to return code
8 of linker
(undefined symbols)

3) When using native linker to build shared libraries I permanently
receive
warnings about the following duplicate symbols (which are automatically
generated
during link stage):

ld: 0711-224 WARNING: Duplicate symbol: ._GLOBAL__DI
ld: 0711-224 WARNING: Duplicate symbol: ._GLOBAL__DD
ld: 0711-224 WARNING: Duplicate symbol: _GLOBAL__DI
ld: 0711-224 WARNING: Duplicate symbol: _GLOBAL__DD

What these symbols mean? I tried to look into source of automatically
generated
.c files, and it seems that these functions call something like module
initialization
functions (am I right?), so they differ in each shared object. I didn't
saw any
effect of such duplication, but I'm not sure that this is right thing.

4) I successfully build omniORB2 2.0 with both installations of egcs,
but in case
of using gnu linker the most of examples fail (segmentation fault). I
tried to
debug these examples but without success :-(. May be this is a bug of
omniORB,
but I'm not sure, because all works fine with native ld (both dynamic
and static
libraries) and with gnu ld (static libraries). The only idea I have is
that these
segmentation faults are in reference with using shared libraries in
multithreaded environment.

5) What about including support of shared libraries with native ld to
the future
snapshots of egcs? Now I am using hacked version of system script
makeC++SharedLib,
but it only needed for generating correct exports list. At least, I have
no
problems yet with shared libraries built with native ld.

6) Does anybody has an experience of building and using egcs on AIX? I
didn't saw
any messages in mailing lists (but may be they have no problems? :-))

Regards,

Andrey Slepuhin,
Moscow State University

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: egcs on AIX: native or gnu ld?
@ 1997-10-20 14:37 Mike Stump
  1997-10-20 18:12 ` David Edelsohn
  0 siblings, 1 reply; 13+ messages in thread
From: Mike Stump @ 1997-10-20 14:37 UTC (permalink / raw)
  To: dje, pooh; +Cc: egcs

> To: Andrey Slepuhin <pooh@msu.ru>
> Cc: egcs@cygnus.com
> Date: Mon, 20 Oct 97 13:36:49 -0400
> From: David Edelsohn <dje@watson.ibm.com>

> Andrey> Well, GLOBAL__DI/DD symbols are automatically exported by
> Andrey> collect2. But what about __eh_<something> symbols, which are
> Andrey> defined for each object file and are global bss symbols?
> Andrey> Should I export them or they can be omitted?

> I guess that I do not understand exception handling and how __eh_*
> symbols are handled well enough to know if they need to be exported.
> Someone who understand the C++ implementation needs to examine this.
> A symbol needs to be exported if it will be referenced by name
> outside its module.
>
> 	If C++ applications have the names of __eh_* symbols in other
> modules compiled in, then it would seem that exports are necessary.  In
> that case, one needs to expand collect2.c:scan_prog_file() to add __eh_*
> symbols to the export list along with constructors and destructors.

Given the above, I say Add them (by exact name, no .* regexs please),
they need to be exported.

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: egcs on AIX: native or gnu ld?
@ 1997-10-20 18:12 Mike Stump
  0 siblings, 0 replies; 13+ messages in thread
From: Mike Stump @ 1997-10-20 18:12 UTC (permalink / raw)
  To: dje; +Cc: egcs, pooh

> To: mrs@wrs.com (Mike Stump)
> Cc: pooh@msu.ru, egcs@cygnus.com
> Date: Mon, 20 Oct 97 18:22:36 -0400
> From: David Edelsohn <dje@watson.ibm.com>

> >>>>> Mike Stump writes:

> [ ... ] I guess I do not understand your no regexs request.  [ ... ]
> However, the names are found essentially using a prefix regex.  How
> else can one determine that a symbol is an exception handler other
> than looking for __eh_*?

This isn't what these symbols are.  There are 6 or so symbols that
have specific names that were being referred to, (__eh_type,
__eh_pc...).  They are BSS common things.  They are also defined more
recently in libgcc.a.

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

end of thread, other threads:[~1997-10-20 18:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-17  3:12 egcs on AIX: native or gnu ld? Andrey Slepuhin
1997-10-17 19:31 ` David Edelsohn
1997-10-18 12:56   ` Joe Buck
1997-10-18 16:18     ` David Edelsohn
1997-10-18 13:24   ` Andrey Slepuhin
1997-10-19 14:52     ` David Edelsohn
1997-10-20  2:42       ` Andrey Slepuhin
1997-10-20 10:49         ` David Edelsohn
1997-10-20  5:58       ` Andrey Slepuhin
1997-10-20  6:51       ` Andrey Slepuhin
1997-10-20 14:37 Mike Stump
1997-10-20 18:12 ` David Edelsohn
1997-10-20 18:12 Mike Stump

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).