public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Edelsohn <dje@watson.ibm.com>
To: mrs@wrs.com (Mike Stump)
Cc: pooh@msu.ru, egcs@cygnus.com
Subject: Re: egcs on AIX: native or gnu ld?
Date: Mon, 20 Oct 1997 18:12:00 -0000	[thread overview]
Message-ID: <9710202222.AA34966@rios1.watson.ibm.com> (raw)
In-Reply-To: <199710202137.OAA26408@kankakee.wrs.com>

>>>>> Mike Stump writes:

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

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

	I guess I do not understand your no regexs request.  Current
export are determined using is_ctor_dtor() function which looks for all
symbols starting with "GLOBAL_.I." or some variant.  Each ctor or dtor is
exported individually by name for a particular file, and one can use
multiple linking passes to ensure that only those symbols truly present in
the final shared library are exported.  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_*?

	Also, to further clarify my comment above so that we do not
unnecessarily go down this path (although there is not much harm in
implementing this and exporting more symbols), only those symbols which
have compiled references *by name* in another module need to be exported.
If you somehow have access to a root symbol for your own private list,
transfer vectors, or otherwise obtain pointers to the functions using your
own scheme to grovel for the symbol names, they do not need to be
exported.  Export simply determines if the symbol is externally visible
outside the module for the AIX linker or loader to handle the resolution.
If the library is loaded for another reason and already mapped in to the
user's address space, the symbols are present and are callable through
pointers if the process has its own private way to determin the addresses.

David


  reply	other threads:[~1997-10-20 18:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-20 14:37 Mike Stump
1997-10-20 18:12 ` David Edelsohn [this message]
  -- strict thread matches above, loose matches on Subject: below --
1997-10-20 18:12 Mike Stump
1997-10-17  3:12 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9710202222.AA34966@rios1.watson.ibm.com \
    --to=dje@watson.ibm.com \
    --cc=egcs@cygnus.com \
    --cc=mrs@wrs.com \
    --cc=pooh@msu.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).