Commit 824e8c28 authored by Martin Storsjö's avatar Martin Storsjö

arm: Clear the gp register alias at the end of functions

We reset .Lpic_gp to zero at the start of each function, which means
that the logic within movrelx for clearing gp when necessary will
be missed.

This fixes using movrelx in different functions with a different
helper register.
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 905cdcaa
......@@ -83,6 +83,9 @@ ELF .section .note.GNU-stack,"",%progbits @ Mark stack as non-executable
put_pic %(.Lpic_idx - 1)
.noaltmacro
.endif
.if .Lpic_gp
.unreq gp
.endif
ELF .size \name, . - \name
FUNC .endfunc
.purgem endfunc
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment