mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
fcb93ecfc2
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.
28 lines
406 B
ArmAsm
28 lines
406 B
ArmAsm
@ Preempt an ARM shared library function with a Thumb function
|
|
@ in the application.
|
|
.text
|
|
.p2align 4
|
|
.globl _start
|
|
_start:
|
|
mov ip, sp
|
|
stmdb sp!, {r11, ip, lr, pc}
|
|
bl lib_func1
|
|
ldmia sp, {r11, sp, lr}
|
|
bx lr
|
|
|
|
.p2align 4
|
|
.globl app_func2
|
|
.type app_func2,%function
|
|
app_func2:
|
|
bx lr
|
|
|
|
.p2align 4
|
|
.globl lib_func1
|
|
.type lib_func1,%function
|
|
.thumb_func
|
|
lib_func1:
|
|
bx lr
|
|
|
|
.data
|
|
.long data_obj
|