mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-02-05 14:40:42 +08:00
libtool: parse "dumpbin -headers" to get symbols exported from implibs
* m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS) [MSVC]: Extract symbols imported from DLLs by import libraries in the Microsoft dumpbin wrapper. (LT_PATH_NM): Add -headers option if dumpbin is the located name lister to feed the above new code. * NEWS: Update. Signed-off-by: Peter Rosin <peda@lysator.liu.se>
This commit is contained in:
parent
2fc9d079d6
commit
0dd94ed521
6
NEWS
6
NEWS
@ -56,8 +56,10 @@ NEWS - list of user-visible changes between releases of GNU Libtool
|
||||
will now correctly fallback to using only vanilla shell features
|
||||
instead of failing with a parse at startup.
|
||||
- Correctly recognize import libraries when Microsoft dumpbin is used
|
||||
as the name lister. Also fix a bug in the dumpbin wrapper which could
|
||||
lead to broken symbol listings in some corner cases.
|
||||
as the name lister and extend the dumpbin wrapper to find symbols
|
||||
in import libraries using the -headers option of dumpbin. Also fix a
|
||||
bug in the dumpbin wrapper which could lead to broken symbol listings
|
||||
in some corner cases.
|
||||
|
||||
** Important incompatible changes:
|
||||
|
||||
|
7
m4/libtool.m4
vendored
7
m4/libtool.m4
vendored
@ -3426,9 +3426,9 @@ else
|
||||
# Let the user override the test.
|
||||
else
|
||||
AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
|
||||
case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
|
||||
case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
|
||||
*COFF*)
|
||||
DUMPBIN="$DUMPBIN -symbols"
|
||||
DUMPBIN="$DUMPBIN -symbols -headers"
|
||||
;;
|
||||
*)
|
||||
DUMPBIN=:
|
||||
@ -3682,6 +3682,9 @@ for ac_symprfx in "" "_"; do
|
||||
" {last_section=section; section=\$ 3};"\
|
||||
" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
|
||||
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
|
||||
" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
|
||||
" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
|
||||
" /^ *Type *: data/{print \"D\",si,substr(si,length(prfx))};"\
|
||||
" \$ 0!~/External *\|/{next};"\
|
||||
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
|
||||
" {if(hide[section]) next};"\
|
||||
|
Loading…
Reference in New Issue
Block a user