aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-01-23 06:16:38 +0000
committerAlan Modra <amodra@gmail.com>2012-01-23 06:16:38 +0000
commit9f296da34f6b4357ce7528eeb2b29d9f8e50c71e (patch)
treeb030c6e6398786e9a3940724bf32fefe4738e057 /bfd/elf-bfd.h
parent2d6bdbd03f55a040894b631c5e82dbd8db8cf31c (diff)
downloadgdb-9f296da34f6b4357ce7528eeb2b29d9f8e50c71e.zip
gdb-9f296da34f6b4357ce7528eeb2b29d9f8e50c71e.tar.gz
gdb-9f296da34f6b4357ce7528eeb2b29d9f8e50c71e.tar.bz2
* elf-bfd.h: Formatting.
(struct elf_backend_data): Add "maybe_function_sym". (_bfd_elf_maybe_function_sym): Declare. * elfxx-target.h (elf_backend_maybe_function_sym): Define. (elfNN_bed): Init new field. * elf.c (elf_find_function): Use maybe_function_sym. (_bfd_elf_maybe_function_sym): New function. * elf64-ppc.c (elf_backend_maybe_function_sym): Define. (ppc64_elf_maybe_function_sym): New function.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index c7846e1..98948a9 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1,6 +1,6 @@
/* BFD back-end data structures for ELF files.
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
+ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -1221,6 +1221,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 elf_symbol_type *sym,
+ asection **code_sec, bfd_vma *code_off);
+
/* Used to handle bad SHF_LINK_ORDER input. */
bfd_error_handler_type link_order_error_handler;
@@ -1413,14 +1418,14 @@ struct bfd_elf_section_data
void *sec_info;
};
-#define elf_section_data(sec) ((struct bfd_elf_section_data*)(sec)->used_by_bfd)
+#define elf_section_data(sec) ((struct bfd_elf_section_data*)(sec)->used_by_bfd)
#define elf_linked_to_section(sec) (elf_section_data(sec)->linked_to)
-#define elf_section_type(sec) (elf_section_data(sec)->this_hdr.sh_type)
-#define elf_section_flags(sec) (elf_section_data(sec)->this_hdr.sh_flags)
-#define elf_group_name(sec) (elf_section_data(sec)->group.name)
-#define elf_group_id(sec) (elf_section_data(sec)->group.id)
-#define elf_next_in_group(sec) (elf_section_data(sec)->next_in_group)
-#define elf_fde_list(sec) (elf_section_data(sec)->fde_list)
+#define elf_section_type(sec) (elf_section_data(sec)->this_hdr.sh_type)
+#define elf_section_flags(sec) (elf_section_data(sec)->this_hdr.sh_flags)
+#define elf_group_name(sec) (elf_section_data(sec)->group.name)
+#define elf_group_id(sec) (elf_section_data(sec)->group.id)
+#define elf_next_in_group(sec) (elf_section_data(sec)->next_in_group)
+#define elf_fde_list(sec) (elf_section_data(sec)->fde_list)
#define elf_sec_group(sec) (elf_section_data(sec)->sec_group)
#define xvec_get_elf_backend_data(xvec) \
@@ -2197,6 +2202,9 @@ 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 elf_symbol_type *,
+ asection **, bfd_vma *);
+
extern int bfd_elf_get_default_section_type (flagword);
extern void bfd_elf_lookup_section_flags