diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2009-02-25 14:39:35 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2009-02-25 14:39:35 +0000 |
commit | b9d678e09f98be001c1df8b127e4e29b099787f2 (patch) | |
tree | f5de05ce1c3300eb6366f64f6b7dbfdb1d43e4ff /bfd | |
parent | 9e2f0ad4e0a4cd818c7f9a23277948732a96192d (diff) | |
download | gdb-b9d678e09f98be001c1df8b127e4e29b099787f2.zip gdb-b9d678e09f98be001c1df8b127e4e29b099787f2.tar.gz gdb-b9d678e09f98be001c1df8b127e4e29b099787f2.tar.bz2 |
2009-02-25 H.J. Lu <hongjiu.lu@intel.com>
* elf.c (elf_find_function): Use is_function_type to check
function symbol.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elf.c | 13 |
2 files changed, 13 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index df8618d..4d58387 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2009-02-25 H.J. Lu <hongjiu.lu@intel.com> + + * elf.c (elf_find_function): Use is_function_type to check + function symbol. + 2009-02-24 Sterling Augustine <sterling@jaw.hq.tensilica.com> * xtensa-modules.c: Revert to previous version 1.11 due @@ -7041,7 +7041,7 @@ _bfd_elf_set_arch_mach (bfd *abfd, for error reporting. */ static bfd_boolean -elf_find_function (bfd *abfd ATTRIBUTE_UNUSED, +elf_find_function (bfd *abfd, asection *section, asymbol **symbols, bfd_vma offset, @@ -7061,6 +7061,7 @@ elf_find_function (bfd *abfd ATTRIBUTE_UNUSED, make a better choice of file name for local symbols by ignoring file symbols appearing after a given local symbol. */ enum { nothing_seen, symbol_seen, file_after_symbol_seen } state; + const struct elf_backend_data *bed = get_elf_backend_data (abfd); filename = NULL; func = NULL; @@ -7071,20 +7072,22 @@ elf_find_function (bfd *abfd ATTRIBUTE_UNUSED, for (p = symbols; *p != NULL; p++) { elf_symbol_type *q; + unsigned int type; q = (elf_symbol_type *) *p; - switch (ELF_ST_TYPE (q->internal_elf_sym.st_info)) + type = ELF_ST_TYPE (q->internal_elf_sym.st_info); + switch (type) { - default: - break; case STT_FILE: file = &q->symbol; if (state == symbol_seen) state = file_after_symbol_seen; continue; + default: + if (!bed->is_function_type (type)) + break; case STT_NOTYPE: - case STT_FUNC: if (bfd_get_section (&q->symbol) == section && q->symbol.value >= low_func && q->symbol.value <= offset) |