diff options
author | Paul Brook <paul@codesourcery.com> | 2007-04-17 20:09:52 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2007-04-17 20:09:52 +0000 |
commit | fcb93ecfc25d0337944090414ed53da4dcdd6864 (patch) | |
tree | b5c44efa1f04197add1b10c2520b78cfb190553f /ld | |
parent | 06f9a1af70ed2722e575203073271ae39c071def (diff) | |
download | gdb-fcb93ecfc25d0337944090414ed53da4dcdd6864.zip gdb-fcb93ecfc25d0337944090414ed53da4dcdd6864.tar.gz gdb-fcb93ecfc25d0337944090414ed53da4dcdd6864.tar.bz2 |
2007-04-17 Paul Brook <paul@codesourcery.com>
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.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/arm-elf.exp | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/preempt-app.s | 27 | ||||
-rw-r--r-- | ld/testsuite/ld-arm/preempt-app.sym | 16 |
4 files changed, 53 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index da49ab7..5b5a496 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2007-04-17 Paul Brook <paul@codesourcery.com> + + * ld-arm/preempt-app.s: New test. + * ld-arm/preempt-app.sym: New. + * ld-arm/arm-elf.exp: Add preempt-app. + 2007-04-12 Richard Sandiford <richard@codesourcery.com> * ld-mips-elf/vxworks1-lib.td: New test. diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index 5844266..f28bd09 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -159,6 +159,10 @@ set armelftests { {"arm-pic-veneer" "-static -T arm.ld --pic-veneer" "" {arm-pic-veneer.s} {{objdump -d arm-pic-veneer.d}} "arm-pic-veneer"} + {"Preempt Thumb symbol" "tmpdir/mixed-lib.so -T arm-dyn.ld --use-blx" "" + {preempt-app.s} + {{readelf -Ds preempt-app.sym}} + "preempt-app"} } run_ld_link_tests $armelftests diff --git a/ld/testsuite/ld-arm/preempt-app.s b/ld/testsuite/ld-arm/preempt-app.s new file mode 100644 index 0000000..f1eccc2 --- /dev/null +++ b/ld/testsuite/ld-arm/preempt-app.s @@ -0,0 +1,27 @@ + @ 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 diff --git a/ld/testsuite/ld-arm/preempt-app.sym b/ld/testsuite/ld-arm/preempt-app.sym new file mode 100644 index 0000000..d8ebf3b --- /dev/null +++ b/ld/testsuite/ld-arm/preempt-app.sym @@ -0,0 +1,16 @@ + +Symbol table for image: + Num Buc: Value Size Type Bind Vis Ndx Name + .. ..: ........ 0 NOTYPE GLOBAL DEFAULT ABS _edata + .. ..: ........ 0 NOTYPE GLOBAL DEFAULT ABS __bss_start__ + .. ..: ........ 0 NOTYPE GLOBAL DEFAULT ABS _end + .. ..: ........ 4 OBJECT GLOBAL DEFAULT 10 data_obj + .. ..: ........ 0 NOTYPE GLOBAL DEFAULT ABS __bss_end__ + .. ..: .......1 20 FUNC GLOBAL DEFAULT 6 lib_func1 + .. ..: ........ 0 NOTYPE GLOBAL DEFAULT ABS __exidx_start + .. ..: ........ 0 NOTYPE GLOBAL DEFAULT 9 __data_start + .. ..: ........ 0 NOTYPE GLOBAL DEFAULT ABS __end__ + .. ..: ........ 0 NOTYPE GLOBAL DEFAULT ABS __bss_start + .. ..: .......0 0 FUNC GLOBAL DEFAULT 6 app_func2 + .. ..: ........ 0 NOTYPE GLOBAL DEFAULT ABS _bss_end__ + .. ..: ........ 0 NOTYPE GLOBAL DEFAULT ABS __exidx_end |