From fcb93ecfc25d0337944090414ed53da4dcdd6864 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Tue, 17 Apr 2007 20:09:52 +0000 Subject: 2007-04-17 Paul Brook bfd/ * elf.c (_bfd_elf_is_function_type): New function. * elflink.c (_bfd_elf_merge_symbol): Use bed->is_function_type. (_bfd_elf_dynamic_symbol_p, _bfd_elf_symbol_refs_local_p, is_global_data_symbol_definition, elf_link_add_object_symbols): Ditto. * elf-bfd.h (elf_backend_data): Add is_function_type. (_bfd_elf_is_function_type): Add prototype. * elfxx-target.h (elf_backend_is_function_type): Add default definition. (elfNN_bed): Add elf_backend_is_function_type. * elf32-arm.c (elf32_arm_is_function_type): New function. (elf_backend_is_function_type): Define. ld/testsuite/ * ld-arm/preempt-app.s: New test. * ld-arm/preempt-app.sym: New. * ld-arm/arm-elf.exp: Add preempt-app. --- bfd/elf32-arm.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bfd/elf32-arm.c') diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index e8be0d5..10a6408 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -10557,6 +10557,13 @@ elf32_arm_additional_program_headers (bfd *abfd, return 0; } +/* We have two function types: STT_FUNC and STT_ARM_TFUNC. */ +static bfd_boolean +elf32_arm_is_function_type (unsigned int type) +{ + return (type == STT_FUNC) || (type == STT_ARM_TFUNC); +} + /* We use this to override swap_symbol_in and swap_symbol_out. */ const struct elf_size_info elf32_arm_size_info = { sizeof (Elf32_External_Ehdr), @@ -10643,6 +10650,7 @@ const struct elf_size_info elf32_arm_size_info = { elf32_arm_output_arch_local_syms #define elf_backend_begin_write_processing \ elf32_arm_begin_write_processing +#define elf_backend_is_function_type elf32_arm_is_function_type #define elf_backend_can_refcount 1 #define elf_backend_can_gc_sections 1 -- cgit v1.1