}
if [istarget "loongarch64-*-*"] {
- run_ld_link_tests \
- [list \
- [list \
- "64_pcrel" \
- "-e 0x0 -z relro" "" \
- "" \
- {64_pcrel.s} \
- [list \
- [list objdump -D 64_pcrel.d] \
- ] \
- "64_pcrel" \
- ] \
- ]
+ if [check_shared_lib_support] {
+ run_ld_link_tests \
+ [list \
+ [list \
+ "64_pcrel" \
+ "-e 0x0 -z relro" "" \
+ "" \
+ {64_pcrel.s} \
+ [list \
+ [list objdump -D 64_pcrel.d] \
+ ] \
+ "64_pcrel" \
+ ] \
+ ]
+ }
run_ld_link_tests \
[list \
}
if [istarget "loongarch64-*-*"] {
+ if [check_shared_lib_support] {
run_dump_test "desc-ie"
run_dump_test "desc-le"
run_dump_test "ie-le"
run_dump_test "tlsdesc-dso"
run_dump_test "desc-norelax"
run_dump_test "desc-relax"
+ }
}
}
}
- run_ld_link_tests \
- [list \
- [list \
- "loongarch relax .so build" \
- "-shared -e 0x0" "" \
- "" \
- {relax-so.s} \
- {} \
- "relax-so" \
- ] \
- ]
+ if [check_shared_lib_support] {
+ run_ld_link_tests \
+ [list \
+ [list \
+ "loongarch relax .so build" \
+ "-shared -e 0x0" "" \
+ "" \
+ {relax-so.s} \
+ {} \
+ "relax-so" \
+ ] \
+ ]
+ }
if [file exist "tmpdir/relax-so"] {
set objdump_output [run_host_cmd "objdump" "-d tmpdir/relax-so"]
# If symbol in data segment, offset need to sub segment align to prevent
# overflow.
- run_ld_link_tests \
- [list \
- [list \
- "loongarch relax segment alignment min" \
- "-e0 -Ttext 0x120004000 -pie -z relro" "" \
- "" \
- {relax-segment-min.s} \
- {} \
- "relax-segment-min" \
- ] \
- ]
+ if [check_pie_support] {
+ run_ld_link_tests \
+ [list \
+ [list \
+ "loongarch relax segment alignment min" \
+ "-e0 -Ttext 0x120004000 -pie -z relro" "" \
+ "" \
+ {relax-segment-min.s} \
+ {} \
+ "relax-segment-min" \
+ ] \
+ ]
- run_ld_link_tests \
- [list \
- [list \
- "loongarch relax segment alignment max" \
- "-e0 -Ttext 0x120004000 -pie -z relro" "" \
- "" \
- {relax-segment-max.s} \
- {} \
- "relax-segment-max" \
- ] \
- ]
+ run_ld_link_tests \
+ [list \
+ [list \
+ "loongarch relax segment alignment max" \
+ "-e0 -Ttext 0x120004000 -pie -z relro" "" \
+ "" \
+ {relax-segment-max.s} \
+ {} \
+ "relax-segment-max" \
+ ] \
+ ]
+ }
if [file exist "tmpdir/relax-tls-le"] {
set objdump_output1 [run_host_cmd "objdump" "-d tmpdir/relax-tls-le"]
}
}
- run_ld_link_tests \
- [list \
- [list \
- "loongarch relax-align" \
- "-e 0x0 -z relro" "" \
- "--no-warn" \
- {relax-align.s} \
- [list \
- [list objdump -d relax-align.dd] \
- ] \
- "relax-align" \
- ] \
- ]
+
+ if [check_shared_lib_support] {
+ run_ld_link_tests \
+ [list \
+ [list \
+ "loongarch relax-align" \
+ "-e 0x0 -z relro" "" \
+ "--no-warn" \
+ {relax-align.s} \
+ [list \
+ [list objdump -d relax-align.dd] \
+ ] \
+ "relax-align" \
+ ] \
+ ]
+ }
set objdump_flags "-s -j .data"
run_ld_link_tests \