diff options
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch b/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch new file mode 100644 index 0000000000..b2f2bbdf46 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-5.4/0050-powerpc-pass-secure-plt-to-the-linker.patch | |||
@@ -0,0 +1,66 @@ | |||
1 | From 4fa0cf03678f849917dcc3d149989b7fecdbe276 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 2 Feb 2016 21:10:00 -0800 | ||
4 | Subject: [PATCH 50/51] powerpc pass --secure-plt to the linker | ||
5 | |||
6 | Secure-plt when enabled does not pass right options to linker | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | Upstream-Status: Pending | ||
11 | gcc/config/rs6000/linux64.h | 4 ++++ | ||
12 | gcc/config/rs6000/sysv4.h | 2 ++ | ||
13 | 2 files changed, 6 insertions(+) | ||
14 | |||
15 | diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h | ||
16 | index 679da4b..3ca7cd7 100644 | ||
17 | --- a/gcc/config/rs6000/linux64.h | ||
18 | +++ b/gcc/config/rs6000/linux64.h | ||
19 | @@ -174,20 +174,24 @@ extern int dot_symbols; | ||
20 | #undef ASM_DEFAULT_SPEC | ||
21 | #undef ASM_SPEC | ||
22 | #undef LINK_OS_LINUX_SPEC | ||
23 | +#undef LINK_SECURE_PLT_SPEC | ||
24 | |||
25 | #ifndef RS6000_BI_ARCH | ||
26 | #define ASM_DEFAULT_SPEC "-mppc64" | ||
27 | #define ASM_SPEC "%(asm_spec64) %(asm_spec_common)" | ||
28 | #define LINK_OS_LINUX_SPEC "%(link_os_linux_spec64)" | ||
29 | +#define LINK_SECURE_PLT_SPEC "" | ||
30 | #else | ||
31 | #if DEFAULT_ARCH64_P | ||
32 | #define ASM_DEFAULT_SPEC "-mppc%{!m32:64}" | ||
33 | #define ASM_SPEC "%{m32:%(asm_spec32)}%{!m32:%(asm_spec64)} %(asm_spec_common)" | ||
34 | #define LINK_OS_LINUX_SPEC "%{m32:%(link_os_linux_spec32)}%{!m32:%(link_os_linux_spec64)}" | ||
35 | +#define LINK_SECURE_PLT_SPEC "%{m32: " LINK_SECURE_PLT_DEFAULT_SPEC "}" | ||
36 | #else | ||
37 | #define ASM_DEFAULT_SPEC "-mppc%{m64:64}" | ||
38 | #define ASM_SPEC "%{!m64:%(asm_spec32)}%{m64:%(asm_spec64)} %(asm_spec_common)" | ||
39 | #define LINK_OS_LINUX_SPEC "%{!m64:%(link_os_linux_spec32)}%{m64:%(link_os_linux_spec64)}" | ||
40 | +#define LINK_SECURE_PLT_SPEC "%{!m64: " LINK_SECURE_PLT_DEFAULT_SPEC "}" | ||
41 | #endif | ||
42 | #endif | ||
43 | |||
44 | diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h | ||
45 | index 8794fa5..0835551 100644 | ||
46 | --- a/gcc/config/rs6000/sysv4.h | ||
47 | +++ b/gcc/config/rs6000/sysv4.h | ||
48 | @@ -571,6 +571,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) | ||
49 | : %(link_start_default) }" | ||
50 | |||
51 | #define LINK_START_DEFAULT_SPEC "" | ||
52 | +#define LINK_SECURE_PLT_SPEC LINK_SECURE_PLT_DEFAULT_SPEC | ||
53 | |||
54 | #undef LINK_SPEC | ||
55 | #define LINK_SPEC "\ | ||
56 | @@ -578,6 +579,7 @@ ENDIAN_SELECT(" -mbig", " -mlittle", DEFAULT_ASM_ENDIAN) | ||
57 | %{R*} \ | ||
58 | %(link_shlib) \ | ||
59 | %{!T*: %(link_start) } \ | ||
60 | +%{!static: %{!mbss-plt: %(link_secure_plt_default)}} \ | ||
61 | %(link_os)" | ||
62 | |||
63 | /* Shared libraries are not default. */ | ||
64 | -- | ||
65 | 2.7.0 | ||
66 | |||