aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-01-03 18:32:21 +0000
committerNick Clifton <nickc@redhat.com>2000-01-03 18:32:21 +0000
commit7a13edea08cb46d90e1512c72540de7d0b1411a5 (patch)
tree6f4fcb7c2b1f1caa3527b12b4dca91e483bed78a /bfd/elf.c
parentea44b73426cc8aa21a6b21eb5a523d53385e42e4 (diff)
downloadgdb-7a13edea08cb46d90e1512c72540de7d0b1411a5.zip
gdb-7a13edea08cb46d90e1512c72540de7d0b1411a5.tar.gz
gdb-7a13edea08cb46d90e1512c72540de7d0b1411a5.tar.bz2
ELF visibility patch from Martin Loewis.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index c58bd23..f97a9a9 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -761,6 +761,7 @@ bfd_elf_print_symbol (abfd, filep, symbol, how)
CONST char *section_name;
CONST char *name = NULL;
struct elf_backend_data *bed;
+ unsigned char st_other;
section_name = symbol->section ? symbol->section->name : "(*none*)";
@@ -836,10 +837,19 @@ bfd_elf_print_symbol (abfd, filep, symbol, how)
}
/* If the st_other field is not zero, print it. */
- if (((elf_symbol_type *) symbol)->internal_elf_sym.st_other != 0)
- fprintf (file, " 0x%02x",
- ((unsigned int)
- ((elf_symbol_type *) symbol)->internal_elf_sym.st_other));
+ st_other = ((elf_symbol_type *) symbol)->internal_elf_sym.st_other;
+
+ switch (st_other)
+ {
+ case 0: break;
+ case STV_INTERNAL: fprintf (file, " .internal"); break;
+ case STV_HIDDEN: fprintf (file, " .hidden"); break;
+ case STV_PROTECTED: fprintf (file, " .protected"); break;
+ default:
+ /* Some other non-defined flags are also present, so print
+ everything hex. */
+ fprintf (file, " 0x%02x", (unsigned int) st_other);
+ }
fprintf (file, " %s", name);
}