diff options
author | Andrew Stubbs <andrew.stubbs@st.com> | 2009-01-19 12:20:15 +0000 |
---|---|---|
committer | Andrew Stubbs <andrew.stubbs@st.com> | 2009-01-19 12:20:15 +0000 |
commit | d237ce74f43bde3178d76506f7d0a9b955eb1561 (patch) | |
tree | cec3e959ce4d0414be96d78c85edccafcf78ed32 /ld | |
parent | 5aa6ff7ca4d5209dece43cf89fa5750f5dcaa033 (diff) | |
download | fsf-binutils-gdb-d237ce74f43bde3178d76506f7d0a9b955eb1561.zip fsf-binutils-gdb-d237ce74f43bde3178d76506f7d0a9b955eb1561.tar.gz fsf-binutils-gdb-d237ce74f43bde3178d76506f7d0a9b955eb1561.tar.bz2 |
2009-01-19 Andrew Stubbs <ams@codesourcery.com>
ld/testsuite/
* ld-arm/arm-elf.exp (armeabitests): Add EABI attribute merging 3,
EABI attribute merging 4, and EABI attribute merging 5,
EABI attribute arch merging 1, EABI attribute arch merging 1 reversed,
EABI attribute arch merging 2, EABI attribute arch merging 2 reversed.
Add attr-merge-unknown-1, attr-merge-unknown-2, attr-merge-unknown-2r,
and attr-merge-unknown-3 dump tests.
* ld-arm/arch-v6.s: New file.
* ld-arm/arch-v6k.s: New file.
* ld-arm/arch-v6t2.s: New file.
* ld-arm/attr-merge-3.attr: New file.
* ld-arm/attr-merge-3a.s: New file.
* ld-arm/attr-merge-3b.s: New file.
* ld-arm/attr-merge-4.attr: New file.
* ld-arm/attr-merge-4a.s: New file.
* ld-arm/attr-merge-4b.s: New file.
* ld-arm/attr-merge-5.attr: New file.
* ld-arm/attr-merge-5.s: New file.
* ld-arm/attr-merge-arch-1.attr: New file.
* ld-arm/attr-merge-arch-2.attr: New file.
* ld-arm/attr-merge-unknown-1.d: New file.
* ld-arm/attr-merge-unknown-1.s: New file.
* ld-arm/attr-merge-unknown-2.d: New file.
* ld-arm/attr-merge-unknown-2.s: New file.
* ld-arm/attr-merge-unknown-2r.d: New file.
* ld-arm/attr-merge-unknown-3.d: New file.
* ld-arm/blank.s: New file.
Diffstat (limited to 'ld')
22 files changed, 249 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 128e5e1..aaef066 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,32 @@ +2009-01-19 Andrew Stubbs <ams@codesourcery.com> + + * ld-arm/arm-elf.exp (armeabitests): Add EABI attribute merging 3, + EABI attribute merging 4, and EABI attribute merging 5, + EABI attribute arch merging 1, EABI attribute arch merging 1 reversed, + EABI attribute arch merging 2, EABI attribute arch merging 2 reversed. + Add attr-merge-unknown-1, attr-merge-unknown-2, attr-merge-unknown-2r, + and attr-merge-unknown-3 dump tests. + * ld-arm/arch-v6.s: New file. + * ld-arm/arch-v6k.s: New file. + * ld-arm/arch-v6t2.s: New file. + * ld-arm/attr-merge-3.attr: New file. + * ld-arm/attr-merge-3a.s: New file. + * ld-arm/attr-merge-3b.s: New file. + * ld-arm/attr-merge-4.attr: New file. + * ld-arm/attr-merge-4a.s: New file. + * ld-arm/attr-merge-4b.s: New file. + * ld-arm/attr-merge-5.attr: New file. + * ld-arm/attr-merge-5.s: New file. + * ld-arm/attr-merge-arch-1.attr: New file. + * ld-arm/attr-merge-arch-2.attr: New file. + * ld-arm/attr-merge-unknown-1.d: New file. + * ld-arm/attr-merge-unknown-1.s: New file. + * ld-arm/attr-merge-unknown-2.d: New file. + * ld-arm/attr-merge-unknown-2.s: New file. + * ld-arm/attr-merge-unknown-2r.d: New file. + * ld-arm/attr-merge-unknown-3.d: New file. + * ld-arm/blank.s: New file. + 2009-01-16 H.J. Lu <hongjiu.lu@intel.com> * ld-elf/textaddr1.d: New. diff --git a/ld/testsuite/ld-arm/arch-v6.s b/ld/testsuite/ld-arm/arch-v6.s new file mode 100644 index 0000000..88aef8d --- /dev/null +++ b/ld/testsuite/ld-arm/arch-v6.s @@ -0,0 +1,4 @@ + .cpu arm1136jfs + + @ Tag_CPU_raw_name + .eabi_attribute 4, "arch_v6" diff --git a/ld/testsuite/ld-arm/arch-v6k.s b/ld/testsuite/ld-arm/arch-v6k.s new file mode 100644 index 0000000..0bfec94 --- /dev/null +++ b/ld/testsuite/ld-arm/arch-v6k.s @@ -0,0 +1,4 @@ + .cpu mpcore + + @ Tag_CPU_raw_name + .eabi_attribute 4, "arch_v6k" diff --git a/ld/testsuite/ld-arm/arch-v6t2.s b/ld/testsuite/ld-arm/arch-v6t2.s new file mode 100644 index 0000000..1148b20 --- /dev/null +++ b/ld/testsuite/ld-arm/arch-v6t2.s @@ -0,0 +1,4 @@ + .cpu arm1156t2f-s + + @ Tag_CPU_raw_name + .eabi_attribute 4, "arch_v6t2" diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index 665dab1..530a801 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -205,6 +205,27 @@ set armeabitests { {"EABI attribute merging 2" "-r" "" {attr-merge-2a.s attr-merge-2b.s} {{readelf -A attr-merge-2.attr}} "attr-merge-2"} + {"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"} {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x1001000" "" {thumb2-bl.s} {{objdump -dr thumb2-bl.d}} "thumb2-bl"} @@ -310,3 +331,7 @@ run_dump_test "farcall-thumb-thumb-pic-veneer" run_dump_test "farcall-thumb-thumb-m-pic-veneer" run_dump_test "farcall-thumb-arm-pic-veneer" run_dump_test "farcall-section" +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" diff --git a/ld/testsuite/ld-arm/attr-merge-3.attr b/ld/testsuite/ld-arm/attr-merge-3.attr new file mode 100644 index 0000000..b539132 --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge-3.attr @@ -0,0 +1,31 @@ +Attribute Section: aeabi +File Attributes + Tag_nodefaults: True + Tag_CPU_name: "ARM9E" + Tag_CPU_arch: v5TE + Tag_ARM_ISA_use: Yes + Tag_THUMB_ISA_use: Thumb-2 + Tag_VFP_arch: VFPv3 + Tag_WMMX_arch: WMMXv2 + Tag_Advanced_SIMD_arch: NEONv1 + Tag_PCS_config: Linux application + Tag_ABI_PCS_R9_use: SB + Tag_ABI_PCS_RW_data: PC-relative + Tag_ABI_PCS_RO_data: PC-relative + Tag_ABI_PCS_GOT_use: direct + Tag_ABI_PCS_wchar_t: 4 + Tag_ABI_FP_rounding: Needed + Tag_ABI_FP_denormal: Needed + Tag_ABI_FP_exceptions: Needed + Tag_ABI_FP_user_exceptions: Needed + Tag_ABI_FP_number_model: IEEE 754 + Tag_ABI_align8_needed: Yes + Tag_ABI_align8_preserved: Yes, except leaf SP + Tag_ABI_enum_size: small + Tag_ABI_HardFP_use: SP and DP + Tag_ABI_VFP_args: VFP registers + Tag_CPU_unaligned_access: v6 + Tag_VFP_HP_extension: Allowed + Tag_T2EE_use: Allowed + Tag_Virtualization_use: Allowed + Tag_MPextension_use: Allowed diff --git a/ld/testsuite/ld-arm/attr-merge-3a.s b/ld/testsuite/ld-arm/attr-merge-3a.s new file mode 100644 index 0000000..789fcf1 --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge-3a.s @@ -0,0 +1,38 @@ + .cpu arm7tdmi + .fpu softvfp + .eabi_attribute Tag_CPU_arch, 2 + @ .eabi_attribute Tag_CPU_arch_profile, 0x41 + .eabi_attribute Tag_ARM_ISA_use, 0 + .eabi_attribute Tag_THUMB_ISA_use, 1 + .eabi_attribute Tag_VFP_arch, 3 + .eabi_attribute Tag_WMMX_arch, 1 + .eabi_attribute Tag_Advanced_SIMD_arch, 0 + .eabi_attribute Tag_PCS_config, 0 + .eabi_attribute Tag_ABI_PCS_R9_use, 1 + .eabi_attribute Tag_ABI_PCS_RW_data, 1 + .eabi_attribute Tag_ABI_PCS_RO_data, 1 + .eabi_attribute Tag_ABI_PCS_GOT_use, 1 + .eabi_attribute Tag_ABI_PCS_wchar_t, 4 + .eabi_attribute Tag_ABI_FP_rounding, 0 + .eabi_attribute Tag_ABI_FP_denormal, 1 + .eabi_attribute Tag_ABI_FP_exceptions, 0 + .eabi_attribute Tag_ABI_FP_user_exceptions, 0 + .eabi_attribute Tag_ABI_FP_number_model, 0 + .eabi_attribute Tag_ABI_align8_needed, 1 + .eabi_attribute Tag_ABI_align8_preserved, 1 + .eabi_attribute Tag_ABI_enum_size, 1 + .eabi_attribute Tag_ABI_HardFP_use, 1 + .eabi_attribute Tag_ABI_VFP_args, 0 + @ .eabi_attribute Tag_ABI_WMMX_args, 0 + @ .eabi_attribute Tag_ABI_optimization_goals, 0 + @ .eabi_attribute Tag_ABI_FP_optimization_goals, 0 + @ .eabi_attribute Tag_compatibility, 1, "gnu" + .eabi_attribute Tag_CPU_unaligned_access, 0 + .eabi_attribute Tag_VFP_HP_extension, 0 + @ .eabi_attribute Tag_ABI_FP_16bit_format, 0 + .eabi_attribute Tag_nodefaults, 0 + @ .eabi_attribute Tag_also_compatible_with, + .eabi_attribute Tag_T2EE_use, 0 + .eabi_attribute Tag_conformance, "0" + .eabi_attribute Tag_Virtualization_use, 0 + .eabi_attribute Tag_MPextension_use, 0 diff --git a/ld/testsuite/ld-arm/attr-merge-3b.s b/ld/testsuite/ld-arm/attr-merge-3b.s new file mode 100644 index 0000000..b858482 --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge-3b.s @@ -0,0 +1,38 @@ + .cpu arm9e + .fpu neon + .eabi_attribute Tag_CPU_arch, 3 + @ .eabi_attribute Tag_CPU_arch_profile, 0x41 + .eabi_attribute Tag_ARM_ISA_use, 1 + .eabi_attribute Tag_THUMB_ISA_use, 2 + .eabi_attribute Tag_VFP_arch, 4 + .eabi_attribute Tag_WMMX_arch, 2 + .eabi_attribute Tag_Advanced_SIMD_arch, 1 + .eabi_attribute Tag_PCS_config, 2 + .eabi_attribute Tag_ABI_PCS_R9_use, 3 + .eabi_attribute Tag_ABI_PCS_RW_data, 3 + .eabi_attribute Tag_ABI_PCS_RO_data, 2 + .eabi_attribute Tag_ABI_PCS_GOT_use, 2 + .eabi_attribute Tag_ABI_PCS_wchar_t, 0 + .eabi_attribute Tag_ABI_FP_rounding, 1 + .eabi_attribute Tag_ABI_FP_denormal, 2 + .eabi_attribute Tag_ABI_FP_exceptions, 1 + .eabi_attribute Tag_ABI_FP_user_exceptions, 1 + .eabi_attribute Tag_ABI_FP_number_model, 3 + .eabi_attribute Tag_ABI_align8_needed, 2 + .eabi_attribute Tag_ABI_align8_preserved, 2 + .eabi_attribute Tag_ABI_enum_size, 3 + .eabi_attribute Tag_ABI_HardFP_use, 2 + .eabi_attribute Tag_ABI_VFP_args, 1 + @ .eabi_attribute Tag_ABI_WMMX_args, 0 + @ .eabi_attribute Tag_ABI_optimization_goals, 0 + @ .eabi_attribute Tag_ABI_FP_optimization_goals, 0 + @ .eabi_attribute Tag_compatibility, 1, "gnu" + .eabi_attribute Tag_CPU_unaligned_access, 1 + .eabi_attribute Tag_VFP_HP_extension, 1 + @ .eabi_attribute Tag_ABI_FP_16bit_format, 0 + .eabi_attribute Tag_nodefaults, 1 + @ .eabi_attribute Tag_also_compatible_with, + .eabi_attribute Tag_T2EE_use, 1 + .eabi_attribute Tag_conformance, "2.07" + .eabi_attribute Tag_Virtualization_use, 1 + .eabi_attribute Tag_MPextension_use, 1 diff --git a/ld/testsuite/ld-arm/attr-merge-4.attr b/ld/testsuite/ld-arm/attr-merge-4.attr new file mode 100644 index 0000000..e2a4cb9 --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge-4.attr @@ -0,0 +1,6 @@ +Attribute Section: aeabi +File Attributes + Tag_CPU_name: "ARM7TDMI" + Tag_CPU_arch: v4T + Tag_CPU_arch_profile: Microcontroller + Tag_also_compatible_with: v6-M diff --git a/ld/testsuite/ld-arm/attr-merge-4a.s b/ld/testsuite/ld-arm/attr-merge-4a.s new file mode 100644 index 0000000..b5b77bf --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge-4a.s @@ -0,0 +1,7 @@ + .cpu arm7tdmi + + @ Tag_CPU_arch = v4T + .eabi_attribute Tag_CPU_arch, 2 + + @ Tag_also_compatible_with = v6-M + .eabi_attribute Tag_also_compatible_with, "\006\013" diff --git a/ld/testsuite/ld-arm/attr-merge-4b.s b/ld/testsuite/ld-arm/attr-merge-4b.s new file mode 100644 index 0000000..d2eb6de --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge-4b.s @@ -0,0 +1,7 @@ + .cpu cortex-m1 + + @ Tag_CPU_arch = v6-M + .eabi_attribute Tag_CPU_arch, 11 + + @ Tag_also_compatible_with = v4T + .eabi_attribute Tag_also_compatible_with, "\006\002" diff --git a/ld/testsuite/ld-arm/attr-merge-5.attr b/ld/testsuite/ld-arm/attr-merge-5.attr new file mode 100644 index 0000000..9f0e0b2 --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge-5.attr @@ -0,0 +1,3 @@ +Attribute Section: aeabi +File Attributes + Tag_compatibility: flag = 1, vendor = gnu diff --git a/ld/testsuite/ld-arm/attr-merge-5.s b/ld/testsuite/ld-arm/attr-merge-5.s new file mode 100644 index 0000000..583d253 --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge-5.s @@ -0,0 +1 @@ + .eabi_attribute Tag_compatibility, 1, "gnu" diff --git a/ld/testsuite/ld-arm/attr-merge-arch-1.attr b/ld/testsuite/ld-arm/attr-merge-arch-1.attr new file mode 100644 index 0000000..b08f14f --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge-arch-1.attr @@ -0,0 +1,4 @@ +Attribute Section: aeabi +File Attributes + Tag_CPU_name: "ARM v7" + Tag_CPU_arch: v7 diff --git a/ld/testsuite/ld-arm/attr-merge-arch-2.attr b/ld/testsuite/ld-arm/attr-merge-arch-2.attr new file mode 100644 index 0000000..9d6a7bd --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge-arch-2.attr @@ -0,0 +1,5 @@ +Attribute Section: aeabi +File Attributes + Tag_CPU_raw_name: "arch_v6k" + Tag_CPU_name: "MPCORE" + Tag_CPU_arch: v6K diff --git a/ld/testsuite/ld-arm/attr-merge-unknown-1.d b/ld/testsuite/ld-arm/attr-merge-unknown-1.d new file mode 100644 index 0000000..395d2b6 --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge-unknown-1.d @@ -0,0 +1,5 @@ +#source: attr-merge-unknown-1.s +#source: blank.s +#as: +#ld: +#error: Unknown mandatory EABI object attribute 42 diff --git a/ld/testsuite/ld-arm/attr-merge-unknown-1.s b/ld/testsuite/ld-arm/attr-merge-unknown-1.s new file mode 100644 index 0000000..298c673 --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge-unknown-1.s @@ -0,0 +1,3 @@ + @ This attrubute is supposed to be unknown. + @ If this number should become known, change it. + .eabi_attribute 42, 1 diff --git a/ld/testsuite/ld-arm/attr-merge-unknown-2.d b/ld/testsuite/ld-arm/attr-merge-unknown-2.d new file mode 100644 index 0000000..7d18571 --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge-unknown-2.d @@ -0,0 +1,10 @@ +#source: attr-merge-unknown-2.s +#source: blank.s +#as: +#ld: +#warning: Unknown EABI object attribute 82 +#readelf: -A + +Attribute Section: aeabi +File Attributes + diff --git a/ld/testsuite/ld-arm/attr-merge-unknown-2.s b/ld/testsuite/ld-arm/attr-merge-unknown-2.s new file mode 100644 index 0000000..d8d61e0 --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge-unknown-2.s @@ -0,0 +1,3 @@ + @ This attrubute is supposed to be unknown. + @ If this number should become known, change it. + .eabi_attribute 82, 1 diff --git a/ld/testsuite/ld-arm/attr-merge-unknown-2r.d b/ld/testsuite/ld-arm/attr-merge-unknown-2r.d new file mode 100644 index 0000000..82402b3 --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge-unknown-2r.d @@ -0,0 +1,10 @@ +#source: blank.s +#source: attr-merge-unknown-2.s +#as: +#ld: +#warning: Unknown EABI object attribute 82 +#readelf: -A + +Attribute Section: aeabi +File Attributes + diff --git a/ld/testsuite/ld-arm/attr-merge-unknown-3.d b/ld/testsuite/ld-arm/attr-merge-unknown-3.d new file mode 100644 index 0000000..b09fcc9 --- /dev/null +++ b/ld/testsuite/ld-arm/attr-merge-unknown-3.d @@ -0,0 +1,11 @@ +#source: attr-merge-unknown-2.s +#source: attr-merge-unknown-2.s +#as: +#ld: +#warning: Unknown EABI object attribute 82 +#readelf: -A + +Attribute Section: aeabi +File Attributes + Tag_unknown_82: 1 \(0x1\) + diff --git a/ld/testsuite/ld-arm/blank.s b/ld/testsuite/ld-arm/blank.s new file mode 100644 index 0000000..1d22054 --- /dev/null +++ b/ld/testsuite/ld-arm/blank.s @@ -0,0 +1 @@ +@ this file left intentionally blank |