Fix: Restartable Sequences: testing: ip-relative x86-64
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 5 Sep 2016 22:20:26 +0000 (18:20 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 21 Oct 2016 22:28:16 +0000 (18:28 -0400)
Allow rseq to be used in PIC code (library code) on x86-64.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tools/testing/selftests/rseq/rseq-x86.h

index cca5ba2f9ad6d07af5653fc2b3e47220f2611a0d..9dab0946a35abf8eac9e41890f1ffcf475a0f98e 100644 (file)
@@ -65,7 +65,8 @@ do { \
                "1:\n\t" \
                _setup \
                RSEQ_INJECT_ASM(1) \
-               "movq $3b, %[rseq_cs]\n\t" \
+               "leaq 3b(%%rip), %%rax\n\t" \
+               "movq %%rax, %[rseq_cs]\n\t" \
                RSEQ_INJECT_ASM(2) \
                "cmpl %[start_event_counter], %[current_event_counter]\n\t" \
                "jnz 4f\n\t" \
@@ -89,7 +90,7 @@ do { \
                  _spec_input \
                  _final_input \
                  RSEQ_INJECT_INPUT \
-               : "memory", "cc" \
+               : "memory", "cc", "rax" \
                  _extra_clobber \
                  RSEQ_INJECT_CLOBBER \
                : _failure \
This page took 0.024273 seconds and 5 git commands to generate.