2008-02-20 Paul Brook <paul@codesourcery.com>
commit01f470d7d9f7d44e25af75152560357a3a273607
authorPaul Brook <paul@codesourcery.com>
Wed, 20 Feb 2008 15:17:56 +0000 (20 15:17 +0000)
committerPaul Brook <paul@codesourcery.com>
Wed, 20 Feb 2008 15:17:56 +0000 (20 15:17 +0000)
tree88137c45971e3d8757584f5a89e52b8d50d566c1
parentc62e151251d4b1d572b309c5343ef4856e9719f0
2008-02-20  Paul Brook  <paul@codesourcery.com>

ld/
* emultempl/armelf.em (OPTION_FIX_V4BX_INTERWORKING): Define.
(PARSE_AND_LIST_LONGOPTS): Add fix-v4bx-interworking.
(PARSE_AND_LIST_OPTIONS): Ditto.
(PARSE_AND_LIST_ARGS_CASES): Handle OPTION_FIX_V4BX_INTERWORKING.
* emulparams/armelf.sh (OTHER_TEXT_SECTIONS): Add .v4_bx.
* emulparams/armelf_linux.sh (OTHER_TEXT_SECTIONS): Ditto.
* emulparams/armnto.sh (OTHER_TEXT_SECTIONS): Ditto.
* ld.texinfo: Document --fix-v4bx-interworking.

ld/testsuite/
* ld-arm/armv4-bx.d: New test.
* ld-arm/armv4-bx.s: New test.
* ld-arm/arm.ld: Add .v4bx.
* ld-arm/arm-elf.exp: Add armv4-bx.

gas/testsuite/
* gas/arm/thumb.d: Exclude EABI targets.
* gas/arm/arch4t.d: Exclude EABI targts.
* gas/arm/v4bx.d: New test.
* gas/arm/v4bx.s: New test.
* gas/arm/thumb-eabi.d: New test.
* gas/arm/arch4t-eabi.d: New test.

gas/
* config/tc-arm.c (fix_v4bx): New variable.
(do_bx): Generate V4BX relocations.
(md_assemble): Allow bx on v4 codes when fix_v4bx.
(md_apply_fix): Handle BFD_RELOC_ARM_V4BX.
(tc_gen_reloc): Ditto.
(OPTION_FIX_V4BX): Define.
(md_longopts): Add fix-v4bx.
(md_parse_option): Handle OPTION_FIX_V4BX.
(md_show_usage): Document --fix-v4bx.
* doc/c-arm.texi: Document --fix-v4bx.

bfd/
* reloc.c: Add BFD_RELOC_ARM_V4BX.
* elf32-arm.c (elf32_arm_reloc_map): Add BFD_RELOC_ARM_V4BX.
(ARM_BX_GLUE_SECTION_NAME, ARM_BX_GLUE_SECTION_NAME): Define.
(elf32_arm_link_hash_table): Add bx_glue_size and bx_glue_offset.
Update comment for fix_v4bx.
(elf32_arm_link_hash_table_create): Zero bx_glue_size and
bx_glue_offset.
(ARM_BX_VENEER_SIZE, armbx1_tst_insn, armbx2_moveq_insn,
armbx3_bx_insn): New.
(bfd_elf32_arm_allocate_interworking_sections): Allocate BX veneer
section.
(bfd_elf32_arm_add_glue_sections_to_bfd): Ditto.
(bfd_elf32_arm_process_before_allocation): Record BX veneers.
(record_arm_bx_glue, elf32_arm_bx_glue): New functions.
(elf32_arm_final_link_relocate): Handle BX veneers.
(elf32_arm_output_arch_local_syms): Output mapping symbol for .v4_bx.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
21 files changed:
bfd/bfd-in2.h
bfd/elf32-arm.c
bfd/libbfd.h
bfd/reloc.c
gas/config/tc-arm.c
gas/doc/c-arm.texi
gas/testsuite/gas/arm/arch4t-eabi.d [copied from gas/testsuite/gas/arm/arch4t.d with 90% similarity]
gas/testsuite/gas/arm/arch4t.d
gas/testsuite/gas/arm/thumb-eabi.d [copied from gas/testsuite/gas/arm/thumb.d with 98% similarity]
gas/testsuite/gas/arm/thumb.d
gas/testsuite/gas/arm/v4bx.d [new file with mode: 0644]
gas/testsuite/gas/arm/v4bx.s [new file with mode: 0644]
ld/emulparams/armelf.sh
ld/emulparams/armelf_linux.sh
ld/emulparams/armnto.sh
ld/emultempl/armelf.em
ld/ld.texinfo
ld/testsuite/ld-arm/arm-elf.exp
ld/testsuite/ld-arm/arm.ld
ld/testsuite/ld-arm/armv4-bx.d [new file with mode: 0644]
ld/testsuite/ld-arm/armv4-bx.s [new file with mode: 0644]