* version scripts...
@ 2005-04-20 1:54 Rayson Ho
0 siblings, 0 replies; only message in thread
From: Rayson Ho @ 2005-04-20 1:54 UTC (permalink / raw)
To: binutils
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 !
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-04-20 1:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-20 1:54 version scripts Rayson Ho
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).