old-cross-binutils/ld/testsuite/ld-arm
Laurent Alfonsi a504d23a83 Add --fix-stm32l4xx-629360 to the ARM linker to enable a link-time workaround for a bug in the bus matrix / memory controller for some of the STM32 Cortex-M4 based products (STM32L4xx).
bfd  * bfd-in2.h: Regenerate.
     * bfd-in.h (bfd_arm_stm32l4xx_fix): New enum. Specify how
     STM32L4XX instruction scanning should be done.
     (bfd_elf32_arm_set_stm32l4xx_fix)
     (bfd_elf32_arm_stm32l4xx_erratum_scan)
     (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): Add prototypes.
     (bfd_elf32_arm_set_target_relocs): Add stm32l4xx fix type argument
     to prototype.
     * elf32-arm.c (STM32L4XX_ERRATUM_VENEER_SECTION_NAME)
     (STM32L4XX_ERRATUM_VENEER_ENTRY_NAME): Define macros.
     (elf32_stm32l4xx_erratum_type): New enum.
     (elf32_stm32l4xx_erratum_list): New struct. List of veneers or
     jumps to veneers.
     (_arm_elf_section_data): Add stm32l4xx_erratumcount,
     stm32l4xx_erratumlist.
     (elf32_arm_link_hash_table): Add stm32l4xx_erratum_glue_size,
     stm32l4xx_fix and num_stm32l4xx_fixes fields.
     (ctz): New function.
     (popcount): New function.
     (elf32_arm_link_hash_table_create): Initialize stm32l4xx_fix.
     (put_thumb2_insn): New function.
     (STM32L4XX_ERRATUM_LDM_VENEER_SIZE): Define. Size of a veneer for
     LDM instructions.
     (STM32L4XX_ERRATUM_VLDM_VENEER_SIZE): Define. Size of a veneer for
     VLDM instructions.
     (bfd_elf32_arm_allocate_interworking_sections): Initialise erratum
     glue section.
     (record_stm32l4xx_erratum_veneer) : New function. Create a single
     veneer, and its associated symbols.
     (bfd_elf32_arm_add_glue_sections_to_bfd): Add STM32L4XX erratum glue.
     (bfd_elf32_arm_set_stm32l4xx_fix): New function. Set the type of
     erratum workaround required.
     (bfd_elf32_arm_stm32l4xx_fix_veneer_locations): New function. Find
     out where veneers and branches to veneers have been placed in
     virtual memory after layout.
     (is_thumb2_ldmia): New function.
     (is_thumb2_ldmdb): Likewise.
     (is_thumb2_vldm ): Likewise.
     (stm32l4xx_need_create_replacing_stub): New function. Decide if a
     veneer must be emitted.
     (bfd_elf32_arm_stm32l4xx_erratum_scan): Scan the sections of an
     input BFD for potential erratum-triggering insns. Record results.
     (bfd_elf32_arm_set_target_relocs): Set stm32l4xx_fix field in
     global hash table.
     (elf32_arm_size_dynamic_sections): Collect glue information.
     (create_instruction_branch_absolute): New function.
     (create_instruction_ldmia): Likewise.
     (create_instruction_ldmdb): Likewise.
     (create_instruction_mov): Likewise.
     (create_instruction_sub): Likewise.
     (create_instruction_vldmia): Likewise.
     (create_instruction_vldmdb): Likewise.
     (create_instruction_udf_w): Likewise.
     (create_instruction_udf): Likewise.
     (push_thumb2_insn32): Likewise.
     (push_thumb2_insn16): Likewise.
     (stm32l4xx_fill_stub_udf): Likewise.
     (stm32l4xx_create_replacing_stub_ldmia): New function. Expands the
     replacing stub for ldmia instructions.
     (stm32l4xx_create_replacing_stub_ldmdb): Likewise for ldmdb.
     (stm32l4xx_create_replacing_stub_vldm): Likewise for vldm.
     (stm32l4xx_create_replacing_stub): New function. Dispatches the
     stub emission to the appropriate functions.
     (elf32_arm_write_section): Output veneers, and branches to veneers.

ld   * ld.texinfo: Description of the STM32L4xx erratum workaround.
     * emultempl/armelf.em (stm32l4xx_fix): New.
     (arm_elf_before_allocation): Choose the type of fix, scan for
     erratum.
     (gld${EMULATION_NAME}_finish): Fix veneer locations.
     (arm_elf_create_output_section_statements): Propagate
     stm32l4xx_fix value.
     (PARSE_AND_LIST_PROLOGUE): Define OPTION_STM32L4XX_FIX.
     (PARSE_AND_LIST_LONGOPTS): Add entry for handling
     --fix-stm32l4xx-629360.
     (PARSE_AND_LIST_OPTION): Add entry for helping on
     --fix-stm32l4xx-629360.
     (PARSE_AND_LIST_ARGS_CASES): Treat OPTION_STM32L4XX_FIX.

tests * ld-arm/arm-elf.exp (armelftests_common): Add STM32L4XX
       tests.
     * ld-arm/stm32l4xx-cannot-fix-far-ldm.d: New.
     * ld-arm/stm32l4xx-cannot-fix-far-ldm.s: Likewise.
     * ld-arm/stm32l4xx-cannot-fix-it-block.d: Likewise.
     * ld-arm/stm32l4xx-cannot-fix-it-block.s: Likewise.
     * ld-arm/stm32l4xx-fix-all.d: Likewise.
     * ld-arm/stm32l4xx-fix-all.s: Likewise.
     * ld-arm/stm32l4xx-fix-it-block.d: Likewise.
     * ld-arm/stm32l4xx-fix-it-block.s: Likewise.
     * ld-arm/stm32l4xx-fix-ldm.d: Likewise.
     * ld-arm/stm32l4xx-fix-ldm.s: Likewise.
     * ld-arm/stm32l4xx-fix-vldm.d: Likewise.
     * ld-arm/stm32l4xx-fix-vldm.s: Likewise.
2015-10-27 13:20:33 +00:00
..
abs-call-1.d
abs-call-1.s
arch-v6.s
arch-v6k.s
arch-v6t2.s
arm-app-abs32.d
arm-app-abs32.r
arm-app-abs32.s
arm-app-movw.s
arm-app.d
arm-app.r
arm-app.s
arm-be8.d
arm-be8.s
arm-call.d
arm-call1.s
arm-call2.s
arm-dyn.ld
arm-elf.exp
arm-export-class.rd
arm-export-class.xd
arm-lib-plt-2.dd
arm-lib-plt-2.rd
arm-lib-plt-2a.s
arm-lib-plt-2b.s
arm-lib-plt32.d
arm-lib-plt32.r
arm-lib-plt32.s
arm-lib.d
arm-lib.ld
arm-lib.r
arm-lib.s
arm-movwt.d
arm-movwt.s
arm-no-rel-plt.ld
arm-no-rel-plt.out
arm-pic-veneer.d
arm-pic-veneer.s
arm-rel31.d
arm-rel31.s
arm-rel32.d
arm-rel32.s
arm-static-app.d
arm-static-app.r
arm-static-app.s
arm-target1-abs.d
arm-target1-rel.d
arm-target1.s
arm-target2-abs.d
arm-target2-got-rel.d
arm-target2-rel.d
arm-target2.s
arm.ld
armthumb-lib.d
armthumb-lib.sym
armv4-bx.d
armv4-bx.s
attr-merge-2.attr
attr-merge-2a.s
attr-merge-2b.s
attr-merge-3.attr
attr-merge-3a.s
attr-merge-3b.s
attr-merge-4.attr
attr-merge-4a.s
attr-merge-4b.s
attr-merge-5.attr
attr-merge-5.s
attr-merge-6.attr
attr-merge-6a.s
attr-merge-6b.s
attr-merge-7.attr
attr-merge-7a.s
attr-merge-7b.s
attr-merge-arch-1.attr
attr-merge-arch-2.attr
attr-merge-arch-2.d
attr-merge-arch-2a.s
attr-merge-arch-2b.s
attr-merge-div-00.d
attr-merge-div-0.s
attr-merge-div-01-m3.d
attr-merge-div-01.d
attr-merge-div-1.s
attr-merge-div-02.d
attr-merge-div-2.s
attr-merge-div-10-m3.d
attr-merge-div-10.d
attr-merge-div-11.d
attr-merge-div-12.d
attr-merge-div-20.d
attr-merge-div-21.d
attr-merge-div-22.d
attr-merge-div-120.d
attr-merge-hardfp-use-1.d
attr-merge-hardfp-use-1a.s
attr-merge-hardfp-use-1b.s
attr-merge-hardfp-use-2.d
attr-merge-hardfp-use-2a.s
attr-merge-hardfp-use-2b.s
attr-merge-incompatible.d
attr-merge-incompatiblea.s
attr-merge-incompatibleb.s
attr-merge-nosection-1.d
attr-merge-nosection-1a.s
attr-merge-nosection-1b.s
attr-merge-unknown-1.d
attr-merge-unknown-1.s
attr-merge-unknown-2.d
attr-merge-unknown-2.s
attr-merge-unknown-2r.d
attr-merge-unknown-3.d
attr-merge-vfp-1.d
attr-merge-vfp-1r.d
attr-merge-vfp-2.d
attr-merge-vfp-2.s
attr-merge-vfp-2r.d
attr-merge-vfp-3-d16.s
attr-merge-vfp-3.d
attr-merge-vfp-3.s
attr-merge-vfp-3r.d
attr-merge-vfp-4-d16.s
attr-merge-vfp-4-sp.s
attr-merge-vfp-4.d
attr-merge-vfp-4.s
attr-merge-vfp-4r.d
attr-merge-vfp-5-sp.s
attr-merge-vfp-5.d
attr-merge-vfp-5.s
attr-merge-vfp-5r.d
attr-merge-vfp-6.d
attr-merge-vfp-6r.d
attr-merge-vfp-7.d
attr-merge-vfp-7r.d
attr-merge-vfp-8.d
attr-merge-vfp-8r.d
attr-merge-vfp-9.d
attr-merge-vfp-9r.d
attr-merge-vfp-10.d
attr-merge-vfp-10r.d
attr-merge-vfp-11.d
attr-merge-vfp-11r.d
attr-merge-vfp-12.d
attr-merge-vfp-12r.d
attr-merge-vfp-13.d
attr-merge-vfp-13r.d
attr-merge-vfp-14.d
attr-merge-vfp-14r.d
attr-merge-vfp-armv8-hard.s
attr-merge-vfp-armv8.s
attr-merge-vfpv3xd.s
attr-merge-wchar-00-nowarn.d
attr-merge-wchar-00.d
attr-merge-wchar-0.s
attr-merge-wchar-02-nowarn.d
attr-merge-wchar-02.d
attr-merge-wchar-2.s
attr-merge-wchar-04-nowarn.d
attr-merge-wchar-04.d
attr-merge-wchar-4.s
attr-merge-wchar-20-nowarn.d
attr-merge-wchar-20.d
attr-merge-wchar-22-nowarn.d
attr-merge-wchar-22.d
attr-merge-wchar-24-nowarn.d
attr-merge-wchar-24.d
attr-merge-wchar-40-nowarn.d
attr-merge-wchar-40.d
attr-merge-wchar-42-nowarn.d
attr-merge-wchar-42.d
attr-merge-wchar-44-nowarn.d
attr-merge-wchar-44.d
attr-merge.attr
attr-merge.s
blank.s
branch-lks-sym.ld
callweak-2.d
callweak-2.s
callweak.d
callweak.s
cortex-a8-arm-target.s
cortex-a8-far-1.s
cortex-a8-far-2.s
cortex-a8-far-3.s
cortex-a8-far.d
cortex-a8-fix-b-plt.d
cortex-a8-fix-b-plt.s
cortex-a8-fix-b-rel-arm.d
cortex-a8-fix-b-rel-thumb.d
cortex-a8-fix-b-rel.s
cortex-a8-fix-b.d
cortex-a8-fix-b.s
cortex-a8-fix-bcc-plt.d
cortex-a8-fix-bcc-plt.s
cortex-a8-fix-bcc-rel-thumb.d
cortex-a8-fix-bcc-rel.s
cortex-a8-fix-bcc.d
cortex-a8-fix-bcc.s
cortex-a8-fix-bl-plt.d
cortex-a8-fix-bl-plt.s
cortex-a8-fix-bl-rel-arm.d
cortex-a8-fix-bl-rel-plt.d
cortex-a8-fix-bl-rel-thumb.d
cortex-a8-fix-bl-rel.s
cortex-a8-fix-bl.d
cortex-a8-fix-bl.s
cortex-a8-fix-blx-bcond.d
cortex-a8-fix-blx-bcond.s
cortex-a8-fix-blx-plt.d
cortex-a8-fix-blx-plt.s
cortex-a8-fix-blx-rel-arm.d
cortex-a8-fix-blx-rel-thumb.d
cortex-a8-fix-blx-rel.s
cortex-a8-fix-blx.d
cortex-a8-fix-blx.s
cortex-a8-fix-hdr.d
cortex-a8-fix-hdr.s
cortex-a8-fix-hdr.t
cortex-a8-fix-plt.ld
cortex-a8-thumb-target.s
data-only-map.d
data-only-map.ld
data-only-map.s
discard-unwind.ld
eabi-hard-float.d
eabi-hard-float.s
eabi-soft-float-ABI4.d
eabi-soft-float-r.d
eabi-soft-float.d
eabi-soft-float.s
emit-relocs1-vxworks.d
emit-relocs1.d
emit-relocs1.s
exec-got-1.d
exec-got-1a.s
exec-got-1b.s
export-class.exp
farcall-arm-arm-pic-veneer.d
farcall-arm-arm.d
farcall-arm-arm.s
farcall-arm-nacl-pic.d
farcall-arm-nacl.d
farcall-arm-thumb-blx-pic-veneer.d
farcall-arm-thumb-blx.d
farcall-arm-thumb-pic-veneer.d
farcall-arm-thumb.d
farcall-arm-thumb.s
farcall-cond-thumb-arm.d
farcall-cond-thumb-arm.s
farcall-data-nacl.d
farcall-data.d
farcall-data.s
farcall-group-limit.d
farcall-group-size2.d
farcall-group.d
farcall-group.s
farcall-group2.s
farcall-group3.s
farcall-group4.s
farcall-mix.d
farcall-mix.s
farcall-mix2.d
farcall-mix2.s
farcall-mixed-app-v5.d
farcall-mixed-app.d
farcall-mixed-app.r
farcall-mixed-app.s
farcall-mixed-app.sym
farcall-mixed-lib-v4t.d
farcall-mixed-lib.d
farcall-mixed-lib.r
farcall-mixed-lib1.s
farcall-mixed-lib2.s
farcall-section.d
farcall-section.s
farcall-thumb-arm-blx-pic-veneer.d
farcall-thumb-arm-blx.d
farcall-thumb-arm-pic-veneer.d
farcall-thumb-arm-short.d
farcall-thumb-arm-short.s
farcall-thumb-arm.d
farcall-thumb-arm.s
farcall-thumb-thumb-blx-pic-veneer.d
farcall-thumb-thumb-blx.d
farcall-thumb-thumb-m-pic-veneer.d
farcall-thumb-thumb-m.d
farcall-thumb-thumb-pic-veneer.d
farcall-thumb-thumb.d
farcall-thumb-thumb.s
fix-arm1176-off.d
fix-arm1176-on.d
fix-arm1176.s
gc-hidden-1.d
gc-thumb-lib.s
gc-thumb.d
gc-thumb.s
gc-unwind.d
gc-unwind.s
gcdfn.s
group-relocs-alu-bad-2.d
group-relocs-alu-bad-2.s
group-relocs-alu-bad.d
group-relocs-alu-bad.s
group-relocs-ldc-bad-2.d
group-relocs-ldc-bad-2.s
group-relocs-ldc-bad.d
group-relocs-ldc-bad.s
group-relocs-ldr-bad-2.d
group-relocs-ldr-bad-2.s
group-relocs-ldr-bad.d
group-relocs-ldr-bad.s
group-relocs-ldrs-bad-2.d
group-relocs-ldrs-bad-2.s
group-relocs-ldrs-bad.d
group-relocs-ldrs-bad.s
group-relocs.d
group-relocs.s
hideall.ld
hidfn.s
ifunc-1.dd
ifunc-1.gd
ifunc-1.rd
ifunc-1.s
ifunc-2.dd
ifunc-2.gd
ifunc-2.rd
ifunc-2.s
ifunc-3.dd
ifunc-3.gd
ifunc-3.rd
ifunc-3.s
ifunc-4.dd
ifunc-4.gd
ifunc-4.rd
ifunc-4.s
ifunc-5.dd
ifunc-5.gd
ifunc-5.rd
ifunc-5.s
ifunc-6.dd
ifunc-6.gd
ifunc-6.rd
ifunc-6.s
ifunc-7.dd
ifunc-7.gd
ifunc-7.rd
ifunc-7.s
ifunc-8.dd
ifunc-8.gd
ifunc-8.rd
ifunc-8.s
ifunc-9.dd
ifunc-9.gd
ifunc-9.rd
ifunc-9.s
ifunc-10.dd
ifunc-10.gd
ifunc-10.rd
ifunc-10.s
ifunc-11.dd
ifunc-11.gd
ifunc-11.rd
ifunc-11.s
ifunc-12.dd
ifunc-12.gd
ifunc-12.rd
ifunc-12.s
ifunc-13.dd
ifunc-13.gd
ifunc-13.rd
ifunc-13.s
ifunc-14.dd
ifunc-14.gd
ifunc-14.rd
ifunc-14.s
ifunc-15.dd
ifunc-15.gd
ifunc-15.rd
ifunc-15.s
ifunc-16.dd
ifunc-16.gd
ifunc-16.rd
ifunc-16.s
ifunc-17.dd
ifunc-17.gd
ifunc-17.rd
ifunc-17.s
ifunc-dynamic.ld
ifunc-gdesc.r
ifunc-gdesc.s
ifunc-gdesc.ver
ifunc-static.ld
jump-reloc-veneers-cond-long-backward.d
jump-reloc-veneers-cond-long.d
jump-reloc-veneers-cond-short-backward.d
jump-reloc-veneers-cond-short.d
jump-reloc-veneers-cond.s
jump-reloc-veneers-long.d
jump-reloc-veneers-short1.d
jump-reloc-veneers-short2.d
jump-reloc-veneers.s
jump19.d
jump19.s
long-plt-format.d
long-plt-format.s
main.s
mixed-app-v5.d
mixed-app.d
mixed-app.r
mixed-app.s
mixed-app.sym
mixed-lib.d
mixed-lib.r
mixed-lib.s
mixed-lib.sym
movw-merge.d
movw-merge.s
movw-shared-1.d
movw-shared-1.s
movw-shared-2.d
movw-shared-2.s
movw-shared-3.d
movw-shared-3.s
movw-shared-4.d
movw-shared-4.s
pcrel-shared.rd
pcrel-shared.s
preempt-app.s
preempt-app.sym
protected-data.d
protected-data.s
rel32-reject-pie.d
rel32-reject-pie.s
rel32-reject.d
rel32-reject.s
reloc-boundaries.d
reloc-boundaries.s
rodata-merge-map.ld
rodata-merge-map.sym
rodata-merge-map1.s
rodata-merge-map2.s
rodata-merge-map3.s
script-type.ld
script-type.s
script-type.sym
stm32l4xx-cannot-fix-far-ldm.d
stm32l4xx-cannot-fix-far-ldm.s
stm32l4xx-cannot-fix-it-block.d
stm32l4xx-cannot-fix-it-block.s
stm32l4xx-fix-all.d
stm32l4xx-fix-all.s
stm32l4xx-fix-it-block.d
stm32l4xx-fix-it-block.s
stm32l4xx-fix-ldm.d
stm32l4xx-fix-ldm.s
stm32l4xx-fix-vldm.d
stm32l4xx-fix-vldm.s
symbian-seg1.d
symbian-seg1.s
thumb-b-lks-sym.d
thumb-b-lks-sym.s
thumb-bl-lks-sym.d
thumb-bl-lks-sym.s
thumb-entry.d
thumb-entry.s
thumb-rel32.d
thumb-rel32.s
thumb1-bl.d
thumb1-bl.s
thumb2-b-interwork.d
thumb2-b-interwork.s
thumb2-bl-as-thumb1-bad-noeabi.d
thumb2-bl-as-thumb1-bad.d
thumb2-bl-as-thumb1-bad.s
thumb2-bl-bad-noeabi.d
thumb2-bl-bad.d
thumb2-bl-bad.s
thumb2-bl-blx-interwork.d
thumb2-bl-blx-interwork.s
thumb2-bl-undefweak.d
thumb2-bl-undefweak.s
thumb2-bl-undefweak1.d
thumb2-bl-undefweak1.s
thumb2-bl.d
thumb2-bl.s
tls-app.d
tls-app.r
tls-app.s
tls-descrelax-be8.d
tls-descrelax-be8.s
tls-descrelax-be32.d
tls-descrelax-be32.s
tls-descrelax-v7.d
tls-descrelax-v7.s
tls-descrelax.d
tls-descrelax.s
tls-descseq.d
tls-descseq.r
tls-descseq.s
tls-gdesc-got.d
tls-gdesc-got.s
tls-gdesc-nlazy.g
tls-gdesc-nlazy.s
tls-gdesc.d
tls-gdesc.r
tls-gdesc.s
tls-gdierelax.d
tls-gdierelax.s
tls-gdierelax2.d
tls-gdierelax2.s
tls-gdlerelax.d
tls-gdlerelax.s
tls-lib-loc.d
tls-lib-loc.r
tls-lib-loc.s
tls-lib.d
tls-lib.r
tls-lib.s
tls-local-static.d
tls-local-static.s
tls-longplt-lib.d
tls-longplt-lib.s
tls-longplt.d
tls-longplt.s
tls-mixed.r
tls-mixed.s
tls-thumb1.d
tls-thumb1.s
unresolved-1-dyn.d
unresolved-1.d
unresolved-1.s
unresolved-2.d
unresolved-2.s
unwind-1.d
unwind-1.s
unwind-2.d
unwind-2.s
unwind-3.d
unwind-3.s
unwind-4.d
unwind-4.s
unwind-5.d
unwind-5.s
use-thumb-lib.s
use-thumb-lib.sym
vfp11-fix-none.d
vfp11-fix-none.s
vfp11-fix-scalar.d
vfp11-fix-scalar.s
vfp11-fix-vector.d
vfp11-fix-vector.s
vxworks1-lib.dd
vxworks1-lib.nd
vxworks1-lib.rd
vxworks1-lib.s
vxworks1-lib.td
vxworks1-static.d
vxworks1.dd
vxworks1.ld
vxworks1.rd
vxworks1.s
vxworks2-static.sd
vxworks2.s
vxworks2.sd