From: "Rayson Ho" <raysonho@eseenet.com>
To: binutils@sources.redhat.com
Subject: version scripts...
Date: Wed, 20 Apr 2005 01:54:00 -0000 [thread overview]
Message-ID: <4265b66b.5614.0@eseenet.com> (raw)
I am trying to find out whether this is a feature or bug...
I am building a shared library. I want to avoid making everything global,
so I created a version script with 2 nodes (VERS1.0 and VERS1.1).
- with the first version script, "funca" & "funcb" are global, with "fun*"
local.
- the second version script, "funca" & "funcb" are still global, with "*"
and "fun*" local.
* what I found is that with the first script, only "funca" is global. With
the second one, "funca" and "funcb" are global(which is what I expected).
I've copied & pasted my version scripts and the output of nm.
My machine is SLES9:
> ld -v
GNU ld version 2.15.90.0.1.1 20040303 (SuSE Linux)
TIA,
Rayson
> cat lib.c
funca() {}
funcb() {}
funcc() {}
funcd() {}
> cat elist
VERS1.0 {
global:
funca;
local:
fun*;
};
VERS1.1 {
global:
funcb;
local:
fun*;
};
> gcc -shared -Wl,--version-script -Wl,elist lib.c
> nm a.out | g func
000018c4 T funca
000018e4 t funcb
00001904 t funcc
00001924 t funcd
=========================================================================
> cat elist
VERS1.0 {
global:
funca;
local:
*;
};
VERS1.1 {
global:
funcb;
local:
fun*;
};
> gcc -shared -Wl,--version-script -Wl,elist lib.c
> nm a.out | g func
000007a8 T funca
000007c8 T funcb
000007e8 t funcc
00000808 t funcd
---------------------------------------------------------
Get your FREE E-mail account at http://www.eseenet.com !
reply other threads:[~2005-04-20 1:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4265b66b.5614.0@eseenet.com \
--to=raysonho@eseenet.com \
--cc=binutils@sources.redhat.com \
/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).