2004-01-06 21:47:38 +00:00
|
|
|
# Expect script for various ARM ELF tests.
|
2009-09-02 07:25:43 +00:00
|
|
|
# Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
|
|
|
# Free Software Foundation, Inc.
|
2004-01-06 21:47:38 +00:00
|
|
|
#
|
2007-07-06 14:09:45 +00:00
|
|
|
# This file is part of the GNU Binutils.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
2004-01-06 21:47:38 +00:00
|
|
|
# it under the terms of the GNU General Public License as published by
|
2007-07-06 14:09:45 +00:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
2004-01-06 21:47:38 +00:00
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
2007-07-06 14:09:45 +00:00
|
|
|
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
|
|
|
# MA 02110-1301, USA.
|
2004-01-06 21:47:38 +00:00
|
|
|
#
|
|
|
|
|
bfd/
* configure.in (bfd_elf32_bigarm_vec): Include elf-vxworks.lo.
(bfd_elf32_bigarm_symbian_vec): Likewise.
(bfd_elf32_bigarm_vxworks_vec): Likewise.
(bfd_elf32_littlearm_vec): Likewise.
(bfd_elf32_littlearm_symbian_vec): Likewise.
(bfd_elf32_littlearm_vxworks_vec): Likewise.
* configure: Regenerate.
* elf32-arm.c: Include libiberty.h and elf-vxworks.h.
(RELOC_SECTION, RELOC_SIZE, SWAP_RELOC_IN, SWAP_RELOC_OUT): New macros.
(elf32_arm_vxworks_bed): Add forward declaration.
(elf32_arm_howto_table_1): Fix the masks for R_ASM_ABS12.
(elf32_arm_vxworks_exec_plt0_entry): New table.
(elf32_arm_vxworks_exec_plt_entry): Likewise.
(elf32_arm_vxworks_shared_plt_entry): Likewise.
(elf32_arm_link_hash_table): Add vxworks_p and srelplt2 fields.
(reloc_section_p): New function.
(create_got_section): Use RELOC_SECTION.
(elf32_arm_create_dynamic_sections): Likewise. Call
elf_vxworks_create_dynamic_sections for VxWorks targets.
Choose between the two possible values of plt_header_size
and plt_entry_size.
(elf32_arm_link_hash_table_create): Initialize vxworks_p and srelplt2.
(elf32_arm_abs12_reloc): New function.
(elf32_arm_final_link_relocate): Call it. Allow the creation of
dynamic R_ARM_ABS12 relocs on VxWorks. Use reloc_section_p,
RELOC_SIZE, SWAP_RELOC_OUT and RELOC_SECTION. Initialize the
r_addend fields of relocs. On rela targets, skip any code that
adjusts in-place addends. When using _bfd_link_final_relocate
to perform a final relocation, pass rel->r_addend as the addend
argument.
(elf32_arm_merge_private_bfd_data): If one of the bfds is a VxWorks
object, ignore flags that are not standard on VxWorks.
(elf32_arm_check_relocs): Allow the creation of dynamic R_ARM_ABS12
relocs on VxWorks. Use reloc_section_p.
(elf32_arm_adjust_dynamic_symbol): Use RELOC_SECTION and RELOC_SIZE.
(allocate_dynrelocs): Use RELOC_SIZE. Account for the size of
.rela.plt.unloaded relocs on VxWorks targets.
(elf32_arm_size_dynamic_sections): Use RELOC_SIZE. Check for
.rela.plt.unloaded as well as .rel(a).plt. Add DT_RELA* tags
instead of DT_REL* tags on RELA targets.
(elf32_arm_finish_dynamic_symbol): Use RELOC_SECTION, RELOC_SIZE
and SWAP_RELOC_OUT. Initialize r_addend fields. Handle VxWorks
PLT entries. Do not make _GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
(elf32_arm_finish_dynamic_sections): Use RELOC_SECTION, RELOC_SIZE
and SWAP_RELOC_OUT. Initialize r_addend fields. Handle DT_RELASZ
like DT_RELSZ. Handle the VxWorks form of initial PLT entry.
Correct the .rela.plt.unreloaded symbol indexes.
(elf32_arm_output_symbol_hook): Call the VxWorks version of this
hook on VxWorks targets.
(elf32_arm_vxworks_link_hash_table_create): Set vxworks_p to true.
Minor formatting tweak.
(elf32_arm_vxworks_final_write_processing): New function.
(elf_backend_add_symbol_hook): Override for VxWorks and reset
for Symbian.
(elf_backend_final_write_processing): Likewise.
(elf_backend_emit_relocs): Likewise.
(elf_backend_want_plt_sym): Likewise.
(ELF_MAXPAGESIZE): Likewise.
(elf_backend_may_use_rel_p): Minor formatting tweak.
(elf_backend_may_use_rela_p): Likewise.
(elf_backend_default_use_rela_p): Likewise.
(elf_backend_rela_normal): Likewise.
* Makefile.in (elf32-arm.lo): Depend on elf-vxworks.h.
gas/
* config/tc-arm.c (md_apply_fix): Install a value of zero into a
BFD_RELOC_ARM_OFFSET_IMM field if we're going to generate a RELA
R_ARM_ABS12 reloc.
(tc_gen_reloc): Keep the original fx_offset for RELA pc-relative
relocs, but adjust by md_pcrel_from_section. Create R_ARM_ABS12
relocations for BFD_RELOC_ARM_OFFSET_IMM on RELA targets.
gas/testsuite/
* gas/arm/abs12.s, gas/arm/abs12.d: New test.
* gas/arm/pic.d: Skip for *-*-vxworks*...
* gas/arm/pic_vxworks.d: ...use this version instead.
* gas/arm/unwind_vxworks.d: Fix expected output.
ld/
* emulparams/armelf_vxworks.sh: Include vxworks.sh.
(MAXPAGESIZE): Define.
* emulparams/vxworks.sh: Undefine.
* Makefile.am (earmelf_vxworks.c): Depend on vxworks.sh and vxworks.em.
* Makefile.in: Regenerate.
ld/testsuite/
* ld-arm/vxworks1.dd, ld-arm/vxworks1.ld, ld-arm/vxworks1-lib.dd,
* ld-arm/vxworks1-lib.nd, ld-arm/vxworks1-lib.rd,
* ld-arm/vxworks1-lib.s, ld-arm/vxworks1.rd, ld-arm/vxworks1.s,
* ld-arm/vxworks1-static.d, ld-arm/vxworks2.s, ld-arm/vxworks2.sd,
* ld-arm/vxworks2-static.sd: New tests.
* ld-arm/arm-elf.exp: Run them.
2006-03-07 08:39:21 +00:00
|
|
|
if {[istarget "arm-*-vxworks"]} {
|
|
|
|
set armvxworkstests {
|
|
|
|
{"VxWorks shared library test 1" "-shared -Tvxworks1.ld"
|
|
|
|
"" {vxworks1-lib.s}
|
|
|
|
{{readelf --relocs vxworks1-lib.rd} {objdump -dr vxworks1-lib.dd}
|
2007-05-15 12:22:34 +00:00
|
|
|
{readelf --symbols vxworks1-lib.nd} {readelf -d vxworks1-lib.td}}
|
bfd/
* configure.in (bfd_elf32_bigarm_vec): Include elf-vxworks.lo.
(bfd_elf32_bigarm_symbian_vec): Likewise.
(bfd_elf32_bigarm_vxworks_vec): Likewise.
(bfd_elf32_littlearm_vec): Likewise.
(bfd_elf32_littlearm_symbian_vec): Likewise.
(bfd_elf32_littlearm_vxworks_vec): Likewise.
* configure: Regenerate.
* elf32-arm.c: Include libiberty.h and elf-vxworks.h.
(RELOC_SECTION, RELOC_SIZE, SWAP_RELOC_IN, SWAP_RELOC_OUT): New macros.
(elf32_arm_vxworks_bed): Add forward declaration.
(elf32_arm_howto_table_1): Fix the masks for R_ASM_ABS12.
(elf32_arm_vxworks_exec_plt0_entry): New table.
(elf32_arm_vxworks_exec_plt_entry): Likewise.
(elf32_arm_vxworks_shared_plt_entry): Likewise.
(elf32_arm_link_hash_table): Add vxworks_p and srelplt2 fields.
(reloc_section_p): New function.
(create_got_section): Use RELOC_SECTION.
(elf32_arm_create_dynamic_sections): Likewise. Call
elf_vxworks_create_dynamic_sections for VxWorks targets.
Choose between the two possible values of plt_header_size
and plt_entry_size.
(elf32_arm_link_hash_table_create): Initialize vxworks_p and srelplt2.
(elf32_arm_abs12_reloc): New function.
(elf32_arm_final_link_relocate): Call it. Allow the creation of
dynamic R_ARM_ABS12 relocs on VxWorks. Use reloc_section_p,
RELOC_SIZE, SWAP_RELOC_OUT and RELOC_SECTION. Initialize the
r_addend fields of relocs. On rela targets, skip any code that
adjusts in-place addends. When using _bfd_link_final_relocate
to perform a final relocation, pass rel->r_addend as the addend
argument.
(elf32_arm_merge_private_bfd_data): If one of the bfds is a VxWorks
object, ignore flags that are not standard on VxWorks.
(elf32_arm_check_relocs): Allow the creation of dynamic R_ARM_ABS12
relocs on VxWorks. Use reloc_section_p.
(elf32_arm_adjust_dynamic_symbol): Use RELOC_SECTION and RELOC_SIZE.
(allocate_dynrelocs): Use RELOC_SIZE. Account for the size of
.rela.plt.unloaded relocs on VxWorks targets.
(elf32_arm_size_dynamic_sections): Use RELOC_SIZE. Check for
.rela.plt.unloaded as well as .rel(a).plt. Add DT_RELA* tags
instead of DT_REL* tags on RELA targets.
(elf32_arm_finish_dynamic_symbol): Use RELOC_SECTION, RELOC_SIZE
and SWAP_RELOC_OUT. Initialize r_addend fields. Handle VxWorks
PLT entries. Do not make _GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
(elf32_arm_finish_dynamic_sections): Use RELOC_SECTION, RELOC_SIZE
and SWAP_RELOC_OUT. Initialize r_addend fields. Handle DT_RELASZ
like DT_RELSZ. Handle the VxWorks form of initial PLT entry.
Correct the .rela.plt.unreloaded symbol indexes.
(elf32_arm_output_symbol_hook): Call the VxWorks version of this
hook on VxWorks targets.
(elf32_arm_vxworks_link_hash_table_create): Set vxworks_p to true.
Minor formatting tweak.
(elf32_arm_vxworks_final_write_processing): New function.
(elf_backend_add_symbol_hook): Override for VxWorks and reset
for Symbian.
(elf_backend_final_write_processing): Likewise.
(elf_backend_emit_relocs): Likewise.
(elf_backend_want_plt_sym): Likewise.
(ELF_MAXPAGESIZE): Likewise.
(elf_backend_may_use_rel_p): Minor formatting tweak.
(elf_backend_may_use_rela_p): Likewise.
(elf_backend_default_use_rela_p): Likewise.
(elf_backend_rela_normal): Likewise.
* Makefile.in (elf32-arm.lo): Depend on elf-vxworks.h.
gas/
* config/tc-arm.c (md_apply_fix): Install a value of zero into a
BFD_RELOC_ARM_OFFSET_IMM field if we're going to generate a RELA
R_ARM_ABS12 reloc.
(tc_gen_reloc): Keep the original fx_offset for RELA pc-relative
relocs, but adjust by md_pcrel_from_section. Create R_ARM_ABS12
relocations for BFD_RELOC_ARM_OFFSET_IMM on RELA targets.
gas/testsuite/
* gas/arm/abs12.s, gas/arm/abs12.d: New test.
* gas/arm/pic.d: Skip for *-*-vxworks*...
* gas/arm/pic_vxworks.d: ...use this version instead.
* gas/arm/unwind_vxworks.d: Fix expected output.
ld/
* emulparams/armelf_vxworks.sh: Include vxworks.sh.
(MAXPAGESIZE): Define.
* emulparams/vxworks.sh: Undefine.
* Makefile.am (earmelf_vxworks.c): Depend on vxworks.sh and vxworks.em.
* Makefile.in: Regenerate.
ld/testsuite/
* ld-arm/vxworks1.dd, ld-arm/vxworks1.ld, ld-arm/vxworks1-lib.dd,
* ld-arm/vxworks1-lib.nd, ld-arm/vxworks1-lib.rd,
* ld-arm/vxworks1-lib.s, ld-arm/vxworks1.rd, ld-arm/vxworks1.s,
* ld-arm/vxworks1-static.d, ld-arm/vxworks2.s, ld-arm/vxworks2.sd,
* ld-arm/vxworks2-static.sd: New tests.
* ld-arm/arm-elf.exp: Run them.
2006-03-07 08:39:21 +00:00
|
|
|
"libvxworks1.so"}
|
|
|
|
{"VxWorks executable test 1 (dynamic)" \
|
|
|
|
"tmpdir/libvxworks1.so -Tvxworks1.ld -q --force-dynamic"
|
|
|
|
"" {vxworks1.s}
|
|
|
|
{{readelf --relocs vxworks1.rd} {objdump -dr vxworks1.dd}}
|
|
|
|
"vxworks1"}
|
|
|
|
{"VxWorks executable test 2 (dynamic)" \
|
|
|
|
"-Tvxworks1.ld -q --force-dynamic"
|
|
|
|
"" {vxworks2.s}
|
|
|
|
{{readelf --segments vxworks2.sd}}
|
|
|
|
"vxworks2"}
|
|
|
|
{"VxWorks executable test 2 (static)"
|
|
|
|
"-Tvxworks1.ld"
|
|
|
|
"" {vxworks2.s}
|
|
|
|
{{readelf --segments vxworks2-static.sd}}
|
|
|
|
"vxworks2"}
|
|
|
|
}
|
|
|
|
run_ld_link_tests $armvxworkstests
|
|
|
|
run_dump_test "vxworks1-static"
|
2007-05-21 06:36:01 +00:00
|
|
|
run_dump_test "emit-relocs1-vxworks"
|
bfd/
* configure.in (bfd_elf32_bigarm_vec): Include elf-vxworks.lo.
(bfd_elf32_bigarm_symbian_vec): Likewise.
(bfd_elf32_bigarm_vxworks_vec): Likewise.
(bfd_elf32_littlearm_vec): Likewise.
(bfd_elf32_littlearm_symbian_vec): Likewise.
(bfd_elf32_littlearm_vxworks_vec): Likewise.
* configure: Regenerate.
* elf32-arm.c: Include libiberty.h and elf-vxworks.h.
(RELOC_SECTION, RELOC_SIZE, SWAP_RELOC_IN, SWAP_RELOC_OUT): New macros.
(elf32_arm_vxworks_bed): Add forward declaration.
(elf32_arm_howto_table_1): Fix the masks for R_ASM_ABS12.
(elf32_arm_vxworks_exec_plt0_entry): New table.
(elf32_arm_vxworks_exec_plt_entry): Likewise.
(elf32_arm_vxworks_shared_plt_entry): Likewise.
(elf32_arm_link_hash_table): Add vxworks_p and srelplt2 fields.
(reloc_section_p): New function.
(create_got_section): Use RELOC_SECTION.
(elf32_arm_create_dynamic_sections): Likewise. Call
elf_vxworks_create_dynamic_sections for VxWorks targets.
Choose between the two possible values of plt_header_size
and plt_entry_size.
(elf32_arm_link_hash_table_create): Initialize vxworks_p and srelplt2.
(elf32_arm_abs12_reloc): New function.
(elf32_arm_final_link_relocate): Call it. Allow the creation of
dynamic R_ARM_ABS12 relocs on VxWorks. Use reloc_section_p,
RELOC_SIZE, SWAP_RELOC_OUT and RELOC_SECTION. Initialize the
r_addend fields of relocs. On rela targets, skip any code that
adjusts in-place addends. When using _bfd_link_final_relocate
to perform a final relocation, pass rel->r_addend as the addend
argument.
(elf32_arm_merge_private_bfd_data): If one of the bfds is a VxWorks
object, ignore flags that are not standard on VxWorks.
(elf32_arm_check_relocs): Allow the creation of dynamic R_ARM_ABS12
relocs on VxWorks. Use reloc_section_p.
(elf32_arm_adjust_dynamic_symbol): Use RELOC_SECTION and RELOC_SIZE.
(allocate_dynrelocs): Use RELOC_SIZE. Account for the size of
.rela.plt.unloaded relocs on VxWorks targets.
(elf32_arm_size_dynamic_sections): Use RELOC_SIZE. Check for
.rela.plt.unloaded as well as .rel(a).plt. Add DT_RELA* tags
instead of DT_REL* tags on RELA targets.
(elf32_arm_finish_dynamic_symbol): Use RELOC_SECTION, RELOC_SIZE
and SWAP_RELOC_OUT. Initialize r_addend fields. Handle VxWorks
PLT entries. Do not make _GLOBAL_OFFSET_TABLE_ absolute on VxWorks.
(elf32_arm_finish_dynamic_sections): Use RELOC_SECTION, RELOC_SIZE
and SWAP_RELOC_OUT. Initialize r_addend fields. Handle DT_RELASZ
like DT_RELSZ. Handle the VxWorks form of initial PLT entry.
Correct the .rela.plt.unreloaded symbol indexes.
(elf32_arm_output_symbol_hook): Call the VxWorks version of this
hook on VxWorks targets.
(elf32_arm_vxworks_link_hash_table_create): Set vxworks_p to true.
Minor formatting tweak.
(elf32_arm_vxworks_final_write_processing): New function.
(elf_backend_add_symbol_hook): Override for VxWorks and reset
for Symbian.
(elf_backend_final_write_processing): Likewise.
(elf_backend_emit_relocs): Likewise.
(elf_backend_want_plt_sym): Likewise.
(ELF_MAXPAGESIZE): Likewise.
(elf_backend_may_use_rel_p): Minor formatting tweak.
(elf_backend_may_use_rela_p): Likewise.
(elf_backend_default_use_rela_p): Likewise.
(elf_backend_rela_normal): Likewise.
* Makefile.in (elf32-arm.lo): Depend on elf-vxworks.h.
gas/
* config/tc-arm.c (md_apply_fix): Install a value of zero into a
BFD_RELOC_ARM_OFFSET_IMM field if we're going to generate a RELA
R_ARM_ABS12 reloc.
(tc_gen_reloc): Keep the original fx_offset for RELA pc-relative
relocs, but adjust by md_pcrel_from_section. Create R_ARM_ABS12
relocations for BFD_RELOC_ARM_OFFSET_IMM on RELA targets.
gas/testsuite/
* gas/arm/abs12.s, gas/arm/abs12.d: New test.
* gas/arm/pic.d: Skip for *-*-vxworks*...
* gas/arm/pic_vxworks.d: ...use this version instead.
* gas/arm/unwind_vxworks.d: Fix expected output.
ld/
* emulparams/armelf_vxworks.sh: Include vxworks.sh.
(MAXPAGESIZE): Define.
* emulparams/vxworks.sh: Undefine.
* Makefile.am (earmelf_vxworks.c): Depend on vxworks.sh and vxworks.em.
* Makefile.in: Regenerate.
ld/testsuite/
* ld-arm/vxworks1.dd, ld-arm/vxworks1.ld, ld-arm/vxworks1-lib.dd,
* ld-arm/vxworks1-lib.nd, ld-arm/vxworks1-lib.rd,
* ld-arm/vxworks1-lib.s, ld-arm/vxworks1.rd, ld-arm/vxworks1.s,
* ld-arm/vxworks1-static.d, ld-arm/vxworks2.s, ld-arm/vxworks2.sd,
* ld-arm/vxworks2-static.sd: New tests.
* ld-arm/arm-elf.exp: Run them.
2006-03-07 08:39:21 +00:00
|
|
|
}
|
|
|
|
|
2008-04-29 11:53:45 +00:00
|
|
|
if { [istarget "arm*-*-symbianelf*"] } {
|
|
|
|
run_dump_test "symbian-seg1"
|
|
|
|
}
|
|
|
|
|
2004-01-06 21:47:38 +00:00
|
|
|
# Exclude non-ARM-ELF targets.
|
|
|
|
|
|
|
|
if { ![is_elf_format] || ![istarget "arm*-*-*"] } {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2009-12-28 18:55:16 +00:00
|
|
|
# List contains test-items with 3 items followed by 2 lists and one more item:
|
2004-01-06 21:47:38 +00:00
|
|
|
# 0:name 1:ld options 2:assembler options
|
|
|
|
# 3:filenames of assembler files 4: action and options. 5: name of output file
|
|
|
|
|
|
|
|
# Actions:
|
|
|
|
# objdump: Apply objdump options on result. Compare with regex (last arg).
|
|
|
|
# nm: Apply nm options on result. Compare with regex (last arg).
|
|
|
|
# readelf: Apply readelf options on result. Compare with regex (last arg).
|
|
|
|
|
|
|
|
set armelftests {
|
* include/elf/arm.h: Correct names of R_ARM_LDC_G{0,1,2}
to R_ARM_LDC_SB_G{0,1,2} respectively.
bfd/
* bfd-in2.h: Regenerate.
* elf32-arm.c (R_ARM_ALU_PC_G0_NC, R_ARM_ALU_PC_G0,
R_ARM_ALU_PC_G1_NC, R_ARM_ALU_PC_G1, R_ARM_ALU_PC_G2,
R_ARM_LDR_PC_G1, R_ARM_LDR_PC_G2, R_ARM_LDRS_PC_G0,
R_ARM_LDRS_PC_G1, R_ARM_LDRS_PC_G2, R_ARM_LDC_PC_G0,
R_ARM_LDC_PC_G1, R_ARM_LDC_PC_G2, R_ARM_ALU_SB_G0_NC,
R_ARM_ALU_SB_G0, R_ARM_ALU_SB_G1_NC, R_ARM_ALU_SB_G1,
R_ARM_ALU_SB_G2, R_ARM_LDR_SB_G0, R_ARM_LDR_SB_G1,
R_ARM_LDR_SB_G2, R_ARM_LDRS_SB_G0, R_ARM_LDRS_SB_G1,
R_ARM_LDRS_SB_G2, R_ARM_LDC_SB_G0, R_ARM_LDC_SB_G1,
R_ARM_LDC_SB_G2): New relocation types.
(R_ARM_PC13): Rename to AAELF name R_ARM_LDR_PC_G0 and
adjust HOWTO entry to be consistent with R_ARM_LDR_PC_G1
and friends.
(elf32_arm_howto_table_3): Delete; contents merged into
elf32_arm_howto_table_2.
(elf32_arm_howto_from_type): Adjust correspondingly.
(elf32_arm_reloc_map): Extend with the above relocations.
(calculate_group_reloc_mask): New function.
(identify_add_or_sub): New function.
(elf32_arm_final_link_relocate): Support for the above
relocations.
* reloc.c: Add enumeration entries for BFD_RELOC_ARM_...
codes to correspond to the above relocations.
gas/
* config/tc-arm.c (enum parse_operand_result): New.
(struct group_reloc_table_entry): New.
(enum group_reloc_type): New.
(group_reloc_table): New array.
(find_group_reloc_table_entry): New function.
(parse_shifter_operand_group_reloc): New function.
(parse_address_main): New function, incorporating code
from the old parse_address function. To be used via...
(parse_address): wrapper for parse_address_main; and
(parse_address_group_reloc): new function, likewise.
(enum operand_parse_code): New codes OP_SHG, OP_ADDRGLDR,
OP_ADDRGLDRS, OP_ADDRGLDC.
(parse_operands): Support for these new operand codes.
New macro po_misc_or_fail_no_backtrack.
(encode_arm_cp_address): Preserve group relocations.
(insns): Modify to use the above operand codes where group
relocations are permitted.
(md_apply_fix): Handle the group relocations
ALU_PC_G0_NC through LDC_SB_G2.
(tc_gen_reloc): Likewise.
(arm_force_relocation): Leave group relocations for the linker.
(arm_fix_adjustable): Likewise.
gas/testsuite/
* gas/arm/group-reloc-alu.d: New test.
* gas/arm/group-reloc-alu-encoding-bad.d: New test.
* gas/arm/group-reloc-alu-encoding-bad.l: New test.
* gas/arm/group-reloc-alu-encoding-bad.s: New test.
* gas/arm/group-reloc-alu-parsing-bad.d: New test.
* gas/arm/group-reloc-alu-parsing-bad.l: New test.
* gas/arm/group-reloc-alu-parsing-bad.s: New test.
* gas/arm/group-reloc-alu.s: New test.
* gas/arm/group-reloc-ldc.d: New test.
* gas/arm/group-reloc-ldc-encoding-bad.d: New test.
* gas/arm/group-reloc-ldc-encoding-bad.l: New test.
* gas/arm/group-reloc-ldc-encoding-bad.s: New test.
* gas/arm/group-reloc-ldc-parsing-bad.d: New test.
* gas/arm/group-reloc-ldc-parsing-bad.l: New test.
* gas/arm/group-reloc-ldc-parsing-bad.s: New test.
* gas/arm/group-reloc-ldc.s: New test.
* gas/arm/group-reloc-ldr.d: New test.
* gas/arm/group-reloc-ldr-encoding-bad.d: New test.
* gas/arm/group-reloc-ldr-encoding-bad.l: New test.
* gas/arm/group-reloc-ldr-encoding-bad.s: New test.
* gas/arm/group-reloc-ldr-parsing-bad.d: New test.
* gas/arm/group-reloc-ldr-parsing-bad.l: New test.
* gas/arm/group-reloc-ldr-parsing-bad.s: New test.
* gas/arm/group-reloc-ldr.s: New test.
* gas/arm/group-reloc-ldrs.d: New test.
* gas/arm/group-reloc-ldrs-encoding-bad.d: New test.
* gas/arm/group-reloc-ldrs-encoding-bad.l: New test.
* gas/arm/group-reloc-ldrs-encoding-bad.s: New test.
* gas/arm/group-reloc-ldrs-parsing-bad.d: New test.
* gas/arm/group-reloc-ldrs-parsing-bad.l: New test.
* gas/arm/group-reloc-ldrs-parsing-bad.s: New test.
* gas/arm/group-reloc-ldrs.s: New test.
ld/testsuite/
* ld-arm/group-relocs-alu-bad.d: New test.
* ld-arm/group-relocs-alu-bad.s: New test.
* ld-arm/group-relocs.d: New test.
* ld-arm/group-relocs-ldc-bad.d: New test.
* ld-arm/group-relocs-ldc-bad.s: New test.
* ld-arm/group-relocs-ldr-bad.d: New test.
* ld-arm/group-relocs-ldr-bad.s: New test.
* ld-arm/group-relocs-ldrs-bad.d: New test.
* ld-arm/group-relocs-ldrs-bad.s: New test.
* ld-arm/group-relocs.s: New test.
* ld-arm/arm-elf.exp: Wire in new tests.
2006-06-15 11:03:02 +00:00
|
|
|
{"Group relocations" "-Ttext 0x8000 --section-start zero=0x0 --section-start alpha=0xeef0 --section-start beta=0xffeef0" "" {group-relocs.s}
|
|
|
|
{{objdump -Dr group-relocs.d}}
|
|
|
|
"group-relocs"}
|
2006-10-17 15:46:21 +00:00
|
|
|
{"Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x401000" "" {thumb1-bl.s}
|
|
|
|
{{objdump -dr thumb1-bl.d}}
|
|
|
|
"thumb1-bl"}
|
2004-01-06 21:47:38 +00:00
|
|
|
{"Simple non-PIC shared library" "-shared" "" {arm-lib.s}
|
|
|
|
{{objdump -fdw arm-lib.d} {objdump -Rw arm-lib.r}}
|
|
|
|
"arm-lib.so"}
|
|
|
|
{"Simple PIC shared library" "-shared" "" {arm-lib-plt32.s}
|
|
|
|
{{objdump -fdw arm-lib-plt32.d} {objdump -Rw arm-lib-plt32.r}}
|
|
|
|
"arm-lib-plt32.so"}
|
|
|
|
{"Simple dynamic application" "tmpdir/arm-lib.so" "" {arm-app.s}
|
|
|
|
{{objdump -fdw arm-app.d} {objdump -Rw arm-app.r}}
|
|
|
|
"arm-app"}
|
2004-01-13 21:09:18 +00:00
|
|
|
{"Simple static application" "" "" {arm-static-app.s}
|
|
|
|
{{objdump -fdw arm-static-app.d} {objdump -rw arm-static-app.r}}
|
|
|
|
"arm-static-app"}
|
2004-01-23 16:51:39 +00:00
|
|
|
{"Non-pcrel function reference" "tmpdir/arm-lib.so" "" {arm-app-abs32.s}
|
|
|
|
{{objdump -fdw arm-app-abs32.d} {objdump -Rw arm-app-abs32.r}}
|
|
|
|
"arm-app-abs32"}
|
2007-02-28 17:14:39 +00:00
|
|
|
{"Thumb shared library with ARM entry points" "-shared -T arm-lib.ld" "-mthumb-interwork"
|
2006-08-18 15:00:18 +00:00
|
|
|
{mixed-lib.s}
|
|
|
|
{{objdump -fdw armthumb-lib.d} {readelf -Ds armthumb-lib.sym}}
|
|
|
|
"armthumb-lib.so"}
|
|
|
|
{"Mixed ARM/Thumb shared library" "-shared -T arm-lib.ld -use-blx" ""
|
bfd/
* elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
(elf32_arm_plt_thumb_stub): New.
(struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
and plt_got_offset.
(elf32_arm_link_hash_traverse): Fix typo.
(elf32_arm_link_hash_table): Add obfd.
(elf32_arm_link_hash_newfunc): Initialize new fields.
(elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
(elf32_arm_link_hash_table_create): Initialize obfd.
(record_arm_to_thumb_glue): Mark the glue as a local ARM function.
(record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
(bfd_elf32_arm_get_bfd_for_interworking): Verify that the
interworking BFD is not dynamic.
(bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
not emit glue for PLT references.
(elf32_arm_final_link_relocate): Handle Thumb functions. Do not
emit glue for PLT references. Support the Thumb PLT prefix.
(elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
plt_thumb_refcount.
(elf32_arm_check_relocs): Likewise.
(elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
plt_thumb_refcount.
(allocate_dynrelocs): Handle Thumb PLT references.
(elf32_arm_finish_dynamic_symbol): Likewise.
(elf32_arm_symbol_processing): New function.
(elf_backend_symbol_processing): Define.
opcodes/
* arm-dis.c (WORD_ADDRESS): Define.
(print_insn): Use it. Correct big-endian end-of-section handling.
gas/testsuite/
* gas/arm/mapping.d: Expect F markers for Thumb code.
* gas/arm/unwind.d: Update big-endian pattern.
ld/
* emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Don't use
a dynamic object for stubs.
ld/testsuite/
* ld-arm/mixed-app.d, ld-arm/mixed-app.r, ld-arm/mixed-app.s,
ld-arm/mixed-app.sym, ld-arm/mixed-lib.d, ld-arm/mixed-lib.r,
ld-arm/mixed-lib.s, ld-arm/mixed-lib.sym, ld-arm/arm-dyn.ld,
ld-arm/arm-lib.ld: New files.
* ld-arm/arm-app-abs32.d, ld-arm/arm-app-abs32.r, ld-arm/arm-app.d,
ld-arm/arm-app.r, ld-arm/arm-lib-plt32.d, ld-arm/arm-lib-plt32.r,
ld-arm/arm-lib.d, ld-arm/arm-lib.r, ld-arm/arm-static-app.d,
ld-arm/arm-static-app.r: Update for big-endian.
* ld-arm/arm-elf.exp: Run the new tests.
2004-11-17 17:50:28 +00:00
|
|
|
{mixed-lib.s}
|
|
|
|
{{objdump -fdw mixed-lib.d} {objdump -Rw mixed-lib.r}
|
|
|
|
{readelf -Ds mixed-lib.sym}}
|
|
|
|
"mixed-lib.so"}
|
|
|
|
{"Mixed ARM/Thumb dynamic application" "tmpdir/mixed-lib.so -T arm-dyn.ld" ""
|
|
|
|
{mixed-app.s}
|
|
|
|
{{objdump -fdw mixed-app.d} {objdump -Rw mixed-app.r}
|
|
|
|
{readelf -Ds mixed-app.sym}}
|
|
|
|
"mixed-app"}
|
2005-12-12 17:03:40 +00:00
|
|
|
{"Mixed ARM/Thumb arch5 dynamic application" "tmpdir/mixed-lib.so -T arm-dyn.ld --use-blx" ""
|
|
|
|
{mixed-app.s}
|
|
|
|
{{objdump -fdw mixed-app-v5.d} {objdump -Rw mixed-app.r}
|
|
|
|
{readelf -Ds mixed-app.sym}}
|
|
|
|
"mixed-app-v5"}
|
2004-09-17 12:18:19 +00:00
|
|
|
{"target1-abs" "-static --target1-abs -T arm.ld" "" {arm-target1.s}
|
|
|
|
{{objdump -s arm-target1-abs.d}}
|
|
|
|
"arm-target1-abs"}
|
|
|
|
{"target1-rel" "-static --target1-rel -T arm.ld" "" {arm-target1.s}
|
|
|
|
{{objdump -s arm-target1-rel.d}}
|
|
|
|
"arm-target1-rel"}
|
|
|
|
{"target2-rel" "-static --target2=rel -T arm.ld" "" {arm-target2.s}
|
|
|
|
{{objdump -s arm-target2-rel.d}}
|
|
|
|
"arm-target2-rel"}
|
2004-09-30 17:03:53 +00:00
|
|
|
{"target2-abs" "-static --target2=abs -T arm.ld" "" {arm-target2.s}
|
|
|
|
{{objdump -s arm-target2-abs.d}}
|
|
|
|
"arm-target2-abs"}
|
2004-09-17 12:18:19 +00:00
|
|
|
{"target2-got-rel" "-static --target2=got-rel -T arm.ld" "" {arm-target2.s}
|
|
|
|
{{objdump -s arm-target2-got-rel.d}}
|
|
|
|
"arm-target2-got-rel"}
|
|
|
|
{"arm-rel31" "-static -T arm.ld" "" {arm-rel31.s}
|
|
|
|
{{objdump -s arm-rel31.d}}
|
|
|
|
"arm-rel31"}
|
2005-12-12 17:03:40 +00:00
|
|
|
{"arm-call" "-static -T arm.ld" "-meabi=4" {arm-call1.s arm-call2.s}
|
|
|
|
{{objdump -d arm-call.d}}
|
|
|
|
"arm-call"}
|
bfd/
* bfd-in2.h, libbfd.h: Regenerated.
* reloc.c: Add ARM TLS relocations.
* elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
relocations.
(elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
(elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
(elf32_arm_tls_ie32_howto): New.
(elf32_arm_howto_from_type): Support TLS relocations.
(elf32_arm_reloc_map): Likewise.
(elf32_arm_reloc_type_lookup): Likewise.
(TCB_SIZE): Define.
(struct elf32_arm_obj_tdata): New.
(elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
(elf32_arm_mkobject): New function.
(struct elf32_arm_relocs_copied): Add pc_count.
(elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
(GOT_TLS_IE): Define.
(struct elf32_arm_link_hash_table): Add tls_ldm_got.
(elf32_arm_link_hash_newfunc): Initialize tls_type.
(elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
(elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
(dtpoff_base, tpoff): New functions.
(elf32_arm_final_link_relocate): Handle TLS relocations.
(IS_ARM_TLS_RELOC): Define.
(elf32_arm_relocate_section): Warn about TLS mismatches.
(elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
(elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
TLS relocations and pc_count.
(elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
(allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
calls.
(elf32_arm_size_dynamic_sections): Handle TLS.
(elf32_arm_finish_dynamic_symbol): Likewise.
(bfd_elf32_mkobject): Define.
gas/
* config/tc-arm.c (arm_parse_reloc): Add TLS relocations.
(md_apply_fix3): Mark TLS symbols.
(tc_gen_reloc): Handle TLS relocations.
(arm_fix_adjustable): Ignore TLS relocations.
(s_arm_elf_cons): Support expressions after decorated symbols.
gas/testuite/
* gas/arm/tls.s, gas/arm/tls.d: New files.
* gas/arm/arm.exp: Run TLS test.
include/elf/
* arm.h: Add TLS relocations.
ld/testsuite/
* ld-arm/tls-lib.s, ld-arm/tls-lib.d, ld-arm/tls-lib.r,
ld-arm/tls-app.s, ld-arm/tls-app.d, ld-arm/tls-app.r: New files.
* ld-arm/arm-lib.ld, ld-arm/arm-dyn.ld: Increase data segment
alignment.
* ld-arm/arm-elf.exp: Run TLS tests.
2005-03-29 16:54:22 +00:00
|
|
|
{"TLS shared library" "-shared -T arm-lib.ld" "" {tls-lib.s}
|
|
|
|
{{objdump -fdw tls-lib.d} {objdump -Rw tls-lib.r}}
|
|
|
|
"tls-lib.so"}
|
|
|
|
{"TLS dynamic application" "-T arm-dyn.ld tmpdir/tls-lib.so" "" {tls-app.s}
|
|
|
|
{{objdump -fdw tls-app.d} {objdump -Rw tls-app.r}}
|
|
|
|
"tls-app"}
|
2006-02-07 03:50:20 +00:00
|
|
|
{"Thumb entry point" "-T arm.ld" "" {thumb-entry.s}
|
|
|
|
{{readelf -h thumb-entry.d}}
|
|
|
|
"thumb-entry"}
|
2006-05-02 13:09:18 +00:00
|
|
|
{"thumb-rel32" "-static -T arm.ld" "" {thumb-rel32.s}
|
|
|
|
{{objdump -s thumb-rel32.d}}
|
|
|
|
"thumb-rel32"}
|
2006-05-11 15:17:34 +00:00
|
|
|
{"MOVW/MOVT" "-static -T arm.ld" "" {arm-movwt.s}
|
|
|
|
{{objdump -dw arm-movwt.d}}
|
|
|
|
"arm-movwt"}
|
2006-05-15 19:57:35 +00:00
|
|
|
{"BE8 Mapping Symbols" "-static -T arm.ld -EB --be8" "-EB" {arm-be8.s}
|
2008-07-07 19:00:21 +00:00
|
|
|
{{objdump -d arm-be8.d}}
|
2006-05-15 19:57:35 +00:00
|
|
|
"arm-be8"}
|
2006-06-19 14:22:27 +00:00
|
|
|
{"Using Thumb lib by another lib" "-shared tmpdir/mixed-lib.so" "" {use-thumb-lib.s}
|
|
|
|
{{readelf -Ds use-thumb-lib.sym}}
|
|
|
|
"use-thumb-lib.so"}
|
2007-01-29 16:27:34 +00:00
|
|
|
{"VFP11 denorm erratum fix, scalar operation"
|
2007-02-28 17:14:39 +00:00
|
|
|
"-EL --vfp11-denorm-fix=scalar -Ttext=0x8000" "-EL -mfpu=vfpxd" {vfp11-fix-scalar.s}
|
2007-01-29 16:27:34 +00:00
|
|
|
{{objdump -dr vfp11-fix-scalar.d}}
|
|
|
|
"vfp11-fix-scalar"}
|
|
|
|
{"VFP11 denorm erratum fix, vector operation"
|
2007-02-28 17:14:39 +00:00
|
|
|
"-EB --vfp11-denorm-fix=vector -Ttext=0x8000" "-EB -mfpu=vfpxd" {vfp11-fix-vector.s}
|
2007-01-29 16:27:34 +00:00
|
|
|
{{objdump -dr vfp11-fix-vector.d}}
|
|
|
|
"vfp11-fix-vector"}
|
|
|
|
{"VFP11 denorm erratum fix, embedded code-like data"
|
2007-02-28 17:14:39 +00:00
|
|
|
"-EL --vfp11-denorm-fix=scalar -Ttext=0x8000" "-EL -mfpu=vfpxd" {vfp11-fix-none.s}
|
2007-01-29 16:27:34 +00:00
|
|
|
{{objdump -dr vfp11-fix-none.d}}
|
|
|
|
"vfp11-fix-none"}
|
ld/
* emultempl/armelf.em (fix_cortex_a8): New.
(arm_elf_before_allocation): Call bfd_elf32_arm_set_cortex_a8_fix.
(arm_elf_create_output_section_statements): Add fix_cortex_a8 to
bfd_elf32_arm_set_target_relocs.
(OPTION_FIX_CORTEX_A8, OPTION_NO_FIX_CORTEX_A8): New.
(PARSE_AND_LIST_LONGOPTS): Add [no-]fix-cortex-a8 options.
(PARSE_AND_LIST_OPTIONS): Add [no-]fix-cortex-a8 options.
(PARSE_AND_LIST_ARGS_CASES): Handle OPTION_[NO_]FIX_CORTEX_A8.
* ld.texinfo (--[no-]fix-cortex-a8): Briefly document new options.
bfd/
* elf32-arm.c (THUMB16_BCOND_INSN, THUMB32_INSN, THUMB32_B_INSN):
New macros.
(elf32_arm_stub_a8_veneer_b_cond, elf32_arm_stub_a8_veneer_b)
(elf32_arm_stub_a8_veneer_blx): New stub sequences.
(elf32_arm_stub_type): Add arm_stub_a8_veneer_b_cond,
arm_stub_a8_veneer_b and arm_stub_a8_veneer_blx.
(elf32_arm_stub_hash_entry): Add target_addend, orig_insn fields.
(a8_erratum_fix, a8_erratum_reloc): New structs.
(elf32_arm_link_hash_table): Add a8_erratum_fixes,
num_a8_erratum_fixes, fix_cortex_a8 fields.
(elf32_arm_link_hash_table_create): Zero fix_cortex_a8.
(elf32_arm_add_stub): Split into two parts, creating...
(elf32_arm_create_or_find_stub_sec): New function.
(elf32_arm_final_link_relocate): Add forward declaration.
(arm_build_one_stub): Add support for THUMB32_TYPE, Thumb-2
relocations, multiple relocations per stub.
(find_stub_size_and_template): New (using parts of
arm_size_one_stub).
(arm_size_one_stub): Use find_stub_size_and_template.
(a8_reloc_compare): New.
(find_thumb_glue): Add forward declaration.
(cortex_a8_erratum_scan): New.
(elf32_arm_size_stubs): Add Cortex-A8 erratum workaround support.
(bfd_elf32_arm_set_cortex_a8_fix): New.
(bfd_elf32_arm_set_target_relocs): Add fix_cortex_a8 argument.
(arm_map_one_stub): Add THUMB32_TYPE support.
(a8_branch_to_stub_data): New.
(make_branch_to_a8_stub): New.
(elf32_arm_write_section): Add Cortex-A8 erratum workaround support.
* bfd-in.h (bfd_elf32_arm_set_cortex_a8_fix): New.
(bfd_elf32_arm_set_target_relocs): Add argument for controlling
Cortex-A8 erratum workaround.
* bfd-in2.h: Regenerate.
ld/testsuite/
* ld-arm/cortex-a8-arm-target.s: New.
* ld-arm/cortex-a8-thumb-target.s: New.
* ld-arm/cortex-a8-fix-b-rel.s: New.
* ld-arm/cortex-a8-fix-b-rel-arm.d: New.
* ld-arm/cortex-a8-fix-b-rel-thumb.d: New.
* ld-arm/cortex-a8-fix-b.s: New.
* ld-arm/cortex-a8-fix-b.d: New.
* ld-arm/cortex-a8-fix-bl-rel.s: New.
* ld-arm/cortex-a8-fix-bl-rel-arm.d: New.
* ld-arm/cortex-a8-fix-bl-rel-thumb.d: New.
* ld-arm/cortex-a8-fix-bl.s: New.
* ld-arm/cortex-a8-fix-bl.d: New.
* ld-arm/cortex-a8-fix-bcc-rel.s: New.
* ld-arm/cortex-a8-fix-bcc-rel-thumb.d: New.
* ld-arm/cortex-a8-fix-bcc.s: New.
* ld-arm/cortex-a8-fix-bcc.d: New.
* ld-arm/cortex-a8-fix-blx-rel.s: New.
* ld-arm/cortex-a8-fix-blx-rel-arm.d: New.
* ld-arm/cortex-a8-fix-blx-rel-thumb.d: New.
* ld-arm/cortex-a8-fix-blx.s: New.
* ld-arm/cortex-a8-fix-blx.d: New.
* ld-arm/arm-elf.exp: Add new tests.
2009-05-22 11:58:45 +00:00
|
|
|
{"Cortex-A8 erratum fix, b.w"
|
|
|
|
"-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-b.s}
|
|
|
|
{{objdump -dr cortex-a8-fix-b.d}}
|
|
|
|
"cortex-a8-fix-b"}
|
|
|
|
{"Cortex-A8 erratum fix, bl.w"
|
|
|
|
"-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-bl.s}
|
|
|
|
{{objdump -dr cortex-a8-fix-bl.d}}
|
|
|
|
"cortex-a8-fix-bl"}
|
|
|
|
{"Cortex-A8 erratum fix, bcc.w"
|
|
|
|
"-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-bcc.s}
|
|
|
|
{{objdump -dr cortex-a8-fix-bcc.d}}
|
|
|
|
"cortex-a8-fix-bcc"}
|
|
|
|
{"Cortex-A8 erratum fix, blx.w"
|
|
|
|
"-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-blx.s}
|
|
|
|
{{objdump -dr cortex-a8-fix-blx.d}}
|
|
|
|
"cortex-a8-fix-blx"}
|
|
|
|
{"Cortex-A8 erratum fix, relocate b.w to ARM"
|
|
|
|
"-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-b-rel.s}
|
|
|
|
{{objdump -dr cortex-a8-fix-b-rel-arm.d}}
|
|
|
|
"cortex-a8-fix-b-rel-arm"}
|
|
|
|
{"Cortex-A8 erratum fix, relocate b.w to Thumb"
|
|
|
|
"-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-b-rel.s}
|
|
|
|
{{objdump -dr cortex-a8-fix-b-rel-thumb.d}}
|
|
|
|
"cortex-a8-fix-b-rel-thumb"}
|
|
|
|
{"Cortex-A8 erratum fix, relocate bl.w to ARM"
|
|
|
|
"-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-bl-rel.s}
|
|
|
|
{{objdump -dr cortex-a8-fix-bl-rel-arm.d}}
|
|
|
|
"cortex-a8-fix-bl-rel-arm"}
|
|
|
|
{"Cortex-A8 erratum fix, relocate bl.w to Thumb"
|
|
|
|
"-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bl-rel.s}
|
|
|
|
{{objdump -dr cortex-a8-fix-bl-rel-thumb.d}}
|
|
|
|
"cortex-a8-fix-bl-rel-thumb"}
|
|
|
|
{"Cortex-A8 erratum fix, relocate b<cond>.w to Thumb"
|
|
|
|
"-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bcc-rel.s}
|
|
|
|
{{objdump -dr cortex-a8-fix-bcc-rel-thumb.d}}
|
|
|
|
"cortex-a8-fix-bcc-rel-thumb"}
|
|
|
|
{"Cortex-A8 erratum fix, relocate blx.w to ARM"
|
|
|
|
"-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-blx-rel.s}
|
|
|
|
{{objdump -dr cortex-a8-fix-blx-rel-arm.d}}
|
|
|
|
"cortex-a8-fix-blx-rel-arm"}
|
|
|
|
{"Cortex-A8 erratum fix, relocate blx.w to Thumb"
|
|
|
|
"-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-blx-rel.s}
|
|
|
|
{{objdump -dr cortex-a8-fix-blx-rel-thumb.d}}
|
|
|
|
"cortex-a8-fix-blx-rel-thumb"}
|
2009-08-05 12:36:14 +00:00
|
|
|
{"Cortex-A8 erratum fix, relocate bl.w and far call"
|
2010-01-13 19:01:10 +00:00
|
|
|
"-EL -Ttext=0x00 --fix-cortex-a8 --defsym far_fn1=0x80000000 --defsym far_fn2=0x80000004 --defsym far_fn=0x7fff0000 --defsym _start=0"
|
|
|
|
"-EL -mcpu=cortex-a8" {cortex-a8-far-1.s cortex-a8-far-2.s}
|
2009-08-05 12:36:14 +00:00
|
|
|
{{objdump -dr cortex-a8-far.d}}
|
|
|
|
"cortex-a8-far"}
|
2009-08-06 13:05:24 +00:00
|
|
|
{"Cortex-A8 erratum fix, headers"
|
2010-01-13 19:01:10 +00:00
|
|
|
"-EL --fix-cortex-a8 -T cortex-a8-fix-hdr.t"
|
|
|
|
"-EL -mcpu=cortex-a8" {cortex-a8-fix-hdr.s}
|
2009-08-06 13:05:24 +00:00
|
|
|
{{objdump -dr cortex-a8-fix-hdr.d}}
|
|
|
|
"cortex-a8-fix-hdr"}
|
2007-02-22 17:03:59 +00:00
|
|
|
{"Unwinding and -gc-sections" "-gc-sections" "" {gc-unwind.s}
|
|
|
|
{{objdump -sj.data gc-unwind.d}}
|
|
|
|
"gc-unwind"}
|
2007-03-20 20:19:07 +00:00
|
|
|
{"arm-pic-veneer" "-static -T arm.ld --pic-veneer" "" {arm-pic-veneer.s}
|
|
|
|
{{objdump -d arm-pic-veneer.d}}
|
|
|
|
"arm-pic-veneer"}
|
2007-04-17 20:09:52 +00:00
|
|
|
{"Preempt Thumb symbol" "tmpdir/mixed-lib.so -T arm-dyn.ld --use-blx" ""
|
|
|
|
{preempt-app.s}
|
|
|
|
{{readelf -Ds preempt-app.sym}}
|
|
|
|
"preempt-app"}
|
2008-05-23 13:53:27 +00:00
|
|
|
{"jump19" "-static -T arm.ld" "" {jump19.s}
|
|
|
|
{{objdump -dr jump19.d}}
|
|
|
|
"jump19"}
|
2009-11-23 14:41:33 +00:00
|
|
|
{"script-type" "-static -T script-type.ld" "" {script-type.s}
|
|
|
|
{{readelf -s script-type.sym}}
|
|
|
|
"script-type"}
|
2008-05-23 13:53:27 +00:00
|
|
|
{"callweak" "-static -T arm.ld" "" {callweak.s}
|
|
|
|
{{objdump -dr callweak.d}}
|
|
|
|
"callweak"}
|
2009-12-28 18:44:55 +00:00
|
|
|
{"callweak-2" "-static -T arm.ld" "" {callweak-2.s}
|
|
|
|
{{objdump -dr callweak-2.d}}
|
|
|
|
"callweak-2"}
|
2009-12-28 18:55:16 +00:00
|
|
|
{"Relocation boundaries" "-defsym x=0 -defsym y=0 -defsym _start=0" "" {reloc-boundaries.s}
|
|
|
|
{{objdump -s reloc-boundaries.d}}
|
|
|
|
"reloc-boundaries"}
|
2008-05-28 15:38:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
run_ld_link_tests $armelftests
|
|
|
|
run_dump_test "group-relocs-alu-bad"
|
|
|
|
run_dump_test "group-relocs-ldr-bad"
|
|
|
|
run_dump_test "group-relocs-ldrs-bad"
|
|
|
|
run_dump_test "group-relocs-ldc-bad"
|
2008-11-25 15:53:27 +00:00
|
|
|
run_dump_test "thumb2-bl-undefweak"
|
2009-04-15 13:49:54 +00:00
|
|
|
run_dump_test "thumb2-bl-undefweak1"
|
2008-05-28 15:38:36 +00:00
|
|
|
run_dump_test "emit-relocs1"
|
2009-04-30 00:01:11 +00:00
|
|
|
run_dump_test "movw-shared-1"
|
|
|
|
run_dump_test "movw-shared-2"
|
|
|
|
run_dump_test "movw-shared-3"
|
|
|
|
run_dump_test "movw-shared-4"
|
2008-05-28 15:38:36 +00:00
|
|
|
|
|
|
|
# Exclude non-ARM-EABI targets.
|
|
|
|
|
|
|
|
if { ![istarget "arm*-*-*eabi"] } {
|
2009-02-23 10:03:47 +00:00
|
|
|
# Special variants of these tests, as a different farcall stub is
|
|
|
|
# generated for a non-ARM-EABI target: indeed in such a case,
|
|
|
|
# there are no attributes to indicate that blx can be used.
|
|
|
|
|
|
|
|
set arm_noeabi_tests {
|
|
|
|
{"Thumb-2-as-Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-as-thumb1-bad.s}
|
|
|
|
{{objdump -d thumb2-bl-as-thumb1-bad-noeabi.d}}
|
|
|
|
"thumb2-bl-as-thumb1-bad"}
|
2009-02-24 Joseph Myers <joseph@codesourcery.com>
bfd/
* elf32-arm.c (PREV_SEC): Update comment.
(group_sections): Rename argument to stubs_always_after_branch.
Reverse the list and place stubs at the end of input sections.
Undefine NEXT_SEC.
(elf32_arm_size_stubs): Update to use stubs_always_after_branch.
ld/
* ld.texinfo (ARM): Document changed meaning of --stub-group-size.
* emultempl/armelf.em (hook_in_stub): Insert after the input section.
(elf32_arm_add_stub_section): Update comment.
(PARSE_AND_LIST_OPTIONS): Update help for --stub-group-size.
2009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
ld/testsuite/
* ld-arm/arm-elf.exp (armeabitests): Update duplicate test names.
Use normal output files for big-endian.
* ld-arm/farcall-arm-arm-be.d, ld-arm/farcall-thumb-arm-be.d: Delete.
* ld-arm/farcall-arm-arm-be8.d, ld-arm/farcall-arm-arm-pic-veneer.d,
ld-arm/farcall-arm-arm.d, ld-arm/farcall-arm-thumb-blx-pic-veneer.d,
ld-arm/farcall-arm-thumb-blx.d, ld-arm/farcall-arm-thumb-pic-veneer.d,
ld-arm/farcall-arm-thumb.d, ld-arm/farcall-group-size2.d,
ld-arm/farcall-group.d, ld-arm/farcall-mix.d, ld-arm/farcall-mix2.d,
ld-arm/farcall-thumb-arm-be8.d,
ld-arm/farcall-thumb-arm-blx-pic-veneer.d,
ld-arm/farcall-thumb-arm-blx.d, ld-arm/farcall-thumb-arm-short.d,
ld-arm/farcall-thumb-arm.d,
ld-arm/farcall-thumb-thumb-blx-pic-veneer.d,
ld-arm/farcall-thumb-thumb-blx.d, ld-arm/farcall-thumb-thumb-m.d,
ld-arm/farcall-thumb-thumb.d, ld-arm/thumb2-bl-as-thumb1-bad.d,
ld-arm/thumb2-bl-bad.d: Update for moved stubs.
2009-02-24 22:43:10 +00:00
|
|
|
{"Thumb-2 BL bad" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-bad.s}
|
2009-02-23 10:03:47 +00:00
|
|
|
{{objdump -d thumb2-bl-bad-noeabi.d}}
|
|
|
|
"thumb2-bl-bad"}
|
|
|
|
}
|
|
|
|
run_ld_link_tests $arm_noeabi_tests
|
|
|
|
|
2008-05-28 15:38:36 +00:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
# Farcalls stubs are fully supported for ARM-EABI only
|
|
|
|
set armeabitests {
|
|
|
|
{"EABI attribute merging" "-r" "" {attr-merge.s attr-merge.s}
|
|
|
|
{{readelf -A attr-merge.attr}}
|
|
|
|
"attr-merge"}
|
|
|
|
{"EABI attribute merging 2" "-r" "" {attr-merge-2a.s attr-merge-2b.s}
|
|
|
|
{{readelf -A attr-merge-2.attr}}
|
|
|
|
"attr-merge-2"}
|
2009-01-19 12:20:15 +00:00
|
|
|
{"EABI attribute merging 3" "-r" "" {attr-merge-3a.s attr-merge-3b.s}
|
|
|
|
{{readelf -A attr-merge-3.attr}}
|
|
|
|
"attr-merge-3"}
|
|
|
|
{"EABI attribute merging 4" "-r" "" {attr-merge-4a.s attr-merge-4b.s}
|
|
|
|
{{readelf -A attr-merge-4.attr}}
|
|
|
|
"attr-merge-4"}
|
|
|
|
{"EABI attribute merging 5" "-r" "" {attr-merge-5.s attr-merge-5.s}
|
|
|
|
{{readelf -A attr-merge-5.attr}}
|
|
|
|
"attr-merge-5"}
|
|
|
|
{"EABI attribute arch merging 1" "-r" "" {arch-v6k.s arch-v6t2.s}
|
|
|
|
{{readelf -A attr-merge-arch-1.attr}}
|
|
|
|
"attr-merge-arch-1"}
|
|
|
|
{"EABI attribute arch merging 1 reversed" "-r" "" {arch-v6t2.s arch-v6k.s}
|
|
|
|
{{readelf -A attr-merge-arch-1.attr}}
|
|
|
|
"attr-merge-arch-1r"}
|
|
|
|
{"EABI attribute arch merging 2" "-r" "" {arch-v6k.s arch-v6.s}
|
|
|
|
{{readelf -A attr-merge-arch-2.attr}}
|
|
|
|
"attr-merge-arch-2"}
|
|
|
|
{"EABI attribute arch merging 2 reversed" "-r" "" {arch-v6.s arch-v6k.s}
|
|
|
|
{{readelf -A attr-merge-arch-2.attr}}
|
|
|
|
"attr-merge-arch-2r"}
|
2008-05-28 15:38:36 +00:00
|
|
|
{"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x1001000" "" {thumb2-bl.s}
|
|
|
|
{{objdump -dr thumb2-bl.d}}
|
|
|
|
"thumb2-bl"}
|
2009-02-05 21:54:43 +00:00
|
|
|
{"Thumb-2 Interworked branch" "-T arm.ld" "" {thumb2-b-interwork.s}
|
|
|
|
{{objdump -dr thumb2-b-interwork.d}}
|
|
|
|
"thumb2-b-interwork"}
|
2009-05-01 13:49:19 +00:00
|
|
|
{"BL/BLX interworking" "-T arm.ld" "" {thumb2-bl-blx-interwork.s}
|
|
|
|
{{objdump -dr thumb2-bl-blx-interwork.d}}
|
|
|
|
"thumb2-bl-blx-interwork"}
|
2008-05-23 13:53:27 +00:00
|
|
|
{"ARMv4 interworking" "-static -T arm.ld --fix-v4bx-interworking" "--fix-v4bx -meabi=4" {armv4-bx.s}
|
|
|
|
{{objdump -d armv4-bx.d}}
|
|
|
|
"armv4-bx"}
|
|
|
|
{"MOVW/MOVT and merged sections" "-T arm.ld" "" {movw-merge.s}
|
|
|
|
{{objdump -dw movw-merge.d}}
|
|
|
|
"movw-merge"}
|
|
|
|
{"MOVW/MOVT against shared libraries" "tmpdir/arm-lib.so" "" {arm-app-movw.s}
|
|
|
|
{{objdump -Rw arm-app.r}}
|
|
|
|
"arm-app-movw"}
|
2009-02-23 10:03:47 +00:00
|
|
|
{"Thumb-2-as-Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-as-thumb1-bad.s}
|
2008-05-23 13:53:27 +00:00
|
|
|
{{objdump -d thumb2-bl-as-thumb1-bad.d}}
|
|
|
|
"thumb2-bl-as-thumb1-bad"}
|
|
|
|
{"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-bad.s}
|
|
|
|
{{objdump -d thumb2-bl-bad.d}}
|
|
|
|
"thumb2-bl-bad"}
|
bfd/
* elf32-arm.c (THM2_MAX_FWD_BRANCH_OFFSET): Define.
(THM2_MAX_BWD_BRANCH_OFFSET): Define.
(ARM_MAX_FWD_BRANCH_OFFSET): Define.
(ARM_MAX_BWD_BRANCH_OFFSET): Define.
(THM_MAX_FWD_BRANCH_OFFSET): Define.
(THM_MAX_BWD_BRANCH_OFFSET): Define.
(arm_long_branch_stub): Define.
(arm_pic_long_branch_stub): Define.
(arm_thumb_v4t_long_branch_stub): Define.
(arm_thumb_thumb_long_branch_stub): Define.
(arm_thumb_arm_v4t_long_branch_stub): Define.
(STUB_SUFFIX): Define.
(elf32_arm_stub_type): Define.
(elf32_arm_stub_hash_entry): Define.
(elf32_arm_link_hash_entry): Add stub_cache field.
(arm_stub_hash_lookup): Define.
(elf32_arm_link_hash_table): Add stub_hash_table, stub_bfd,
add_stub_section, layout_sections_again, stub_group, bfd_count,
top_index, input_list fields.
(elf32_arm_link_hash_newfunc): Init new field.
(stub_hash_newfunc): New function.
(elf32_arm_link_hash_table_create): Init stub_hash_table.
(elf32_arm_hash_table_free): New function.
(arm_type_of_stub): New function.
(elf32_arm_stub_name): New function.
(elf32_arm_get_stub_entry): New function.
(elf32_arm_stub_add_mapping_symbol): New function.
(elf32_arm_add_stub): New function.
(arm_build_one_stub): New function.
(arm_size_one_stub): New function.
(elf32_arm_setup_section_lists): New function.
(elf32_arm_next_input_section): New function.
(group_sections): New function.
(elf32_arm_size_stubs): New function.
(elf32_arm_build_stubs): New function.
(bfd_elf32_arm_add_glue_sections_to_bfd): Skip stub sections.
(bfd_elf32_arm_process_before_allocation): No longer handle
R_ARM_CALL and R_ARM_THM_CALL.
(using_thumb_only): New function.
(elf32_arm_final_link_relocate): Redirect calls to stub if range
exceeds encoding capabilities.
(bfd_elf32_bfd_link_hash_table_free): Define.
* bfd-in.h (R_ARM_max): Fix value to 130.
(elf32_arm_setup_section_lists): Protype.
(elf32_arm_next_input_section): Protype.
(elf32_arm_size_stubs): Protype.
(elf32_arm_build_stubs): Protype.
ld/
* emultempl/armelf.em (build_section_lists): New function.
(stub_file): Define.
(need_laying_out): Define.
(group_size): Define.
(hook_stub_info): Define.
(hook_in_stub): New function.
(elf32_arm_add_stub_section): New function.
(gldarm_layout_sections_again): New function.
(gld${EMULATION_NAME}_finish): Replace arm_elf_finish(). Generate
stubs for long calls if needed.
(arm_elf_create_output_section_statements): create stub_file bfd.
(arm_for_each_input_file_wrapper): New function.
(arm_lang_for_each_input_file): New function.
(lang_for_each_input_file): Define.
(PARSE_AND_LIST_PROLOGUE): Add option token OPTION_STUBGROUP_SIZE.
(PARSE_AND_LIST_LONGOPTS): Add option stub-group-size.
(PARSE_AND_LIST_OPTIONS): Add option stub-group-size.
(PARSE_AND_LIST_ARGS_CASES): Add OPTION_STUBGROUP_SIZE case.
(LDEMUL_FINISH): Update to gld${EMULATION_NAME}_finish.
* ld/lang.c (print_input_statement): Skip if bfd has
BFD_LINKER_CREATED.
ld/testsuite
* ld-arm/arm-elf.exp (armelftests): Add farcall-arm-arm,
farcall-arm-arm-pic-veneer, farcall-arm-arm-be8 farcall-arm-thumb,
farcall-arm-thumb-blx, farcall-arm-thumb-pic-veneer,
farcall-arm-thumb-blx-pic-veneer, farcall-thumb-thumb,
farcall-thumb-thumb-pic-veneer, farcall-thumb-thumb-blx,
farcall-thumb-thumb-m, farcall-thumb-thumb-m-pic-veneer,
farcall-thumb-thumb-blx-pic-veneer, farcall-thumb-arm,
farcall-thumb-arm-pic-veneer, farcall-thumb-arm-blx,
farcall-thumb-arm-blx-pic-veneer.
Change thumb2-bl-as-thumb1-bad, thumb2-bl-bad.
* ld-arm/thumb2-bl-as-thumb1-bad.d: Reflects farcall stub
generation.
* ld-arm/thumb2-bl-bad.d: Likewise.
* ld-arm/thumb2-bl-as-thumb1-bad.s: Update comments.
* ld-arm/thumb2-bl-bad.s: Likewise.
2008-05-15 17:00:15 +00:00
|
|
|
|
2008-05-23 13:53:27 +00:00
|
|
|
{"ARM-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001020" "" {farcall-arm-arm.s}
|
|
|
|
{{objdump -d farcall-arm-arm.d}}
|
|
|
|
"farcall-arm-arm"}
|
|
|
|
{"ARM-ARM farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001020 --pic-veneer" "" {farcall-arm-arm.s}
|
|
|
|
{{objdump -d farcall-arm-arm-pic-veneer.d}}
|
|
|
|
"farcall-arm-arm-pic-veneer"}
|
|
|
|
{"ARM-ARM farcall (BE8)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB --be8" "-EB" {farcall-arm-arm.s}
|
2009-04-01 15:45:13 +00:00
|
|
|
{{objdump -d farcall-arm-arm.d}}
|
2008-05-23 13:53:27 +00:00
|
|
|
"farcall-arm-arm-be8"}
|
2009-02-23 21:51:35 +00:00
|
|
|
{"ARM-ARM farcall (BE)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB" "-EB" {farcall-arm-arm.s}
|
2009-02-24 Joseph Myers <joseph@codesourcery.com>
bfd/
* elf32-arm.c (PREV_SEC): Update comment.
(group_sections): Rename argument to stubs_always_after_branch.
Reverse the list and place stubs at the end of input sections.
Undefine NEXT_SEC.
(elf32_arm_size_stubs): Update to use stubs_always_after_branch.
ld/
* ld.texinfo (ARM): Document changed meaning of --stub-group-size.
* emultempl/armelf.em (hook_in_stub): Insert after the input section.
(elf32_arm_add_stub_section): Update comment.
(PARSE_AND_LIST_OPTIONS): Update help for --stub-group-size.
2009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
ld/testsuite/
* ld-arm/arm-elf.exp (armeabitests): Update duplicate test names.
Use normal output files for big-endian.
* ld-arm/farcall-arm-arm-be.d, ld-arm/farcall-thumb-arm-be.d: Delete.
* ld-arm/farcall-arm-arm-be8.d, ld-arm/farcall-arm-arm-pic-veneer.d,
ld-arm/farcall-arm-arm.d, ld-arm/farcall-arm-thumb-blx-pic-veneer.d,
ld-arm/farcall-arm-thumb-blx.d, ld-arm/farcall-arm-thumb-pic-veneer.d,
ld-arm/farcall-arm-thumb.d, ld-arm/farcall-group-size2.d,
ld-arm/farcall-group.d, ld-arm/farcall-mix.d, ld-arm/farcall-mix2.d,
ld-arm/farcall-thumb-arm-be8.d,
ld-arm/farcall-thumb-arm-blx-pic-veneer.d,
ld-arm/farcall-thumb-arm-blx.d, ld-arm/farcall-thumb-arm-short.d,
ld-arm/farcall-thumb-arm.d,
ld-arm/farcall-thumb-thumb-blx-pic-veneer.d,
ld-arm/farcall-thumb-thumb-blx.d, ld-arm/farcall-thumb-thumb-m.d,
ld-arm/farcall-thumb-thumb.d, ld-arm/thumb2-bl-as-thumb1-bad.d,
ld-arm/thumb2-bl-bad.d: Update for moved stubs.
2009-02-24 22:43:10 +00:00
|
|
|
{{objdump -d farcall-arm-arm.d}}
|
2009-02-23 21:51:35 +00:00
|
|
|
"farcall-arm-arm-be"}
|
bfd/
* elf32-arm.c (THM2_MAX_FWD_BRANCH_OFFSET): Define.
(THM2_MAX_BWD_BRANCH_OFFSET): Define.
(ARM_MAX_FWD_BRANCH_OFFSET): Define.
(ARM_MAX_BWD_BRANCH_OFFSET): Define.
(THM_MAX_FWD_BRANCH_OFFSET): Define.
(THM_MAX_BWD_BRANCH_OFFSET): Define.
(arm_long_branch_stub): Define.
(arm_pic_long_branch_stub): Define.
(arm_thumb_v4t_long_branch_stub): Define.
(arm_thumb_thumb_long_branch_stub): Define.
(arm_thumb_arm_v4t_long_branch_stub): Define.
(STUB_SUFFIX): Define.
(elf32_arm_stub_type): Define.
(elf32_arm_stub_hash_entry): Define.
(elf32_arm_link_hash_entry): Add stub_cache field.
(arm_stub_hash_lookup): Define.
(elf32_arm_link_hash_table): Add stub_hash_table, stub_bfd,
add_stub_section, layout_sections_again, stub_group, bfd_count,
top_index, input_list fields.
(elf32_arm_link_hash_newfunc): Init new field.
(stub_hash_newfunc): New function.
(elf32_arm_link_hash_table_create): Init stub_hash_table.
(elf32_arm_hash_table_free): New function.
(arm_type_of_stub): New function.
(elf32_arm_stub_name): New function.
(elf32_arm_get_stub_entry): New function.
(elf32_arm_stub_add_mapping_symbol): New function.
(elf32_arm_add_stub): New function.
(arm_build_one_stub): New function.
(arm_size_one_stub): New function.
(elf32_arm_setup_section_lists): New function.
(elf32_arm_next_input_section): New function.
(group_sections): New function.
(elf32_arm_size_stubs): New function.
(elf32_arm_build_stubs): New function.
(bfd_elf32_arm_add_glue_sections_to_bfd): Skip stub sections.
(bfd_elf32_arm_process_before_allocation): No longer handle
R_ARM_CALL and R_ARM_THM_CALL.
(using_thumb_only): New function.
(elf32_arm_final_link_relocate): Redirect calls to stub if range
exceeds encoding capabilities.
(bfd_elf32_bfd_link_hash_table_free): Define.
* bfd-in.h (R_ARM_max): Fix value to 130.
(elf32_arm_setup_section_lists): Protype.
(elf32_arm_next_input_section): Protype.
(elf32_arm_size_stubs): Protype.
(elf32_arm_build_stubs): Protype.
ld/
* emultempl/armelf.em (build_section_lists): New function.
(stub_file): Define.
(need_laying_out): Define.
(group_size): Define.
(hook_stub_info): Define.
(hook_in_stub): New function.
(elf32_arm_add_stub_section): New function.
(gldarm_layout_sections_again): New function.
(gld${EMULATION_NAME}_finish): Replace arm_elf_finish(). Generate
stubs for long calls if needed.
(arm_elf_create_output_section_statements): create stub_file bfd.
(arm_for_each_input_file_wrapper): New function.
(arm_lang_for_each_input_file): New function.
(lang_for_each_input_file): Define.
(PARSE_AND_LIST_PROLOGUE): Add option token OPTION_STUBGROUP_SIZE.
(PARSE_AND_LIST_LONGOPTS): Add option stub-group-size.
(PARSE_AND_LIST_OPTIONS): Add option stub-group-size.
(PARSE_AND_LIST_ARGS_CASES): Add OPTION_STUBGROUP_SIZE case.
(LDEMUL_FINISH): Update to gld${EMULATION_NAME}_finish.
* ld/lang.c (print_input_statement): Skip if bfd has
BFD_LINKER_CREATED.
ld/testsuite
* ld-arm/arm-elf.exp (armelftests): Add farcall-arm-arm,
farcall-arm-arm-pic-veneer, farcall-arm-arm-be8 farcall-arm-thumb,
farcall-arm-thumb-blx, farcall-arm-thumb-pic-veneer,
farcall-arm-thumb-blx-pic-veneer, farcall-thumb-thumb,
farcall-thumb-thumb-pic-veneer, farcall-thumb-thumb-blx,
farcall-thumb-thumb-m, farcall-thumb-thumb-m-pic-veneer,
farcall-thumb-thumb-blx-pic-veneer, farcall-thumb-arm,
farcall-thumb-arm-pic-veneer, farcall-thumb-arm-blx,
farcall-thumb-arm-blx-pic-veneer.
Change thumb2-bl-as-thumb1-bad, thumb2-bl-bad.
* ld-arm/thumb2-bl-as-thumb1-bad.d: Reflects farcall stub
generation.
* ld-arm/thumb2-bl-bad.d: Likewise.
* ld-arm/thumb2-bl-as-thumb1-bad.s: Update comments.
* ld-arm/thumb2-bl-bad.s: Likewise.
2008-05-15 17:00:15 +00:00
|
|
|
|
2008-05-23 13:53:27 +00:00
|
|
|
{"ARM-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "" {farcall-arm-thumb.s}
|
|
|
|
{{objdump -d farcall-arm-thumb.d}}
|
|
|
|
"farcall-arm-thumb"}
|
|
|
|
{"ARM-Thumb farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv5t" {farcall-arm-thumb.s}
|
|
|
|
{{objdump -d farcall-arm-thumb-blx.d}}
|
|
|
|
"farcall-arm-thumb-blx"}
|
|
|
|
{"ARM-Thumb farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "" {farcall-arm-thumb.s}
|
|
|
|
{{objdump -d farcall-arm-thumb-pic-veneer.d}}
|
|
|
|
"farcall-arm-thumb-pic-veneer"}
|
|
|
|
{"ARM-Thumb farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv5t" {farcall-arm-thumb.s}
|
|
|
|
{{objdump -d farcall-arm-thumb-blx-pic-veneer.d}}
|
|
|
|
"farcall-arm-thumb-blx-pic-veneer"}
|
bfd/
* elf32-arm.c (THM2_MAX_FWD_BRANCH_OFFSET): Define.
(THM2_MAX_BWD_BRANCH_OFFSET): Define.
(ARM_MAX_FWD_BRANCH_OFFSET): Define.
(ARM_MAX_BWD_BRANCH_OFFSET): Define.
(THM_MAX_FWD_BRANCH_OFFSET): Define.
(THM_MAX_BWD_BRANCH_OFFSET): Define.
(arm_long_branch_stub): Define.
(arm_pic_long_branch_stub): Define.
(arm_thumb_v4t_long_branch_stub): Define.
(arm_thumb_thumb_long_branch_stub): Define.
(arm_thumb_arm_v4t_long_branch_stub): Define.
(STUB_SUFFIX): Define.
(elf32_arm_stub_type): Define.
(elf32_arm_stub_hash_entry): Define.
(elf32_arm_link_hash_entry): Add stub_cache field.
(arm_stub_hash_lookup): Define.
(elf32_arm_link_hash_table): Add stub_hash_table, stub_bfd,
add_stub_section, layout_sections_again, stub_group, bfd_count,
top_index, input_list fields.
(elf32_arm_link_hash_newfunc): Init new field.
(stub_hash_newfunc): New function.
(elf32_arm_link_hash_table_create): Init stub_hash_table.
(elf32_arm_hash_table_free): New function.
(arm_type_of_stub): New function.
(elf32_arm_stub_name): New function.
(elf32_arm_get_stub_entry): New function.
(elf32_arm_stub_add_mapping_symbol): New function.
(elf32_arm_add_stub): New function.
(arm_build_one_stub): New function.
(arm_size_one_stub): New function.
(elf32_arm_setup_section_lists): New function.
(elf32_arm_next_input_section): New function.
(group_sections): New function.
(elf32_arm_size_stubs): New function.
(elf32_arm_build_stubs): New function.
(bfd_elf32_arm_add_glue_sections_to_bfd): Skip stub sections.
(bfd_elf32_arm_process_before_allocation): No longer handle
R_ARM_CALL and R_ARM_THM_CALL.
(using_thumb_only): New function.
(elf32_arm_final_link_relocate): Redirect calls to stub if range
exceeds encoding capabilities.
(bfd_elf32_bfd_link_hash_table_free): Define.
* bfd-in.h (R_ARM_max): Fix value to 130.
(elf32_arm_setup_section_lists): Protype.
(elf32_arm_next_input_section): Protype.
(elf32_arm_size_stubs): Protype.
(elf32_arm_build_stubs): Protype.
ld/
* emultempl/armelf.em (build_section_lists): New function.
(stub_file): Define.
(need_laying_out): Define.
(group_size): Define.
(hook_stub_info): Define.
(hook_in_stub): New function.
(elf32_arm_add_stub_section): New function.
(gldarm_layout_sections_again): New function.
(gld${EMULATION_NAME}_finish): Replace arm_elf_finish(). Generate
stubs for long calls if needed.
(arm_elf_create_output_section_statements): create stub_file bfd.
(arm_for_each_input_file_wrapper): New function.
(arm_lang_for_each_input_file): New function.
(lang_for_each_input_file): Define.
(PARSE_AND_LIST_PROLOGUE): Add option token OPTION_STUBGROUP_SIZE.
(PARSE_AND_LIST_LONGOPTS): Add option stub-group-size.
(PARSE_AND_LIST_OPTIONS): Add option stub-group-size.
(PARSE_AND_LIST_ARGS_CASES): Add OPTION_STUBGROUP_SIZE case.
(LDEMUL_FINISH): Update to gld${EMULATION_NAME}_finish.
* ld/lang.c (print_input_statement): Skip if bfd has
BFD_LINKER_CREATED.
ld/testsuite
* ld-arm/arm-elf.exp (armelftests): Add farcall-arm-arm,
farcall-arm-arm-pic-veneer, farcall-arm-arm-be8 farcall-arm-thumb,
farcall-arm-thumb-blx, farcall-arm-thumb-pic-veneer,
farcall-arm-thumb-blx-pic-veneer, farcall-thumb-thumb,
farcall-thumb-thumb-pic-veneer, farcall-thumb-thumb-blx,
farcall-thumb-thumb-m, farcall-thumb-thumb-m-pic-veneer,
farcall-thumb-thumb-blx-pic-veneer, farcall-thumb-arm,
farcall-thumb-arm-pic-veneer, farcall-thumb-arm-blx,
farcall-thumb-arm-blx-pic-veneer.
Change thumb2-bl-as-thumb1-bad, thumb2-bl-bad.
* ld-arm/thumb2-bl-as-thumb1-bad.d: Reflects farcall stub
generation.
* ld-arm/thumb2-bl-bad.d: Likewise.
* ld-arm/thumb2-bl-as-thumb1-bad.s: Update comments.
* ld-arm/thumb2-bl-bad.s: Likewise.
2008-05-15 17:00:15 +00:00
|
|
|
|
2008-05-23 13:53:27 +00:00
|
|
|
{"Thumb-Thumb farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv5t" {farcall-thumb-thumb.s}
|
|
|
|
{{objdump -d farcall-thumb-thumb-blx.d}}
|
|
|
|
"farcall-thumb-thumb-blx"}
|
|
|
|
{"Thumb-Thumb farcall M profile" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv7m" {farcall-thumb-thumb.s}
|
|
|
|
{{objdump -d farcall-thumb-thumb-m.d}}
|
|
|
|
"farcall-thumb-thumb-m"}
|
2009-02-23 10:03:47 +00:00
|
|
|
{"Thumb-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv4t" {farcall-thumb-thumb.s}
|
|
|
|
{{objdump -d farcall-thumb-thumb.d}}
|
|
|
|
"farcall-thumb-thumb"}
|
2008-05-23 13:53:27 +00:00
|
|
|
{"Thumb-Thumb farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv5t" {farcall-thumb-thumb.s}
|
|
|
|
{{objdump -d farcall-thumb-thumb-blx-pic-veneer.d}}
|
|
|
|
"farcall-thumb-thumb-blx-pic-veneer"}
|
2009-02-26 15:37:53 +00:00
|
|
|
{"Thumb-Thumb farcall M profile (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv7m" {farcall-thumb-thumb.s}
|
|
|
|
{{objdump -d farcall-thumb-thumb-m-pic-veneer.d}}
|
|
|
|
"farcall-thumb-thumb-m-pic-veneer"}
|
|
|
|
{"Thumb-Thumb farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv4t" {farcall-thumb-thumb.s}
|
|
|
|
{{objdump -d farcall-thumb-thumb-pic-veneer.d}}
|
|
|
|
"farcall-thumb-thumb-pic-veneer"}
|
bfd/
* elf32-arm.c (THM2_MAX_FWD_BRANCH_OFFSET): Define.
(THM2_MAX_BWD_BRANCH_OFFSET): Define.
(ARM_MAX_FWD_BRANCH_OFFSET): Define.
(ARM_MAX_BWD_BRANCH_OFFSET): Define.
(THM_MAX_FWD_BRANCH_OFFSET): Define.
(THM_MAX_BWD_BRANCH_OFFSET): Define.
(arm_long_branch_stub): Define.
(arm_pic_long_branch_stub): Define.
(arm_thumb_v4t_long_branch_stub): Define.
(arm_thumb_thumb_long_branch_stub): Define.
(arm_thumb_arm_v4t_long_branch_stub): Define.
(STUB_SUFFIX): Define.
(elf32_arm_stub_type): Define.
(elf32_arm_stub_hash_entry): Define.
(elf32_arm_link_hash_entry): Add stub_cache field.
(arm_stub_hash_lookup): Define.
(elf32_arm_link_hash_table): Add stub_hash_table, stub_bfd,
add_stub_section, layout_sections_again, stub_group, bfd_count,
top_index, input_list fields.
(elf32_arm_link_hash_newfunc): Init new field.
(stub_hash_newfunc): New function.
(elf32_arm_link_hash_table_create): Init stub_hash_table.
(elf32_arm_hash_table_free): New function.
(arm_type_of_stub): New function.
(elf32_arm_stub_name): New function.
(elf32_arm_get_stub_entry): New function.
(elf32_arm_stub_add_mapping_symbol): New function.
(elf32_arm_add_stub): New function.
(arm_build_one_stub): New function.
(arm_size_one_stub): New function.
(elf32_arm_setup_section_lists): New function.
(elf32_arm_next_input_section): New function.
(group_sections): New function.
(elf32_arm_size_stubs): New function.
(elf32_arm_build_stubs): New function.
(bfd_elf32_arm_add_glue_sections_to_bfd): Skip stub sections.
(bfd_elf32_arm_process_before_allocation): No longer handle
R_ARM_CALL and R_ARM_THM_CALL.
(using_thumb_only): New function.
(elf32_arm_final_link_relocate): Redirect calls to stub if range
exceeds encoding capabilities.
(bfd_elf32_bfd_link_hash_table_free): Define.
* bfd-in.h (R_ARM_max): Fix value to 130.
(elf32_arm_setup_section_lists): Protype.
(elf32_arm_next_input_section): Protype.
(elf32_arm_size_stubs): Protype.
(elf32_arm_build_stubs): Protype.
ld/
* emultempl/armelf.em (build_section_lists): New function.
(stub_file): Define.
(need_laying_out): Define.
(group_size): Define.
(hook_stub_info): Define.
(hook_in_stub): New function.
(elf32_arm_add_stub_section): New function.
(gldarm_layout_sections_again): New function.
(gld${EMULATION_NAME}_finish): Replace arm_elf_finish(). Generate
stubs for long calls if needed.
(arm_elf_create_output_section_statements): create stub_file bfd.
(arm_for_each_input_file_wrapper): New function.
(arm_lang_for_each_input_file): New function.
(lang_for_each_input_file): Define.
(PARSE_AND_LIST_PROLOGUE): Add option token OPTION_STUBGROUP_SIZE.
(PARSE_AND_LIST_LONGOPTS): Add option stub-group-size.
(PARSE_AND_LIST_OPTIONS): Add option stub-group-size.
(PARSE_AND_LIST_ARGS_CASES): Add OPTION_STUBGROUP_SIZE case.
(LDEMUL_FINISH): Update to gld${EMULATION_NAME}_finish.
* ld/lang.c (print_input_statement): Skip if bfd has
BFD_LINKER_CREATED.
ld/testsuite
* ld-arm/arm-elf.exp (armelftests): Add farcall-arm-arm,
farcall-arm-arm-pic-veneer, farcall-arm-arm-be8 farcall-arm-thumb,
farcall-arm-thumb-blx, farcall-arm-thumb-pic-veneer,
farcall-arm-thumb-blx-pic-veneer, farcall-thumb-thumb,
farcall-thumb-thumb-pic-veneer, farcall-thumb-thumb-blx,
farcall-thumb-thumb-m, farcall-thumb-thumb-m-pic-veneer,
farcall-thumb-thumb-blx-pic-veneer, farcall-thumb-arm,
farcall-thumb-arm-pic-veneer, farcall-thumb-arm-blx,
farcall-thumb-arm-blx-pic-veneer.
Change thumb2-bl-as-thumb1-bad, thumb2-bl-bad.
* ld-arm/thumb2-bl-as-thumb1-bad.d: Reflects farcall stub
generation.
* ld-arm/thumb2-bl-bad.d: Likewise.
* ld-arm/thumb2-bl-as-thumb1-bad.s: Update comments.
* ld-arm/thumb2-bl-bad.s: Likewise.
2008-05-15 17:00:15 +00:00
|
|
|
|
2008-05-23 13:53:27 +00:00
|
|
|
{"Thumb-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "-W" {farcall-thumb-arm.s}
|
|
|
|
{{objdump -d farcall-thumb-arm.d}}
|
|
|
|
"farcall-thumb-arm"}
|
2009-02-23 21:48:53 +00:00
|
|
|
{"Thumb-ARM farcall (BE8)" "-Ttext 0x1000 --section-start .foo=0x2001014 -EB --be8" "-W -EB" {farcall-thumb-arm.s}
|
2009-04-01 15:45:13 +00:00
|
|
|
{{objdump -d farcall-thumb-arm.d}}
|
2009-02-23 21:51:35 +00:00
|
|
|
"farcall-thumb-arm-be8"}
|
|
|
|
{"Thumb-ARM farcall (BE)" "-Ttext 0x1000 --section-start .foo=0x2001014 -EB" "-W -EB" {farcall-thumb-arm.s}
|
2009-02-24 Joseph Myers <joseph@codesourcery.com>
bfd/
* elf32-arm.c (PREV_SEC): Update comment.
(group_sections): Rename argument to stubs_always_after_branch.
Reverse the list and place stubs at the end of input sections.
Undefine NEXT_SEC.
(elf32_arm_size_stubs): Update to use stubs_always_after_branch.
ld/
* ld.texinfo (ARM): Document changed meaning of --stub-group-size.
* emultempl/armelf.em (hook_in_stub): Insert after the input section.
(elf32_arm_add_stub_section): Update comment.
(PARSE_AND_LIST_OPTIONS): Update help for --stub-group-size.
2009-02-24 Daniel Jacobowitz <dan@codesourcery.com>
ld/testsuite/
* ld-arm/arm-elf.exp (armeabitests): Update duplicate test names.
Use normal output files for big-endian.
* ld-arm/farcall-arm-arm-be.d, ld-arm/farcall-thumb-arm-be.d: Delete.
* ld-arm/farcall-arm-arm-be8.d, ld-arm/farcall-arm-arm-pic-veneer.d,
ld-arm/farcall-arm-arm.d, ld-arm/farcall-arm-thumb-blx-pic-veneer.d,
ld-arm/farcall-arm-thumb-blx.d, ld-arm/farcall-arm-thumb-pic-veneer.d,
ld-arm/farcall-arm-thumb.d, ld-arm/farcall-group-size2.d,
ld-arm/farcall-group.d, ld-arm/farcall-mix.d, ld-arm/farcall-mix2.d,
ld-arm/farcall-thumb-arm-be8.d,
ld-arm/farcall-thumb-arm-blx-pic-veneer.d,
ld-arm/farcall-thumb-arm-blx.d, ld-arm/farcall-thumb-arm-short.d,
ld-arm/farcall-thumb-arm.d,
ld-arm/farcall-thumb-thumb-blx-pic-veneer.d,
ld-arm/farcall-thumb-thumb-blx.d, ld-arm/farcall-thumb-thumb-m.d,
ld-arm/farcall-thumb-thumb.d, ld-arm/thumb2-bl-as-thumb1-bad.d,
ld-arm/thumb2-bl-bad.d: Update for moved stubs.
2009-02-24 22:43:10 +00:00
|
|
|
{{objdump -d farcall-thumb-arm.d}}
|
2009-02-23 21:51:35 +00:00
|
|
|
"farcall-thumb-arm-be"}
|
2008-08-26 11:46:41 +00:00
|
|
|
{"Thumb-ARM (short) call" "-Ttext 0x1000 --section-start .foo=0x0002014" "-W" {farcall-thumb-arm-short.s}
|
|
|
|
{{objdump -d farcall-thumb-arm-short.d}}
|
|
|
|
"farcall-thumb-arm-short"}
|
2008-05-23 13:53:27 +00:00
|
|
|
{"Thumb-ARM farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-W -march=armv5t" {farcall-thumb-arm.s}
|
|
|
|
{{objdump -d farcall-thumb-arm-blx.d}}
|
|
|
|
"farcall-thumb-arm-blx"}
|
|
|
|
{"Thumb-ARM farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-W -march=armv5t" {farcall-thumb-arm.s}
|
|
|
|
{{objdump -d farcall-thumb-arm-blx-pic-veneer.d}}
|
|
|
|
"farcall-thumb-arm-blx-pic-veneer"}
|
2009-02-26 15:37:53 +00:00
|
|
|
{"Thumb-ARM farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-W" {farcall-thumb-arm.s}
|
|
|
|
{{objdump -d farcall-thumb-arm-pic-veneer.d}}
|
|
|
|
"farcall-thumb-arm-pic-veneer"}
|
2008-05-23 13:53:27 +00:00
|
|
|
|
|
|
|
{"Multiple farcalls" "-Ttext 0x1000 --section-start .foo=0x2002020" "" {farcall-mix.s}
|
|
|
|
{{objdump -d farcall-mix.d}}
|
|
|
|
"farcall-mix"}
|
|
|
|
{"Multiple farcalls from several sections" "-Ttext 0x1000 --section-start .mytext=0x2000 --section-start .foo=0x2003020" "" {farcall-mix2.s}
|
|
|
|
{{objdump -d farcall-mix2.d}}
|
|
|
|
"farcall-mix2"}
|
|
|
|
|
|
|
|
{"Default group size" "-Ttext 0x1000 --section-start .foo=0x2003020" "" {farcall-group.s farcall-group2.s}
|
|
|
|
{{objdump -d farcall-group.d}}
|
|
|
|
"farcall-group-default"}
|
|
|
|
{"Group size=2" "-Ttext 0x1000 --section-start .foo=0x2003020 --stub-group-size=2" "" {farcall-group.s farcall-group2.s}
|
|
|
|
{{objdump -d farcall-group-size2.d}}
|
|
|
|
"farcall-group-size2"}
|
2009-03-06 08:57:58 +00:00
|
|
|
{"Group size limit" "-Ttext 0x1000 --section-start .far=0x2003020" "" {farcall-group3.s farcall-group4.s}
|
|
|
|
{{objdump -d farcall-group-limit.d}}
|
|
|
|
"farcall-group-limit"}
|
2009-03-05 17:28:21 +00:00
|
|
|
|
|
|
|
{"Mixed ARM/Thumb dynamic application with farcalls" "tmpdir/mixed-lib.so -T arm-dyn.ld --section-start .far_arm=0x2100000 --section-start .far_thumb=0x2200000" ""
|
|
|
|
{farcall-mixed-app.s}
|
|
|
|
{{objdump -fdw farcall-mixed-app.d} {objdump -Rw farcall-mixed-app.r}
|
|
|
|
{readelf -Ds farcall-mixed-app.sym}}
|
|
|
|
"farcall-mixed-app"}
|
|
|
|
{"Mixed ARM/Thumb arch5 dynamic application with farcalls" "tmpdir/mixed-lib.so -T arm-dyn.ld --use-blx --section-start .far_arm=0x2100000 --section-start .far_thumb=0x2200000" ""
|
|
|
|
{farcall-mixed-app.s}
|
|
|
|
{{objdump -fdw farcall-mixed-app-v5.d} {objdump -Rw farcall-mixed-app.r}
|
|
|
|
{readelf -Ds farcall-mixed-app.sym}}
|
|
|
|
"farcall-mixed-app-v5"}
|
2009-04-17 13:04:41 +00:00
|
|
|
|
|
|
|
{"Mixed ARM/Thumb shared library with long branches" "-shared -T arm-lib.ld" ""
|
|
|
|
{farcall-mixed-lib1.s farcall-mixed-lib2.s}
|
|
|
|
{{objdump -fdw farcall-mixed-lib.d}}
|
|
|
|
"farcall-mixed-lib.so"}
|
|
|
|
|
2009-12-09 21:42:00 +00:00
|
|
|
{"Long branch with mixed text and data" "-T arm.ld" "" {farcall-data.s}
|
|
|
|
{{objdump -dr farcall-data.d}}
|
|
|
|
"farcall-data"}
|
2010-02-01 10:33:16 +00:00
|
|
|
|
|
|
|
{"R_ARM_THM_JUMP24 Relocation veneers: Short 1"
|
|
|
|
"-defsym _start=0x8000 --section-start destsect=0x00009000"
|
|
|
|
"-march=armv7-a -mthumb"
|
|
|
|
{jump-reloc-veneers.s}
|
|
|
|
{{objdump -d jump-reloc-veneers-short1.d}}
|
|
|
|
"jump-reloc-veneers-short1"}
|
|
|
|
{"R_ARM_THM_JUMP24 Relocation veneers: Short 2"
|
|
|
|
"-defsym _start=0x8000 --section-start destsect=0x00900000"
|
|
|
|
"-march=armv7-a -mthumb"
|
|
|
|
{jump-reloc-veneers.s}
|
|
|
|
{{objdump -d jump-reloc-veneers-short2.d}}
|
|
|
|
"jump-reloc-veneers-short2"}
|
|
|
|
{"R_ARM_THM_JUMP24 Relocation veneers: Long"
|
|
|
|
"-defsym _start=0x8000 --section-start destsect=0x09000000"
|
|
|
|
"-march=armv7-a -mthumb"
|
|
|
|
{jump-reloc-veneers.s}
|
|
|
|
{{objdump -d jump-reloc-veneers-long.d}}
|
|
|
|
"jump-reloc-veneers-long"}
|
2004-01-06 21:47:38 +00:00
|
|
|
}
|
|
|
|
|
2008-05-28 15:38:36 +00:00
|
|
|
run_ld_link_tests $armeabitests
|
bfd:
* bfd-in.h (bfd_elf32_arm_set_target_relocs): Add new parameter.
* bfd-in2.h: Regenerate.
* elf32-arm.c (struct elf_arm_obj_tdata): Add field
no_wchar_size_warning.
(bfd_elf32_arm_set_target_relocs): Add new parameter
no_wchar_warn.
(elf32_arm_merge_eabi_attributes): Give a warning, not an error,
for conflicting wchar_t attributes. Do not warn if
--no-wchar-size-warning. Make diagnostic text more specific.
ld:
* ld.texinfo (--no-wchar-size-warning): Document new ARM option.
* emultempl/armelf.em (no_wchar_size_warning): New.
(arm_elf_create_output_section_statements): Pass
no_wchar_size_warning to arm_elf_create_output_section_statements.
(OPTION_NO_WCHAR_SIZE_WARNING): New.
(PARSE_AND_LIST_LONGOPTS): Add no-wchar-size-warning.
(PARSE_AND_LIST_OPTIONS): List --no-wchar-size-warning.
(PARSE_AND_LIST_ARGS_CASES): Handle --no-wchar-size-warning.
ld/testsuite:
* ld-arm/attr-merge-wchar-0.s,ld-arm/attr-merge-wchar-2.s,
ld-arm/attr-merge-wchar-4.s, ld-arm/attr-merge-wchar-00-nowarn.d,
ld-arm/attr-merge-wchar-00.d, ld-arm/attr-merge-wchar-02-nowarn.d,
ld-arm/attr-merge-wchar-02.d, ld-arm/attr-merge-wchar-04-nowarn.d,
ld-arm/attr-merge-wchar-04.d, ld-arm/attr-merge-wchar-20-nowarn.d,
ld-arm/attr-merge-wchar-20.d, ld-arm/attr-merge-wchar-22-nowarn.d,
ld-arm/attr-merge-wchar-22.d, ld-arm/attr-merge-wchar-24-nowarn.d,
ld-arm/attr-merge-wchar-24.d, ld-arm/attr-merge-wchar-40-nowarn.d,
ld-arm/attr-merge-wchar-40.d, ld-arm/attr-merge-wchar-42-nowarn.d,
ld-arm/attr-merge-wchar-42.d, ld-arm/attr-merge-wchar-44-nowarn.d,
ld-arm/attr-merge-wchar-44.d: New.
* ld-arm/arm-elf.exp: Run new tests.
2008-07-18 20:49:12 +00:00
|
|
|
run_dump_test "attr-merge-wchar-00"
|
|
|
|
run_dump_test "attr-merge-wchar-02"
|
|
|
|
run_dump_test "attr-merge-wchar-04"
|
|
|
|
run_dump_test "attr-merge-wchar-20"
|
|
|
|
run_dump_test "attr-merge-wchar-22"
|
|
|
|
run_dump_test "attr-merge-wchar-24"
|
|
|
|
run_dump_test "attr-merge-wchar-40"
|
|
|
|
run_dump_test "attr-merge-wchar-42"
|
|
|
|
run_dump_test "attr-merge-wchar-44"
|
|
|
|
run_dump_test "attr-merge-wchar-00-nowarn"
|
|
|
|
run_dump_test "attr-merge-wchar-02-nowarn"
|
|
|
|
run_dump_test "attr-merge-wchar-04-nowarn"
|
|
|
|
run_dump_test "attr-merge-wchar-20-nowarn"
|
|
|
|
run_dump_test "attr-merge-wchar-22-nowarn"
|
|
|
|
run_dump_test "attr-merge-wchar-24-nowarn"
|
|
|
|
run_dump_test "attr-merge-wchar-40-nowarn"
|
|
|
|
run_dump_test "attr-merge-wchar-42-nowarn"
|
|
|
|
run_dump_test "attr-merge-wchar-44-nowarn"
|
2008-05-23 13:53:27 +00:00
|
|
|
run_dump_test "farcall-section"
|
2009-01-19 12:20:15 +00:00
|
|
|
run_dump_test "attr-merge-unknown-1"
|
|
|
|
run_dump_test "attr-merge-unknown-2"
|
|
|
|
run_dump_test "attr-merge-unknown-2r"
|
|
|
|
run_dump_test "attr-merge-unknown-3"
|
2009-05-05 14:18:30 +00:00
|
|
|
run_dump_test "unwind-1"
|
|
|
|
run_dump_test "unwind-2"
|
|
|
|
run_dump_test "unwind-3"
|
|
|
|
run_dump_test "unwind-4"
|
2009-05-15 00:08:12 +00:00
|
|
|
run_dump_test "unwind-5"
|
2009-11-02 Paul Brook <paul@codesourcery.com>
ld/testsuite/
* ld-arm/arm-elf.exp: Add new attr-merge-vfp tests.
* ld-arm/attr-merge-vfp-1.d: New test.
* ld-arm/attr-merge-vfp-1r.d: New test.
* ld-arm/attr-merge-vfp-2.d: New test.
* ld-arm/attr-merge-vfp-2r.d: New test.
* ld-arm/attr-merge-vfp-3.d: New test.
* ld-arm/attr-merge-vfp-3r.d: New test.
* ld-arm/attr-merge-vfp-4.d: New test.
* ld-arm/attr-merge-vfp-4r.d: New test.
* ld-arm/attr-merge-vfp-5.d: New test.
* ld-arm/attr-merge-vfp-5r.d: New test.
* ld-arm/attr-merge-vfp-2.s: New test.
* ld-arm/attr-merge-vfp-3.s: New test.
* ld-arm/attr-merge-vfp-3-d16.s: New test.
* ld-arm/attr-merge-vfp-4.s: New test.
* ld-arm/attr-merge-vfp-4-d16.s: New test.
gas/
* doc/c-arm.texi: Document new -mfpu options.
* config/tc-arm.c (fpu_vfp_ext_v3xd, fpu_vfp_fp16, fpu_neon_ext_fma,
fpu_vfp_ext_fma): New.
(NEON_ENC_TAB): Add vfma, vfms, vfnma and vfnms.
(do_vfp_nsyn_fma_fms, do_neon_fmac): New functions.
(insns): Move double precision load/store. Split out double
precision VFPv3 instrucitons. Add VFPv4 instructions.
(arm_fpus): Add VFPv3-FP16, VFPv3xD and VFPv4 variants.
(aeabi_set_public_attributes): Set VFPv4 variants
gas/testsuite/
* gas/arm/attr-mfpu-vfpv4.d: New test.
* gas/arm/attr-mfpu-vfpv4-d16.d: New test.
* gas/arm/neon-fma-cov.d: New test.
* gas/arm/neon-fma-cov.s: New test.
* gas/arm/vfp-fma-inc.s: New test.
* gas/arm/vfp-fma-arm.d: New test.
* gas/arm/vfp-fma-arm.s: New test.
* gas/arm/vfp-fma-thumb.d: New test.
* gas/arm/vfp-fma-thumb.s: New test.
* gas/arm/vfma1.d: New test.
* gas/arm/vfma1.s: New test.
* gas/arm/vfpv3xd.d: New test.
* gas/arm/vfpv3xd.s: New test.
include/opcode/
* arm.h (FPU_VFP_EXT_V3xD, FPU_VFP_EXT_FP16, FPU_NEON_EXT_FMA,
FPU_VFP_EXT_FMA, FPU_VFP_V3xD, FPU_VFP_V4D16, FPU_VFP_V4): Define.
(FPU_ARCH_VFP_V3D16_FP16, FPU_ARCH_VFP_V3_FP16, FPU_ARCH_VFP_V3xD,
FPU_ARCH_VFP_V3xD_FP16, FPU_ARCH_VFP_V4, FPU_ARCH_VFP_V4D16,
FPU_ARCH_NEON_VFP_V4): Define.
binutils/
* readelf.c (arm_attr_tag_VFP_arch): Add VFPv4 and VFPv4-D16.
bfd/
* elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle VFPv4
attributes.
opcodes/
* arm-dis.c (coprocessor_opcodes): Update to use new feature flags.
Add VFPv4 instructions.
2009-11-02 13:44:05 +00:00
|
|
|
run_dump_test "attr-merge-vfp-1"
|
|
|
|
run_dump_test "attr-merge-vfp-1r"
|
|
|
|
run_dump_test "attr-merge-vfp-2"
|
|
|
|
run_dump_test "attr-merge-vfp-2r"
|
|
|
|
run_dump_test "attr-merge-vfp-3"
|
|
|
|
run_dump_test "attr-merge-vfp-3r"
|
|
|
|
run_dump_test "attr-merge-vfp-4"
|
|
|
|
run_dump_test "attr-merge-vfp-4r"
|
|
|
|
run_dump_test "attr-merge-vfp-5"
|
|
|
|
run_dump_test "attr-merge-vfp-5r"
|