not the address of its GOT entry. The current code mixed the high bits of
the GOT entry address with the low bits of the true address. This only
worked by accident for small binaries where _DYNAMIC and its GOT entry
happen to reside on the same page.
ok guenther@, mortimer@
-/* $OpenBSD: md_init.h,v 1.4 2017/08/11 20:13:30 guenther Exp $ */
+/* $OpenBSD: md_init.h,v 1.5 2018/07/24 09:27:44 kettenis Exp $ */
/*-
* Copyright (c) 2001 Ross Harvey
" sub sp, sp, #8+8+(16*8) \n" \
" add x1, sp, #4 \n" \
" \n" \
- " adrp x2, :got:_DYNAMIC \n" \
+ " adrp x2, _DYNAMIC \n" \
" add x2, x2, #:lo12:_DYNAMIC \n" \
" \n" \
" bl _dl_boot_bind \n" \
-/* $OpenBSD: ldasm.S,v 1.5 2017/12/21 00:32:55 kettenis Exp $ */
+/* $OpenBSD: ldasm.S,v 1.6 2018/07/24 09:27:44 kettenis Exp $ */
/*
* Copyright (c) 2016 Dale Rahn
mov x0, x29 // original stack
mov x1, x20 // dl_data
- adrp x2, :got:_DYNAMIC /* &_DYNAMIC */
+ adrp x2, _DYNAMIC /* &_DYNAMIC */
add x2, x2, #:lo12:_DYNAMIC
bl _dl_boot_bind