2007/559: new symbol visibilities - EXPORTED, SINGLETON, and ELIMINATE
Rod Evans
Rod.Evans at sun.com
Wed Sep 26 11:26:04 PDT 2007
I'm sponsoring the following case for myself. This case qualifies
for Architectural self-review, but I wish to record the following
information.
------------------------------------------------------------------------
6602451 documents the requirements for some new symbol visibilities.
These visibilities are defined as ELF_ST_VISIBILITY() values within
a symbols "st_other" field.
As this is a "public" ELF field, the proposal was passed around several
ELF vendors. See:
http://groups.google.com/group/generic-abi/browse_thread/thread/1a84adc1566616
The proposal started with our requirement to add STV_SINGLETON and
STV_ELIMINATE. However, we found that SCO had already added to this
public arena with STV_EXPORTED. We therefore intend to add three
new visibilities:
STV_EXPORTED
Indicates that a symbol is to remain global and can not be
demoted or eliminated by any other linking technique.
STV_SINGLETON
Indicates that only once instance of the symbol can be bound
to by any reference. This is a long standing C++ requirement
that has relied upon interposition (but has been broken by
several linking techniques, such as symbol scoping, -Bsymbolic
and direct-binding).
STV_ELIMINATE
Indicates that a symbol should be eliminated from any symbol
tables. Required by DTrace.
------------------------------------------------------------------------
This fast track also adds a new observability option to lari(1):
User Commands lari(1)
SYNOPSIS
lari [-bCDsVv] [-a | -i | -o] file | directory... |
lari [-CDosv] [-m [-d mapdir]] file |
....
-V |
Appends interesting symbol visibilities. Symbols that |
are defined as singleton or are defined protected are |
identified with this option. |
------------------------------------------------------------------------
Public Header additions:
usr/src/uts/common/sys/elf.h
#define STV_EXPORTED 4
#define STV_SINGLETON 5
#define STV_ELIMINATE 6
usr/src/uts/common/sys/link.h
#define DF_1_SINGLETON 0x02000000
------------------------------------------------------------------------
Release Binding: Patch/Micro
sys/elf.h additions Commited
sys/link.h additions Commited
lari(1) -V Commited
--
Rod.
More information about the opensolaris-arc
mailing list