aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-06-03 04:08:07 +0000
committerAlan Modra <amodra@gmail.com>2012-06-03 04:08:07 +0000
commitaef36ac1fc7ce4c701b9a155092d1c00e9e3d1aa (patch)
treebcd6e8f067200bf65923b34a9ed5d90e95974f4d /bfd/elf-bfd.h
parent94bf648691a13b84074f5aade0c0420fa226a1b0 (diff)
downloadgdb-aef36ac1fc7ce4c701b9a155092d1c00e9e3d1aa.zip
gdb-aef36ac1fc7ce4c701b9a155092d1c00e9e3d1aa.tar.gz
gdb-aef36ac1fc7ce4c701b9a155092d1c00e9e3d1aa.tar.bz2
PR binutils/13897
* elf.c (elf_find_function): Cache last function sym info. (_bfd_elf_maybe_function_sym): Return function size, pass in section of interest. * elf-bfd.h (struct elf_backend_data <maybe_function_sym>): Likewise. (_bfd_elf_maybe_function_sym): Likewise. * elf64-ppc.c (ppc64_elf_maybe_function_sym): Likewise. (opd_entry_value): Add in_code_sec param. Revert caching code. Return -1 if in_code_sec and function found in wrong section. Update all calls.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index fcfb42a..6918d5a 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1222,10 +1222,11 @@ struct elf_backend_data
/* Return TRUE if type is a function symbol type. */
bfd_boolean (*is_function_type) (unsigned int type);
- /* Return TRUE if symbol may be a function. Set *CODE_SEC and *CODE_VAL
- to the function's entry point. */
- bfd_boolean (*maybe_function_sym) (const asymbol *sym,
- asection **code_sec, bfd_vma *code_off);
+ /* If the ELF symbol SYM might be a function in SEC, return the
+ function size and set *CODE_OFF to the function's entry point,
+ otherwise return zero. */
+ bfd_size_type (*maybe_function_sym) (const asymbol *sym, asection *sec,
+ bfd_vma *code_off);
/* Used to handle bad SHF_LINK_ORDER input. */
bfd_error_handler_type link_order_error_handler;
@@ -2207,8 +2208,8 @@ extern bfd_boolean _bfd_elf_map_sections_to_segments
extern bfd_boolean _bfd_elf_is_function_type (unsigned int);
-extern bfd_boolean _bfd_elf_maybe_function_sym (const asymbol *,
- asection **, bfd_vma *);
+extern bfd_size_type _bfd_elf_maybe_function_sym (const asymbol *, asection *,
+ bfd_vma *);
extern int bfd_elf_get_default_section_type (flagword);