summaryrefslogtreecommitdiff
path: root/lib/libc/arch
diff options
context:
space:
mode:
authorMartynas Venckus <martynas@cvs.openbsd.org>2013-04-23 21:02:52 +0000
committerMartynas Venckus <martynas@cvs.openbsd.org>2013-04-23 21:02:52 +0000
commite82d73b295e5f0eceec15f1d5495c043ae5341dc (patch)
tree98e4acabf1649d879fd000ce2af311231687375c /lib/libc/arch
parentd4d4749bf16b9ae4282b28264de0f9dc581b17eb (diff)
Do a PC-relative relocation for _map rather than going through
GOTPCREL. Uncovered after the binutils patch where it isn't optimized away at assembly and is forced to go through GOTPCREL. But _map is effectively a local variable. Found with cephes by guenther@. OK guenther@, kettenis@, deraadt@.
Diffstat (limited to 'lib/libc/arch')
-rw-r--r--lib/libc/arch/amd64/gen/flt_rounds.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/arch/amd64/gen/flt_rounds.S b/lib/libc/arch/amd64/gen/flt_rounds.S
index 81077fae55f..2e0e5f58ef3 100644
--- a/lib/libc/arch/amd64/gen/flt_rounds.S
+++ b/lib/libc/arch/amd64/gen/flt_rounds.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: flt_rounds.S,v 1.2 2012/08/22 17:19:34 pascal Exp $ */
+/* $OpenBSD: flt_rounds.S,v 1.3 2013/04/23 21:02:51 martynas Exp $ */
/* $NetBSD: flt_rounds.S,v 1.2 2002/06/06 23:04:35 fvdl Exp $ */
/*
@@ -22,7 +22,7 @@ ENTRY(__flt_rounds)
shrl $10,%eax
andl $3,%eax
#ifdef __PIC__
- leaq PIC_GOT(_map),%rcx
+ leaq _map(%rip),%rcx
movb (%rcx,%rax,1),%al
#else
movb _map(,%rax,1),%al