aboutsummaryrefslogtreecommitdiff
path: root/bfd/syms.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-09-06 18:44:56 +0000
committerIan Lance Taylor <ian@airs.com>1999-09-06 18:44:56 +0000
commit9296256064c51414fbac5ce5933ed722cadb9816 (patch)
tree8b9445fe8bff0b7ab9020f1e9a8e984dfc1f0a55 /bfd/syms.c
parent022a5af4953fbd647da3b6bbd22f75202184d361 (diff)
downloadgdb-9296256064c51414fbac5ce5933ed722cadb9816.zip
gdb-9296256064c51414fbac5ce5933ed722cadb9816.tar.gz
gdb-9296256064c51414fbac5ce5933ed722cadb9816.tar.bz2
1999-09-06 Donn Terry <donn@interix.com>
* syms.c (stt): Add some PE/PEI section names. (bfd_decode_symclass): Return 'w', not 'U', for a weak undefined symbol. (bfd_symbol_info): Check for 'w'.
Diffstat (limited to 'bfd/syms.c')
-rw-r--r--bfd/syms.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/bfd/syms.c b/bfd/syms.c
index 108e3ea..86dc66c 100644
--- a/bfd/syms.c
+++ b/bfd/syms.c
@@ -523,6 +523,11 @@ static CONST struct section_to_type stt[] =
{".sdata", 'g'}, /* Small initialized data. */
{".text", 't'},
{"code", 't'}, /* MRI .text */
+ {".drectve", 'i'}, /* MSVC's .drective section */
+ {".idata", 'i'}, /* MSVC's .idata (import) section */
+ {".edata", 'e'}, /* MSVC's .edata (export) section */
+ {".pdata", 'p'}, /* MSVC's .pdata (stack unwind) section */
+ {".debug", 'N'}, /* MSVC's .debug (non-standard debug syms) */
{0, 0}
};
@@ -572,7 +577,12 @@ bfd_decode_symclass (symbol)
if (bfd_is_com_section (symbol->section))
return 'C';
if (bfd_is_und_section (symbol->section))
- return 'U';
+ {
+ if (symbol->flags & BSF_WEAK)
+ return 'w';
+ else
+ return 'U';
+ }
if (bfd_is_ind_section (symbol->section))
return 'I';
if (symbol->flags & BSF_WEAK)
@@ -619,7 +629,7 @@ bfd_symbol_info (symbol, ret)
symbol_info *ret;
{
ret->type = bfd_decode_symclass (symbol);
- if (ret->type != 'U')
+ if (ret->type != 'U' && ret->type != 'w')
ret->value = symbol->value + symbol->section->vma;
else
ret->value = 0;