diff options
author | emaste <emaste@FreeBSD.org> | 2016-05-05 21:25:41 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2016-05-05 21:25:41 +0000 |
commit | f05973c5eca6f66c0e216887c7125608d22b3689 (patch) | |
tree | bcb7f5209895287535d14fda3edc1e7e73b5db0a /secure/lib/libcrypto/i386 | |
parent | a72207b61f7b8197f1bf446e4352e09925417f6f (diff) | |
download | FreeBSD-src-f05973c5eca6f66c0e216887c7125608d22b3689.zip FreeBSD-src-f05973c5eca6f66c0e216887c7125608d22b3689.tar.gz |
Make libcrypto position independent on i386
Prior to this change libcrypto ended up with a .text relocation.
Submitted by: Rafael EspĂndola (earlier version)
Reviewed by: kib
Approved by: so (glebius)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6164
Diffstat (limited to 'secure/lib/libcrypto/i386')
-rw-r--r-- | secure/lib/libcrypto/i386/crypt586.S (renamed from secure/lib/libcrypto/i386/crypt586.s) | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/secure/lib/libcrypto/i386/crypt586.s b/secure/lib/libcrypto/i386/crypt586.S index 43f903a..a02a3fc 100644 --- a/secure/lib/libcrypto/i386/crypt586.s +++ b/secure/lib/libcrypto/i386/crypt586.S @@ -14,7 +14,15 @@ fcrypt_body: xorl %edi,%edi xorl %esi,%esi +#ifdef PIC + calll .L1 +.L1: + popl %edx + addl $_GLOBAL_OFFSET_TABLE_+(.-.L1), %edx + movl DES_SPtrans@GOT(%edx), %edx +#else leal DES_SPtrans,%edx +#endif pushl %edx movl 28(%esp),%ebp pushl $25 |