This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
patch to nm allows nm to differentiate between weak functions and weak objects
- To: binutils at sourceware dot cygnus dot com, tdel at mail dot wrs dot com
- Subject: patch to nm allows nm to differentiate between weak functions and weak objects
- From: Thomas de Lellis <tdel at windriver dot com>
- Date: Mon, 24 Jan 2000 19:17:18 -0800
We need to distiguish in an nm dump listing between symbols
that are weak functions and symbols that are weak objects. nm
only dumped weak syms without making the distinction. A new "letter"
was added "V/v" to show weak objects...
======================================================================
2000-01-10 Thomas de Lellis <tdel@wrs.com>
* syms.c (bfd_decode_symclass)
Two new class characters were added - 'V' and 'v'. The
meaning of 'W' is now restricted to just weak functions.
nm for example now dumps:
'W' = weak global function
'w' = weak unresolved function
'V' = weak global object
'v' = weak unresolved object
======================================================================
*** syms.c@@/main/3 Mon Oct 4 13:46:29 1999
--- syms.c Mon Jan 24 19:10:27 2000
*************** bfd_decode_symclass (symbol)
*** 579,592 ****
if (bfd_is_und_section (symbol->section))
{
if (symbol->flags & BSF_WEAK)
! return 'w';
else
return 'U';
}
if (bfd_is_ind_section (symbol->section))
return 'I';
! if (symbol->flags & BSF_WEAK)
! return 'W';
if (!(symbol->flags & (BSF_GLOBAL | BSF_LOCAL)))
return '?';
--- 579,606 ----
if (bfd_is_und_section (symbol->section))
{
if (symbol->flags & BSF_WEAK)
! {
! if (symbol->flags & BSF_FUNCTION)
! return 'w';
! else if (symbol->flags & BSF_OBJECT)
! return 'v';
! }
else
return 'U';
}
if (bfd_is_ind_section (symbol->section))
return 'I';
! if (symbol->flags & BSF_WEAK)
! {
! /*
! W = weak function
! V = weak object
! */
! if (symbol->flags & BSF_FUNCTION)
! return 'W';
! else if (symbol->flags & BSF_OBJECT)
! return 'V';
! }
if (!(symbol->flags & (BSF_GLOBAL | BSF_LOCAL)))
return '?';