diff options
author | pascal <> | 2012-08-21 21:12:05 +0000 |
---|---|---|
committer | pascal <> | 2012-08-21 21:12:05 +0000 |
commit | dd5090d7a54ea16ff78b52384145bf545d749762 (patch) | |
tree | c730e4ad6f68d9d682b3d8f100d020bc2408132d /src | |
parent | 10130c12761620d6e028abed0e57c43e84bded29 (diff) | |
download | openbsd-dd5090d7a54ea16ff78b52384145bf545d749762.tar.gz openbsd-dd5090d7a54ea16ff78b52384145bf545d749762.tar.bz2 openbsd-dd5090d7a54ea16ff78b52384145bf545d749762.zip |
When deciding whether we're PIC in a (generated) asm file, check for both PIC
and __PIC__ defines. Makes things easier for PIE.
ok djm@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/perlasm/x86gas.pl | 2 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/perlasm/x86gas.pl | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/perlasm/x86gas.pl b/src/lib/libcrypto/perlasm/x86gas.pl index 15e17f25d0..9a1cce026e 100644 --- a/src/lib/libcrypto/perlasm/x86gas.pl +++ b/src/lib/libcrypto/perlasm/x86gas.pl | |||
@@ -181,7 +181,7 @@ sub ::picmeup | |||
181 | { my($dst,$sym,$base,$reflabel)=@_; | 181 | { my($dst,$sym,$base,$reflabel)=@_; |
182 | 182 | ||
183 | if ($::openbsd) | 183 | if ($::openbsd) |
184 | { &::emitraw("#ifdef PIC"); | 184 | { &::emitraw("#if defined(PIC) || defined(__PIC__)"); |
185 | &::emitraw("PIC_PROLOGUE"); | 185 | &::emitraw("PIC_PROLOGUE"); |
186 | &::mov($dst, &::DWP("PIC_GOT($sym)")); | 186 | &::mov($dst, &::DWP("PIC_GOT($sym)")); |
187 | &::emitraw("PIC_EPILOGUE"); | 187 | &::emitraw("PIC_EPILOGUE"); |
diff --git a/src/lib/libssl/src/crypto/perlasm/x86gas.pl b/src/lib/libssl/src/crypto/perlasm/x86gas.pl index 15e17f25d0..9a1cce026e 100644 --- a/src/lib/libssl/src/crypto/perlasm/x86gas.pl +++ b/src/lib/libssl/src/crypto/perlasm/x86gas.pl | |||
@@ -181,7 +181,7 @@ sub ::picmeup | |||
181 | { my($dst,$sym,$base,$reflabel)=@_; | 181 | { my($dst,$sym,$base,$reflabel)=@_; |
182 | 182 | ||
183 | if ($::openbsd) | 183 | if ($::openbsd) |
184 | { &::emitraw("#ifdef PIC"); | 184 | { &::emitraw("#if defined(PIC) || defined(__PIC__)"); |
185 | &::emitraw("PIC_PROLOGUE"); | 185 | &::emitraw("PIC_PROLOGUE"); |
186 | &::mov($dst, &::DWP("PIC_GOT($sym)")); | 186 | &::mov($dst, &::DWP("PIC_GOT($sym)")); |
187 | &::emitraw("PIC_EPILOGUE"); | 187 | &::emitraw("PIC_EPILOGUE"); |