summaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2012-06-03 04:07:55 +0000
committerAlan Modra <amodra@bigpond.net.au>2012-06-03 04:07:55 +0000
commit91c3388334bc079e857764f6d2068d3523f237eb (patch)
tree096a0182252db96af8480a364994e279e3410a25 /bfd/elf-bfd.h
parent99f5d905074a155264b91f2528e9dee3ac8a6a91 (diff)
downloadbinutils-redhat-91c3388334bc079e857764f6d2068d3523f237eb.tar.gz
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 fcfb42aec6..6918d5a129 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);