aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-01-28 01:06:37 +0000
committerNick Clifton <nickc@redhat.com>2000-01-28 01:06:37 +0000
commitfad6fcbb0080ab85b3c911b5b8b59852b7a5bfc7 (patch)
tree7e6819127cafce8caa11e89b464ec24d20a5a894 /binutils
parent58efb6c0fdeb4fa7ed1aace3bd1fa5068e5fcc9a (diff)
downloadgdb-fad6fcbb0080ab85b3c911b5b8b59852b7a5bfc7.zip
gdb-fad6fcbb0080ab85b3c911b5b8b59852b7a5bfc7.tar.gz
gdb-fad6fcbb0080ab85b3c911b5b8b59852b7a5bfc7.tar.bz2
Apply patch from Thomas de Lellis to allow nm to distinguish between weak
function symbols and weak data symbols.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog9
-rw-r--r--binutils/binutils.texi15
-rw-r--r--binutils/nm.c6
3 files changed, 23 insertions, 7 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 89d6520..f20c78f 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,12 @@
+2000-27-01 Thomas de Lellis <tdel@windriver.com>
+
+ * nm.c (print_symbol_info_bsd): Use bfd_is_undefined_symclass to
+ check to unresolved symbols.
+ (print_symbol_info_sysv): Ditto.
+ (print_symbol_info_posix): Ditto.
+
+ * binutils.texi: Document new 'V' symclass flag for nm.
+
2000-01-27 Nick Clifton <nickc@redhat.com>
* binutils.texi (objdump): Document new ARM specific
diff --git a/binutils/binutils.texi b/binutils/binutils.texi
index 44887d0..95c684a 100644
--- a/binutils/binutils.texi
+++ b/binutils/binutils.texi
@@ -700,11 +700,18 @@ The symbol is in the text (code) section.
@item U
The symbol is undefined.
+@item V
+The symbol is a weak object. When a weak defined symbol is linked with
+a normal defined symbol, the normal defined symbol is used with no error.
+When a weak undefined symbol is linked and the symbol is not defined,
+the value of the weak symbol becomes zero with no error.
+
@item W
-The symbol is weak. When a weak defined symbol is linked with a normal
-defined symbol, the normal defined symbol is used with no error. When a
-weak undefined symbol is linked and the symbol is not defined, the value
-of the weak symbol becomes zero with no error.
+The symbol is a weak symbol that has not been specifically tagged as a
+weak object symbol. When a weak defined symbol is linked with a normal
+defined symbol, the normal defined symbol is used with no error.
+When a weak undefined symbol is linked and the symbol is not defined,
+the value of the weak symbol becomes zero with no error.
@item -
The symbol is a stabs symbol in an a.out object file. In this case, the
diff --git a/binutils/nm.c b/binutils/nm.c
index 3e2ee12..ade3f7c 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -1427,7 +1427,7 @@ print_symbol_info_bsd (info, abfd)
symbol_info *info;
bfd *abfd;
{
- if (info->type == 'U' || info->type == 'w')
+ if (bfd_is_undefined_symclass (info->type))
{
printf ("%*s",
#ifdef BFD64
@@ -1458,7 +1458,7 @@ print_symbol_info_sysv (info, abfd)
bfd *abfd;
{
print_symname ("%-20s|", info->name, abfd); /* Name */
- if (info->type == 'U' || info->type == 'w')
+ if (bfd_is_undefined_symclass (info->type))
printf (" "); /* Value */
else
print_value (info->value);
@@ -1481,7 +1481,7 @@ print_symbol_info_posix (info, abfd)
{
print_symname ("%s ", info->name, abfd);
printf ("%c ", info->type);
- if (info->type == 'U' || info->type == 'w')
+ if (bfd_is_undefined_symclass (info->type))
printf (" ");
else
print_value (info->value);