aboutsummaryrefslogtreecommitdiff
path: root/bfd/mach-o.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2011-11-22 10:47:50 +0000
committerTristan Gingold <gingold@adacore.com>2011-11-22 10:47:50 +0000
commite0ce1005459f02ba72edd1fb886ad6bd07cc4ab8 (patch)
tree3d2408b5b20b607cb2cb0690d2e1a584e9e5b69d /bfd/mach-o.c
parenta3769e0c797d0c521aeed2a23b34aa83887ef472 (diff)
downloadgdb-e0ce1005459f02ba72edd1fb886ad6bd07cc4ab8.zip
gdb-e0ce1005459f02ba72edd1fb886ad6bd07cc4ab8.tar.gz
gdb-e0ce1005459f02ba72edd1fb886ad6bd07cc4ab8.tar.bz2
2011-11-22 Tristan Gingold <gingold@adacore.com>
* mach-o.c (bfd_mach_o_print_symbol): Display COM for common symbols. Print section name in brackets.
Diffstat (limited to 'bfd/mach-o.c')
-rw-r--r--bfd/mach-o.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bfd/mach-o.c b/bfd/mach-o.c
index 91f0306..96b993c 100644
--- a/bfd/mach-o.c
+++ b/bfd/mach-o.c
@@ -547,7 +547,10 @@ bfd_mach_o_print_symbol (bfd *abfd,
switch (asym->n_type & BFD_MACH_O_N_TYPE)
{
case BFD_MACH_O_N_UNDF:
- name = "UND";
+ if (symbol->value == 0)
+ name = "UND";
+ else
+ name = "COM";
break;
case BFD_MACH_O_N_ABS:
name = "ABS";
@@ -571,7 +574,7 @@ bfd_mach_o_print_symbol (bfd *abfd,
asym->n_type, name, asym->n_sect, asym->n_desc);
if ((asym->n_type & BFD_MACH_O_N_STAB) == 0
&& (asym->n_type & BFD_MACH_O_N_TYPE) == BFD_MACH_O_N_SECT)
- fprintf (file, " %-5s", symbol->section->name);
+ fprintf (file, " [%s]", symbol->section->name);
fprintf (file, " %s", symbol->name);
}
}