Ulrich Drepper - Re: __cxa_demangle sanity checks, issues, thoughts (original) (raw)
This is the mail archive of the libstdc++@gcc.gnu.orgmailing list for the libstdc++ project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
- From: Ulrich Drepper
- To: Benjamin Kosnik
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Thu, 15 Aug 2002 23:46:28 -0700
- Subject: Re: __cxa_demangle sanity checks, issues, thoughts
- References: <200208160456.g7G4uRb12387@fillmore.constant.com>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Benjamin Kosnik wrote:
// Assume external symbol list computed "as if" by // -g == --extern-only // -P == --portability // nm -g -P libstdc++.so.5.0.0 | awk '{ print 11 12}' | sort >& symbol_file
I cannot comment on much but on this I can.
The above line will not examine the dynamic symbol table but it is the symbol table which is defining the DSO interface. You would have to add - -D to the command line. But this doesn't help much here due to limitations in nm. It doesn't display version information.
I woulduse readelf to list the symbol table. To get the contents of the dynamic symbol table run
readelf -s libc.so|sed '/\.dynsym/,/^$/p;d'
Your command line above adds to the complete name a character describing whether the symbol is defined or not, and whether it is week. Undefined symbols are of no interest here. They don't add to the ABI. It also makes no sense whether a symbol is defined weak or not.
What does make a difference is:
- - the type of a symbol (function, object, no type, ...)
- - for object, on some platforms (like x86) it is necessary that the size doesn't change. This is because of copy relocations.
If you want a list of all exported symbols, annotated with the other important information, use something like
readelf -s |sed '/\.dynsym/,/^$/p;d'|grep -v ' LOCAL '|awk '{ if ($4 == "FUNC" || 4=="NOTYPE")printf"4 == "NOTYPE") printf "%s:%s\n", 4=="NOTYPE")printf"8, 4;elseif(4; else if (4;elseif(4 == "OBJECT") printf "%s:%s:%s\n", 8,8, 8,3, $4;}'
- --
- ---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE9XJ/J2ijCOnn/RHQRAgCPAJ47d6bEhwkkY/Nqx8PrkMiVL7uSKwCfV0Gn
mPnwDoJqmXtZ82fwBYhq6os=
=IAqb
-----END PGP SIGNATURE-----
- Follow-Ups:
- Re: __cxa_demangle sanity checks, issues, thoughts
* From: Benjamin Kosnik - Re: __cxa_demangle sanity checks, issues, thoughts
* From: Phil Edwards
- Re: __cxa_demangle sanity checks, issues, thoughts
- References:
- __cxa_demangle sanity checks, issues, thoughts
* From: Benjamin Kosnik
- __cxa_demangle sanity checks, issues, thoughts
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |