Thread (45 messages) 45 messages, 9 authors, 2021-10-05

Re: [PATCH 10/10] vmlinux.lds.h: remove old check for GCC 4.9

From: Kees Cook <hidden>
Date: 2021-09-13 16:28:45
Also in: lkml

On Fri, Sep 10, 2021 at 04:40:47PM -0700, Nick Desaulniers wrote:
quoted hunk ↗ jump to hunk
Now that GCC 5.1 is the minimally supported version of GCC, we can
effectively revert

commit 85c2ce9104eb ("sched, vmlinux.lds: Increase STRUCT_ALIGNMENT to
64 bytes for GCC-4.9")

Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Nick Desaulniers <redacted>
---
 include/asm-generic/vmlinux.lds.h | 4 ----
 1 file changed, 4 deletions(-)
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index aa50bf2959fe..f2984af2b85b 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -116,11 +116,7 @@
  * GCC 4.5 and later have a 32 bytes section alignment for structures.
  * Except GCC 4.9, that feels the need to align on 64 bytes.
  */
-#if __GNUC__ == 4 && __GNUC_MINOR__ == 9
-#define STRUCT_ALIGNMENT 64
-#else
 #define STRUCT_ALIGNMENT 32
-#endif
 #define STRUCT_ALIGN() . = ALIGN(STRUCT_ALIGNMENT)
Yeah, looking at users of the macro, I think it's best to keep the macro
instead of hard-coding it everywhere.

Acked-by: Kees Cook <redacted>

-- 
Kees Cook
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help