| 1 | # Expect script for various ARM ELF tests. |
| 2 | # Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 |
| 3 | # Free Software Foundation, Inc. |
| 4 | # |
| 5 | # This file is part of the GNU Binutils. |
| 6 | # |
| 7 | # This program is free software; you can redistribute it and/or modify |
| 8 | # it under the terms of the GNU General Public License as published by |
| 9 | # the Free Software Foundation; either version 3 of the License, or |
| 10 | # (at your option) any later version. |
| 11 | # |
| 12 | # This program is distributed in the hope that it will be useful, |
| 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | # GNU General Public License for more details. |
| 16 | # |
| 17 | # You should have received a copy of the GNU General Public License |
| 18 | # along with this program; if not, write to the Free Software |
| 19 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
| 20 | # MA 02110-1301, USA. |
| 21 | # |
| 22 | |
| 23 | if {[istarget "arm-*-vxworks"]} { |
| 24 | set armvxworkstests { |
| 25 | {"VxWorks shared library test 1" "-shared -Tvxworks1.ld" |
| 26 | "" {vxworks1-lib.s} |
| 27 | {{readelf --relocs vxworks1-lib.rd} {objdump -dr vxworks1-lib.dd} |
| 28 | {readelf --symbols vxworks1-lib.nd} {readelf -d vxworks1-lib.td}} |
| 29 | "libvxworks1.so"} |
| 30 | {"VxWorks executable test 1 (dynamic)" \ |
| 31 | "tmpdir/libvxworks1.so -Tvxworks1.ld -q --force-dynamic" |
| 32 | "" {vxworks1.s} |
| 33 | {{readelf --relocs vxworks1.rd} {objdump -dr vxworks1.dd}} |
| 34 | "vxworks1"} |
| 35 | {"VxWorks executable test 2 (dynamic)" \ |
| 36 | "-Tvxworks1.ld -q --force-dynamic" |
| 37 | "" {vxworks2.s} |
| 38 | {{readelf --segments vxworks2.sd}} |
| 39 | "vxworks2"} |
| 40 | {"VxWorks executable test 2 (static)" |
| 41 | "-Tvxworks1.ld" |
| 42 | "" {vxworks2.s} |
| 43 | {{readelf --segments vxworks2-static.sd}} |
| 44 | "vxworks2"} |
| 45 | } |
| 46 | run_ld_link_tests $armvxworkstests |
| 47 | run_dump_test "vxworks1-static" |
| 48 | run_dump_test "emit-relocs1-vxworks" |
| 49 | } |
| 50 | |
| 51 | if { [istarget "arm*-*-symbianelf*"] } { |
| 52 | run_dump_test "symbian-seg1" |
| 53 | } |
| 54 | |
| 55 | # Exclude non-ARM-ELF targets. |
| 56 | |
| 57 | if { ![is_elf_format] || ![istarget "arm*-*-*"] } { |
| 58 | return |
| 59 | } |
| 60 | |
| 61 | # List contains test-items with 3 items followed by 2 lists: |
| 62 | # 0:name 1:ld options 2:assembler options |
| 63 | # 3:filenames of assembler files 4: action and options. 5: name of output file |
| 64 | |
| 65 | # Actions: |
| 66 | # objdump: Apply objdump options on result. Compare with regex (last arg). |
| 67 | # nm: Apply nm options on result. Compare with regex (last arg). |
| 68 | # readelf: Apply readelf options on result. Compare with regex (last arg). |
| 69 | |
| 70 | set armelftests { |
| 71 | {"Group relocations" "-Ttext 0x8000 --section-start zero=0x0 --section-start alpha=0xeef0 --section-start beta=0xffeef0" "" {group-relocs.s} |
| 72 | {{objdump -Dr group-relocs.d}} |
| 73 | "group-relocs"} |
| 74 | {"Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x401000" "" {thumb1-bl.s} |
| 75 | {{objdump -dr thumb1-bl.d}} |
| 76 | "thumb1-bl"} |
| 77 | {"Simple non-PIC shared library" "-shared" "" {arm-lib.s} |
| 78 | {{objdump -fdw arm-lib.d} {objdump -Rw arm-lib.r}} |
| 79 | "arm-lib.so"} |
| 80 | {"Simple PIC shared library" "-shared" "" {arm-lib-plt32.s} |
| 81 | {{objdump -fdw arm-lib-plt32.d} {objdump -Rw arm-lib-plt32.r}} |
| 82 | "arm-lib-plt32.so"} |
| 83 | {"Simple dynamic application" "tmpdir/arm-lib.so" "" {arm-app.s} |
| 84 | {{objdump -fdw arm-app.d} {objdump -Rw arm-app.r}} |
| 85 | "arm-app"} |
| 86 | {"Simple static application" "" "" {arm-static-app.s} |
| 87 | {{objdump -fdw arm-static-app.d} {objdump -rw arm-static-app.r}} |
| 88 | "arm-static-app"} |
| 89 | {"Non-pcrel function reference" "tmpdir/arm-lib.so" "" {arm-app-abs32.s} |
| 90 | {{objdump -fdw arm-app-abs32.d} {objdump -Rw arm-app-abs32.r}} |
| 91 | "arm-app-abs32"} |
| 92 | {"Thumb shared library with ARM entry points" "-shared -T arm-lib.ld" "-mthumb-interwork" |
| 93 | {mixed-lib.s} |
| 94 | {{objdump -fdw armthumb-lib.d} {readelf -Ds armthumb-lib.sym}} |
| 95 | "armthumb-lib.so"} |
| 96 | {"Mixed ARM/Thumb shared library" "-shared -T arm-lib.ld -use-blx" "" |
| 97 | {mixed-lib.s} |
| 98 | {{objdump -fdw mixed-lib.d} {objdump -Rw mixed-lib.r} |
| 99 | {readelf -Ds mixed-lib.sym}} |
| 100 | "mixed-lib.so"} |
| 101 | {"Mixed ARM/Thumb dynamic application" "tmpdir/mixed-lib.so -T arm-dyn.ld" "" |
| 102 | {mixed-app.s} |
| 103 | {{objdump -fdw mixed-app.d} {objdump -Rw mixed-app.r} |
| 104 | {readelf -Ds mixed-app.sym}} |
| 105 | "mixed-app"} |
| 106 | {"Mixed ARM/Thumb arch5 dynamic application" "tmpdir/mixed-lib.so -T arm-dyn.ld --use-blx" "" |
| 107 | {mixed-app.s} |
| 108 | {{objdump -fdw mixed-app-v5.d} {objdump -Rw mixed-app.r} |
| 109 | {readelf -Ds mixed-app.sym}} |
| 110 | "mixed-app-v5"} |
| 111 | {"target1-abs" "-static --target1-abs -T arm.ld" "" {arm-target1.s} |
| 112 | {{objdump -s arm-target1-abs.d}} |
| 113 | "arm-target1-abs"} |
| 114 | {"target1-rel" "-static --target1-rel -T arm.ld" "" {arm-target1.s} |
| 115 | {{objdump -s arm-target1-rel.d}} |
| 116 | "arm-target1-rel"} |
| 117 | {"target2-rel" "-static --target2=rel -T arm.ld" "" {arm-target2.s} |
| 118 | {{objdump -s arm-target2-rel.d}} |
| 119 | "arm-target2-rel"} |
| 120 | {"target2-abs" "-static --target2=abs -T arm.ld" "" {arm-target2.s} |
| 121 | {{objdump -s arm-target2-abs.d}} |
| 122 | "arm-target2-abs"} |
| 123 | {"target2-got-rel" "-static --target2=got-rel -T arm.ld" "" {arm-target2.s} |
| 124 | {{objdump -s arm-target2-got-rel.d}} |
| 125 | "arm-target2-got-rel"} |
| 126 | {"arm-rel31" "-static -T arm.ld" "" {arm-rel31.s} |
| 127 | {{objdump -s arm-rel31.d}} |
| 128 | "arm-rel31"} |
| 129 | {"arm-call" "-static -T arm.ld" "-meabi=4" {arm-call1.s arm-call2.s} |
| 130 | {{objdump -d arm-call.d}} |
| 131 | "arm-call"} |
| 132 | {"TLS shared library" "-shared -T arm-lib.ld" "" {tls-lib.s} |
| 133 | {{objdump -fdw tls-lib.d} {objdump -Rw tls-lib.r}} |
| 134 | "tls-lib.so"} |
| 135 | {"TLS dynamic application" "-T arm-dyn.ld tmpdir/tls-lib.so" "" {tls-app.s} |
| 136 | {{objdump -fdw tls-app.d} {objdump -Rw tls-app.r}} |
| 137 | "tls-app"} |
| 138 | {"Thumb entry point" "-T arm.ld" "" {thumb-entry.s} |
| 139 | {{readelf -h thumb-entry.d}} |
| 140 | "thumb-entry"} |
| 141 | {"thumb-rel32" "-static -T arm.ld" "" {thumb-rel32.s} |
| 142 | {{objdump -s thumb-rel32.d}} |
| 143 | "thumb-rel32"} |
| 144 | {"MOVW/MOVT" "-static -T arm.ld" "" {arm-movwt.s} |
| 145 | {{objdump -dw arm-movwt.d}} |
| 146 | "arm-movwt"} |
| 147 | {"BE8 Mapping Symbols" "-static -T arm.ld -EB --be8" "-EB" {arm-be8.s} |
| 148 | {{objdump -d arm-be8.d}} |
| 149 | "arm-be8"} |
| 150 | {"Using Thumb lib by another lib" "-shared tmpdir/mixed-lib.so" "" {use-thumb-lib.s} |
| 151 | {{readelf -Ds use-thumb-lib.sym}} |
| 152 | "use-thumb-lib.so"} |
| 153 | {"VFP11 denorm erratum fix, scalar operation" |
| 154 | "-EL --vfp11-denorm-fix=scalar -Ttext=0x8000" "-EL -mfpu=vfpxd" {vfp11-fix-scalar.s} |
| 155 | {{objdump -dr vfp11-fix-scalar.d}} |
| 156 | "vfp11-fix-scalar"} |
| 157 | {"VFP11 denorm erratum fix, vector operation" |
| 158 | "-EB --vfp11-denorm-fix=vector -Ttext=0x8000" "-EB -mfpu=vfpxd" {vfp11-fix-vector.s} |
| 159 | {{objdump -dr vfp11-fix-vector.d}} |
| 160 | "vfp11-fix-vector"} |
| 161 | {"VFP11 denorm erratum fix, embedded code-like data" |
| 162 | "-EL --vfp11-denorm-fix=scalar -Ttext=0x8000" "-EL -mfpu=vfpxd" {vfp11-fix-none.s} |
| 163 | {{objdump -dr vfp11-fix-none.d}} |
| 164 | "vfp11-fix-none"} |
| 165 | {"Cortex-A8 erratum fix, b.w" |
| 166 | "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-b.s} |
| 167 | {{objdump -dr cortex-a8-fix-b.d}} |
| 168 | "cortex-a8-fix-b"} |
| 169 | {"Cortex-A8 erratum fix, bl.w" |
| 170 | "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-bl.s} |
| 171 | {{objdump -dr cortex-a8-fix-bl.d}} |
| 172 | "cortex-a8-fix-bl"} |
| 173 | {"Cortex-A8 erratum fix, bcc.w" |
| 174 | "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-bcc.s} |
| 175 | {{objdump -dr cortex-a8-fix-bcc.d}} |
| 176 | "cortex-a8-fix-bcc"} |
| 177 | {"Cortex-A8 erratum fix, blx.w" |
| 178 | "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-fix-blx.s} |
| 179 | {{objdump -dr cortex-a8-fix-blx.d}} |
| 180 | "cortex-a8-fix-blx"} |
| 181 | {"Cortex-A8 erratum fix, relocate b.w to ARM" |
| 182 | "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-b-rel.s} |
| 183 | {{objdump -dr cortex-a8-fix-b-rel-arm.d}} |
| 184 | "cortex-a8-fix-b-rel-arm"} |
| 185 | {"Cortex-A8 erratum fix, relocate b.w to Thumb" |
| 186 | "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-b-rel.s} |
| 187 | {{objdump -dr cortex-a8-fix-b-rel-thumb.d}} |
| 188 | "cortex-a8-fix-b-rel-thumb"} |
| 189 | {"Cortex-A8 erratum fix, relocate bl.w to ARM" |
| 190 | "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-bl-rel.s} |
| 191 | {{objdump -dr cortex-a8-fix-bl-rel-arm.d}} |
| 192 | "cortex-a8-fix-bl-rel-arm"} |
| 193 | {"Cortex-A8 erratum fix, relocate bl.w to Thumb" |
| 194 | "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bl-rel.s} |
| 195 | {{objdump -dr cortex-a8-fix-bl-rel-thumb.d}} |
| 196 | "cortex-a8-fix-bl-rel-thumb"} |
| 197 | {"Cortex-A8 erratum fix, relocate b<cond>.w to Thumb" |
| 198 | "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bcc-rel.s} |
| 199 | {{objdump -dr cortex-a8-fix-bcc-rel-thumb.d}} |
| 200 | "cortex-a8-fix-bcc-rel-thumb"} |
| 201 | {"Cortex-A8 erratum fix, relocate blx.w to ARM" |
| 202 | "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-arm-target.s cortex-a8-fix-blx-rel.s} |
| 203 | {{objdump -dr cortex-a8-fix-blx-rel-arm.d}} |
| 204 | "cortex-a8-fix-blx-rel-arm"} |
| 205 | {"Cortex-A8 erratum fix, relocate blx.w to Thumb" |
| 206 | "-EL -Ttext=0x8f00 --fix-cortex-a8" "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-blx-rel.s} |
| 207 | {{objdump -dr cortex-a8-fix-blx-rel-thumb.d}} |
| 208 | "cortex-a8-fix-blx-rel-thumb"} |
| 209 | {"Cortex-A8 erratum fix, relocate bl.w and far call" |
| 210 | "-EL -Ttext=0x00 --fix-cortex-a8 --defsym far_fn1=0x80000000 --defsym far_fn2=0x80000004 --defsym far_fn=0x7fff0000 --defsym _start=0" "-EL" {cortex-a8-far-1.s cortex-a8-far-2.s} |
| 211 | {{objdump -dr cortex-a8-far.d}} |
| 212 | "cortex-a8-far"} |
| 213 | {"Cortex-A8 erratum fix, headers" |
| 214 | "-EL --fix-cortex-a8 -T cortex-a8-fix-hdr.t" "-EL" {cortex-a8-fix-hdr.s} |
| 215 | {{objdump -dr cortex-a8-fix-hdr.d}} |
| 216 | "cortex-a8-fix-hdr"} |
| 217 | {"Unwinding and -gc-sections" "-gc-sections" "" {gc-unwind.s} |
| 218 | {{objdump -sj.data gc-unwind.d}} |
| 219 | "gc-unwind"} |
| 220 | {"arm-pic-veneer" "-static -T arm.ld --pic-veneer" "" {arm-pic-veneer.s} |
| 221 | {{objdump -d arm-pic-veneer.d}} |
| 222 | "arm-pic-veneer"} |
| 223 | {"Preempt Thumb symbol" "tmpdir/mixed-lib.so -T arm-dyn.ld --use-blx" "" |
| 224 | {preempt-app.s} |
| 225 | {{readelf -Ds preempt-app.sym}} |
| 226 | "preempt-app"} |
| 227 | {"jump19" "-static -T arm.ld" "" {jump19.s} |
| 228 | {{objdump -dr jump19.d}} |
| 229 | "jump19"} |
| 230 | {"callweak" "-static -T arm.ld" "" {callweak.s} |
| 231 | {{objdump -dr callweak.d}} |
| 232 | "callweak"} |
| 233 | } |
| 234 | |
| 235 | run_ld_link_tests $armelftests |
| 236 | run_dump_test "group-relocs-alu-bad" |
| 237 | run_dump_test "group-relocs-ldr-bad" |
| 238 | run_dump_test "group-relocs-ldrs-bad" |
| 239 | run_dump_test "group-relocs-ldc-bad" |
| 240 | run_dump_test "thumb2-bl-undefweak" |
| 241 | run_dump_test "thumb2-bl-undefweak1" |
| 242 | run_dump_test "emit-relocs1" |
| 243 | run_dump_test "movw-shared-1" |
| 244 | run_dump_test "movw-shared-2" |
| 245 | run_dump_test "movw-shared-3" |
| 246 | run_dump_test "movw-shared-4" |
| 247 | |
| 248 | # Exclude non-ARM-EABI targets. |
| 249 | |
| 250 | if { ![istarget "arm*-*-*eabi"] } { |
| 251 | # Special variants of these tests, as a different farcall stub is |
| 252 | # generated for a non-ARM-EABI target: indeed in such a case, |
| 253 | # there are no attributes to indicate that blx can be used. |
| 254 | |
| 255 | set arm_noeabi_tests { |
| 256 | {"Thumb-2-as-Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-as-thumb1-bad.s} |
| 257 | {{objdump -d thumb2-bl-as-thumb1-bad-noeabi.d}} |
| 258 | "thumb2-bl-as-thumb1-bad"} |
| 259 | {"Thumb-2 BL bad" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-bad.s} |
| 260 | {{objdump -d thumb2-bl-bad-noeabi.d}} |
| 261 | "thumb2-bl-bad"} |
| 262 | } |
| 263 | run_ld_link_tests $arm_noeabi_tests |
| 264 | |
| 265 | return |
| 266 | } |
| 267 | |
| 268 | # Farcalls stubs are fully supported for ARM-EABI only |
| 269 | set armeabitests { |
| 270 | {"EABI attribute merging" "-r" "" {attr-merge.s attr-merge.s} |
| 271 | {{readelf -A attr-merge.attr}} |
| 272 | "attr-merge"} |
| 273 | {"EABI attribute merging 2" "-r" "" {attr-merge-2a.s attr-merge-2b.s} |
| 274 | {{readelf -A attr-merge-2.attr}} |
| 275 | "attr-merge-2"} |
| 276 | {"EABI attribute merging 3" "-r" "" {attr-merge-3a.s attr-merge-3b.s} |
| 277 | {{readelf -A attr-merge-3.attr}} |
| 278 | "attr-merge-3"} |
| 279 | {"EABI attribute merging 4" "-r" "" {attr-merge-4a.s attr-merge-4b.s} |
| 280 | {{readelf -A attr-merge-4.attr}} |
| 281 | "attr-merge-4"} |
| 282 | {"EABI attribute merging 5" "-r" "" {attr-merge-5.s attr-merge-5.s} |
| 283 | {{readelf -A attr-merge-5.attr}} |
| 284 | "attr-merge-5"} |
| 285 | {"EABI attribute arch merging 1" "-r" "" {arch-v6k.s arch-v6t2.s} |
| 286 | {{readelf -A attr-merge-arch-1.attr}} |
| 287 | "attr-merge-arch-1"} |
| 288 | {"EABI attribute arch merging 1 reversed" "-r" "" {arch-v6t2.s arch-v6k.s} |
| 289 | {{readelf -A attr-merge-arch-1.attr}} |
| 290 | "attr-merge-arch-1r"} |
| 291 | {"EABI attribute arch merging 2" "-r" "" {arch-v6k.s arch-v6.s} |
| 292 | {{readelf -A attr-merge-arch-2.attr}} |
| 293 | "attr-merge-arch-2"} |
| 294 | {"EABI attribute arch merging 2 reversed" "-r" "" {arch-v6.s arch-v6k.s} |
| 295 | {{readelf -A attr-merge-arch-2.attr}} |
| 296 | "attr-merge-arch-2r"} |
| 297 | {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x1001000" "" {thumb2-bl.s} |
| 298 | {{objdump -dr thumb2-bl.d}} |
| 299 | "thumb2-bl"} |
| 300 | {"Thumb-2 Interworked branch" "-T arm.ld" "" {thumb2-b-interwork.s} |
| 301 | {{objdump -dr thumb2-b-interwork.d}} |
| 302 | "thumb2-b-interwork"} |
| 303 | {"BL/BLX interworking" "-T arm.ld" "" {thumb2-bl-blx-interwork.s} |
| 304 | {{objdump -dr thumb2-bl-blx-interwork.d}} |
| 305 | "thumb2-bl-blx-interwork"} |
| 306 | {"ARMv4 interworking" "-static -T arm.ld --fix-v4bx-interworking" "--fix-v4bx -meabi=4" {armv4-bx.s} |
| 307 | {{objdump -d armv4-bx.d}} |
| 308 | "armv4-bx"} |
| 309 | {"MOVW/MOVT and merged sections" "-T arm.ld" "" {movw-merge.s} |
| 310 | {{objdump -dw movw-merge.d}} |
| 311 | "movw-merge"} |
| 312 | {"MOVW/MOVT against shared libraries" "tmpdir/arm-lib.so" "" {arm-app-movw.s} |
| 313 | {{objdump -Rw arm-app.r}} |
| 314 | "arm-app-movw"} |
| 315 | {"Thumb-2-as-Thumb-1 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-as-thumb1-bad.s} |
| 316 | {{objdump -d thumb2-bl-as-thumb1-bad.d}} |
| 317 | "thumb2-bl-as-thumb1-bad"} |
| 318 | {"Thumb-2 BL" "-Ttext 0x1000 --section-start .foo=0x100100c" "" {thumb2-bl-bad.s} |
| 319 | {{objdump -d thumb2-bl-bad.d}} |
| 320 | "thumb2-bl-bad"} |
| 321 | |
| 322 | {"ARM-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001020" "" {farcall-arm-arm.s} |
| 323 | {{objdump -d farcall-arm-arm.d}} |
| 324 | "farcall-arm-arm"} |
| 325 | {"ARM-ARM farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001020 --pic-veneer" "" {farcall-arm-arm.s} |
| 326 | {{objdump -d farcall-arm-arm-pic-veneer.d}} |
| 327 | "farcall-arm-arm-pic-veneer"} |
| 328 | {"ARM-ARM farcall (BE8)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB --be8" "-EB" {farcall-arm-arm.s} |
| 329 | {{objdump -d farcall-arm-arm.d}} |
| 330 | "farcall-arm-arm-be8"} |
| 331 | {"ARM-ARM farcall (BE)" "-Ttext 0x1000 --section-start .foo=0x2001020 -EB" "-EB" {farcall-arm-arm.s} |
| 332 | {{objdump -d farcall-arm-arm.d}} |
| 333 | "farcall-arm-arm-be"} |
| 334 | |
| 335 | {"ARM-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "" {farcall-arm-thumb.s} |
| 336 | {{objdump -d farcall-arm-thumb.d}} |
| 337 | "farcall-arm-thumb"} |
| 338 | {"ARM-Thumb farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv5t" {farcall-arm-thumb.s} |
| 339 | {{objdump -d farcall-arm-thumb-blx.d}} |
| 340 | "farcall-arm-thumb-blx"} |
| 341 | {"ARM-Thumb farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "" {farcall-arm-thumb.s} |
| 342 | {{objdump -d farcall-arm-thumb-pic-veneer.d}} |
| 343 | "farcall-arm-thumb-pic-veneer"} |
| 344 | {"ARM-Thumb farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv5t" {farcall-arm-thumb.s} |
| 345 | {{objdump -d farcall-arm-thumb-blx-pic-veneer.d}} |
| 346 | "farcall-arm-thumb-blx-pic-veneer"} |
| 347 | |
| 348 | {"Thumb-Thumb farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv5t" {farcall-thumb-thumb.s} |
| 349 | {{objdump -d farcall-thumb-thumb-blx.d}} |
| 350 | "farcall-thumb-thumb-blx"} |
| 351 | {"Thumb-Thumb farcall M profile" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv7m" {farcall-thumb-thumb.s} |
| 352 | {{objdump -d farcall-thumb-thumb-m.d}} |
| 353 | "farcall-thumb-thumb-m"} |
| 354 | {"Thumb-Thumb farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "-march=armv4t" {farcall-thumb-thumb.s} |
| 355 | {{objdump -d farcall-thumb-thumb.d}} |
| 356 | "farcall-thumb-thumb"} |
| 357 | {"Thumb-Thumb farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv5t" {farcall-thumb-thumb.s} |
| 358 | {{objdump -d farcall-thumb-thumb-blx-pic-veneer.d}} |
| 359 | "farcall-thumb-thumb-blx-pic-veneer"} |
| 360 | {"Thumb-Thumb farcall M profile (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv7m" {farcall-thumb-thumb.s} |
| 361 | {{objdump -d farcall-thumb-thumb-m-pic-veneer.d}} |
| 362 | "farcall-thumb-thumb-m-pic-veneer"} |
| 363 | {"Thumb-Thumb farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-march=armv4t" {farcall-thumb-thumb.s} |
| 364 | {{objdump -d farcall-thumb-thumb-pic-veneer.d}} |
| 365 | "farcall-thumb-thumb-pic-veneer"} |
| 366 | |
| 367 | {"Thumb-ARM farcall" "-Ttext 0x1000 --section-start .foo=0x2001014" "-W" {farcall-thumb-arm.s} |
| 368 | {{objdump -d farcall-thumb-arm.d}} |
| 369 | "farcall-thumb-arm"} |
| 370 | {"Thumb-ARM farcall (BE8)" "-Ttext 0x1000 --section-start .foo=0x2001014 -EB --be8" "-W -EB" {farcall-thumb-arm.s} |
| 371 | {{objdump -d farcall-thumb-arm.d}} |
| 372 | "farcall-thumb-arm-be8"} |
| 373 | {"Thumb-ARM farcall (BE)" "-Ttext 0x1000 --section-start .foo=0x2001014 -EB" "-W -EB" {farcall-thumb-arm.s} |
| 374 | {{objdump -d farcall-thumb-arm.d}} |
| 375 | "farcall-thumb-arm-be"} |
| 376 | {"Thumb-ARM (short) call" "-Ttext 0x1000 --section-start .foo=0x0002014" "-W" {farcall-thumb-arm-short.s} |
| 377 | {{objdump -d farcall-thumb-arm-short.d}} |
| 378 | "farcall-thumb-arm-short"} |
| 379 | {"Thumb-ARM farcall with BLX" "-Ttext 0x1000 --section-start .foo=0x2001014" "-W -march=armv5t" {farcall-thumb-arm.s} |
| 380 | {{objdump -d farcall-thumb-arm-blx.d}} |
| 381 | "farcall-thumb-arm-blx"} |
| 382 | {"Thumb-ARM farcall with BLX (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-W -march=armv5t" {farcall-thumb-arm.s} |
| 383 | {{objdump -d farcall-thumb-arm-blx-pic-veneer.d}} |
| 384 | "farcall-thumb-arm-blx-pic-veneer"} |
| 385 | {"Thumb-ARM farcall (PIC veneer)" "-Ttext 0x1000 --section-start .foo=0x2001014 --pic-veneer" "-W" {farcall-thumb-arm.s} |
| 386 | {{objdump -d farcall-thumb-arm-pic-veneer.d}} |
| 387 | "farcall-thumb-arm-pic-veneer"} |
| 388 | |
| 389 | {"Multiple farcalls" "-Ttext 0x1000 --section-start .foo=0x2002020" "" {farcall-mix.s} |
| 390 | {{objdump -d farcall-mix.d}} |
| 391 | "farcall-mix"} |
| 392 | {"Multiple farcalls from several sections" "-Ttext 0x1000 --section-start .mytext=0x2000 --section-start .foo=0x2003020" "" {farcall-mix2.s} |
| 393 | {{objdump -d farcall-mix2.d}} |
| 394 | "farcall-mix2"} |
| 395 | |
| 396 | {"Default group size" "-Ttext 0x1000 --section-start .foo=0x2003020" "" {farcall-group.s farcall-group2.s} |
| 397 | {{objdump -d farcall-group.d}} |
| 398 | "farcall-group-default"} |
| 399 | {"Group size=2" "-Ttext 0x1000 --section-start .foo=0x2003020 --stub-group-size=2" "" {farcall-group.s farcall-group2.s} |
| 400 | {{objdump -d farcall-group-size2.d}} |
| 401 | "farcall-group-size2"} |
| 402 | {"Group size limit" "-Ttext 0x1000 --section-start .far=0x2003020" "" {farcall-group3.s farcall-group4.s} |
| 403 | {{objdump -d farcall-group-limit.d}} |
| 404 | "farcall-group-limit"} |
| 405 | |
| 406 | {"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" "" |
| 407 | {farcall-mixed-app.s} |
| 408 | {{objdump -fdw farcall-mixed-app.d} {objdump -Rw farcall-mixed-app.r} |
| 409 | {readelf -Ds farcall-mixed-app.sym}} |
| 410 | "farcall-mixed-app"} |
| 411 | {"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" "" |
| 412 | {farcall-mixed-app.s} |
| 413 | {{objdump -fdw farcall-mixed-app-v5.d} {objdump -Rw farcall-mixed-app.r} |
| 414 | {readelf -Ds farcall-mixed-app.sym}} |
| 415 | "farcall-mixed-app-v5"} |
| 416 | |
| 417 | {"Mixed ARM/Thumb shared library with long branches" "-shared -T arm-lib.ld" "" |
| 418 | {farcall-mixed-lib1.s farcall-mixed-lib2.s} |
| 419 | {{objdump -fdw farcall-mixed-lib.d}} |
| 420 | "farcall-mixed-lib.so"} |
| 421 | |
| 422 | } |
| 423 | |
| 424 | run_ld_link_tests $armeabitests |
| 425 | run_dump_test "attr-merge-wchar-00" |
| 426 | run_dump_test "attr-merge-wchar-02" |
| 427 | run_dump_test "attr-merge-wchar-04" |
| 428 | run_dump_test "attr-merge-wchar-20" |
| 429 | run_dump_test "attr-merge-wchar-22" |
| 430 | run_dump_test "attr-merge-wchar-24" |
| 431 | run_dump_test "attr-merge-wchar-40" |
| 432 | run_dump_test "attr-merge-wchar-42" |
| 433 | run_dump_test "attr-merge-wchar-44" |
| 434 | run_dump_test "attr-merge-wchar-00-nowarn" |
| 435 | run_dump_test "attr-merge-wchar-02-nowarn" |
| 436 | run_dump_test "attr-merge-wchar-04-nowarn" |
| 437 | run_dump_test "attr-merge-wchar-20-nowarn" |
| 438 | run_dump_test "attr-merge-wchar-22-nowarn" |
| 439 | run_dump_test "attr-merge-wchar-24-nowarn" |
| 440 | run_dump_test "attr-merge-wchar-40-nowarn" |
| 441 | run_dump_test "attr-merge-wchar-42-nowarn" |
| 442 | run_dump_test "attr-merge-wchar-44-nowarn" |
| 443 | run_dump_test "farcall-section" |
| 444 | run_dump_test "attr-merge-unknown-1" |
| 445 | run_dump_test "attr-merge-unknown-2" |
| 446 | run_dump_test "attr-merge-unknown-2r" |
| 447 | run_dump_test "attr-merge-unknown-3" |
| 448 | run_dump_test "unwind-1" |
| 449 | run_dump_test "unwind-2" |
| 450 | run_dump_test "unwind-3" |
| 451 | run_dump_test "unwind-4" |
| 452 | run_dump_test "unwind-5" |
| 453 | run_dump_test "attr-merge-vfp-1" |
| 454 | run_dump_test "attr-merge-vfp-1r" |
| 455 | run_dump_test "attr-merge-vfp-2" |
| 456 | run_dump_test "attr-merge-vfp-2r" |
| 457 | run_dump_test "attr-merge-vfp-3" |
| 458 | run_dump_test "attr-merge-vfp-3r" |
| 459 | run_dump_test "attr-merge-vfp-4" |
| 460 | run_dump_test "attr-merge-vfp-4r" |
| 461 | run_dump_test "attr-merge-vfp-5" |
| 462 | run_dump_test "attr-merge-vfp-5r" |