Print this page
10366 ld(1) should support GNU-style linker sets
10367 ld(1) tests should be a real test suite
10368 want an ld(1) regression test for i386 LD tls transition (10267)

*** 18,27 **** --- 18,28 ---- if /usr/bin/fgrep -q "${pattern}"; then print -u2 "pass: $name" else print -u2 "FAIL: $name" + exit 1 fi } function dis_test { name=${1}
*** 30,40 **** pattern=${4} dis -F${func} ${file} | grep_test "${name}" "${pattern}" } ! make PROTO="${1}" dis_test "addq-->leaq 1" func style1 \ 'func+0x10: 48 8d 92 f8 ff ff leaq -0x8(%rdx),%rdx' dis_test "addq-->leaq 2" func style1 \ 'func+0x17: 48 8d b6 f0 ff ff leaq -0x10(%rsi),%rsi' --- 31,46 ---- pattern=${4} dis -F${func} ${file} | grep_test "${name}" "${pattern}" } ! if [[ -z $ELF_TESTS ]]; then ! print -u2 "Don't know where the test data is rooted"; ! exit 1; ! fi ! ! make -f ${ELF_TESTS}/tests/tls/x64/ie/Makefile.test dis_test "addq-->leaq 1" func style1 \ 'func+0x10: 48 8d 92 f8 ff ff leaq -0x8(%rdx),%rdx' dis_test "addq-->leaq 2" func style1 \ 'func+0x17: 48 8d b6 f0 ff ff leaq -0x10(%rsi),%rsi'
*** 56,62 **** 'main+0x4: 49 c7 c5 f0 ff ff movq $-0x10,%r13 <0xfffffffffffffff0>' dis_test "movq-->movq incase of SIB" main style2-with-r12 \ 'main+0x4: 49 c7 c4 f0 ff ff movq $-0x10,%r12 <0xfffffffffffffff0>' ! make PROTO="${1}" fail 2>&1 | grep_test "bad insn sequence" \ 'ld: fatal: relocation error: R_AMD64_TPOFF32: file style2-with-badness.o: symbol foo: section .text: offset 0x7, relocation against unknown TLS instruction sequence' --- 62,68 ---- 'main+0x4: 49 c7 c5 f0 ff ff movq $-0x10,%r13 <0xfffffffffffffff0>' dis_test "movq-->movq incase of SIB" main style2-with-r12 \ 'main+0x4: 49 c7 c4 f0 ff ff movq $-0x10,%r12 <0xfffffffffffffff0>' ! make -f ${ELF_TESTS}/tests/tls/x64/ie/Makefile.test fail 2>&1 | grep_test "bad insn sequence" \ 'ld: fatal: relocation error: R_AMD64_TPOFF32: file style2-with-badness.o: symbol foo: section .text: offset 0x7, relocation against unknown TLS instruction sequence'