diff options
author | Justin Hibbits <jhibbits@FreeBSD.org> | 2019-06-25 00:40:44 +0000 |
---|---|---|
committer | Justin Hibbits <jhibbits@FreeBSD.org> | 2019-06-25 00:40:44 +0000 |
commit | f62da49b2f17f279ddba946bf4bc7ba7247273a5 (patch) | |
tree | 041a7841c0913c7d28147defb90e33fda6390de3 /contrib | |
parent | da4961c796795b7337cd905b84be8dcf200d408c (diff) | |
download | src-f62da49b2f17f279ddba946bf4bc7ba7247273a5.tar.gz src-f62da49b2f17f279ddba946bf4bc7ba7247273a5.zip |
powerpc: Transition to Secure-PLT, like most other OSs
Summary:
PowerPC has two PLT models: BSS-PLT and Secure-PLT. BSS-PLT uses runtime
code generation to generate the PLT stubs. Secure-PLT was introduced with
GCC 4.1 and Binutils 2.17 (base has GCC 4.2.1 and Binutils 2.17), and is a
more secure PLT format, using a read-only linkage table, with the dynamic
linker populating a non-executable index table.
This is the libc, rtld, and kernel support only. The toolchain and build
parts will be updated separately.
Reviewed By: nwhitehorn, bdragon, pfg
Differential Revision: https://reviews.freebsd.org/D20598
MFC after: 1 month
Notes
Notes:
svn path=/head/; revision=349350
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/gcc/config/rs6000/tramp.asm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/gcc/config/rs6000/tramp.asm b/contrib/gcc/config/rs6000/tramp.asm index 013cac363b68..fe05401e039c 100644 --- a/contrib/gcc/config/rs6000/tramp.asm +++ b/contrib/gcc/config/rs6000/tramp.asm @@ -38,6 +38,7 @@ .file "tramp.asm" .section ".text" #include "ppc-asm.h" + #include "auto-host.h" #ifndef __powerpc64__ .type trampoline_initial,@object @@ -105,7 +106,7 @@ FUNC_START(__trampoline_setup) blr .Labort: -#if defined SHARED && defined HAVE_AS_REL16 +#if (defined(__PIC__) || defined(__pic__)) && defined HAVE_AS_REL16 bcl 20,31,1f 1: mflr r30 addis r30,r30,_GLOBAL_OFFSET_TABLE_-1b@ha |