libucontext: proper patch for x86

Make renaming of local __i868.get_pc_thunk.bx to i686_get_pc_thunk_bx a proper patch.
This commit is contained in:
Jürgen Buchmüller 2021-01-02 23:53:57 +01:00
parent 1e83a8c3d2
commit 8038562968
2 changed files with 20 additions and 3 deletions

View File

@ -0,0 +1,20 @@
--- arch/x86/startcontext.S 2020-05-18 05:28:21.000000000 +0200
+++ arch/x86/startcontext.S 2021-01-02 23:52:32.728187160 +0100
@@ -18,7 +18,7 @@
cmpl $0, (%esp)
/* restore global offset table, exit@plt and __setcontext@plt need this */
- call __i686.get_pc_thunk.bx
+ call i686_get_pc_thunk_bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx
/* if we have no linked context, lets get out of here */
@@ -35,7 +35,7 @@
/* something is really hosed, call hlt to force termination */
hlt
-__i686.get_pc_thunk.bx:
+i686_get_pc_thunk_bx:
mov (%esp), %ebx
ret
END(__start_context)

View File

@ -22,9 +22,6 @@ mips*) export LIBUCONTEXT_ARCH="mips";;
esac
do_build() {
case "${XBPS_TARGET_MACHINE}" in
i686*) vsed -i arch/x86/startcontext.S -e "s;__i686.get_pc_thunk.bx;i686_get_pc_thunk_bx;g" ;;
esac
make ARCH="${LIBUCONTEXT_ARCH}"
}