1 From 732913a8c35c7b25c0cbf6903cab1ad6b602b525 Mon Sep 17 00:00:00 2001
2 From: Khem Raj <raj.khem@gmail.com>
3 Date: Thu, 22 Mar 2018 22:44:03 -0700
4 Subject: [PATCH] Ensure that packed structs follow the gcc memory layout
7 https://sourceware.org/git/?p=elfutils.git;a=commit;h=17d7194d291bf91d130b78e06cbe27b290e0376d
9 Helps fixing alignment errors e.g.
10 linux-core-note.c:116:1: error: alignment 2 of 'struct m68k_prstatus
11 ' is less than 4 [-Werror=packed-not-aligned]
15 Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commit;h=17d7194d291bf91d130b78e06cbe27b290e0376d]
17 Signed-off-by: Khem Raj <raj.khem@gmail.com>
19 backends/linux-core-note.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
22 diff --git a/backends/linux-core-note.c b/backends/linux-core-note.c
23 index 5f06c896..9faae4c3 100644
24 --- a/backends/linux-core-note.c
25 +++ b/backends/linux-core-note.c
26 @@ -111,7 +111,7 @@ struct EBLHOOK(prstatus)
27 FIELD (INT, pr_fpvalid);
30 - __attribute__ ((packed, aligned (ALIGN_PRSTATUS)))
31 + attribute_packed __attribute__ ((aligned (ALIGN_PRSTATUS)))