vboot-utils/0001-fix-unaligned-point-value-with-GCC9.patch
2020-06-03 10:09:48 +08:00

54 lines
1.7 KiB
Diff

From 6e13a3b539105b2773e43055c2d44912cbba7a29 Mon Sep 17 00:00:00 2001
From: lei_ju <lj3074194431@163.com>
Date: Wed, 3 Jun 2020 09:03:49 +0800
Subject: [PATCH] fix unaligned point value with GCC9
---
firmware/2lib/include/2struct.h | 2 +-
firmware/include/gpt.h | 2 +-
firmware/include/vboot_struct.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/firmware/2lib/include/2struct.h b/firmware/2lib/include/2struct.h
index 1d5b353..b045a0b 100644
--- a/firmware/2lib/include/2struct.h
+++ b/firmware/2lib/include/2struct.h
@@ -213,7 +213,7 @@ struct vb2_shared_data {
uint32_t gbb_size;
-} __attribute__((packed));
+} __attribute__((aligned));
/****************************************************************************/
diff --git a/firmware/include/gpt.h b/firmware/include/gpt.h
index 4570237..f1da14d 100644
--- a/firmware/include/gpt.h
+++ b/firmware/include/gpt.h
@@ -120,7 +120,7 @@ typedef struct {
} attrs;
uint16_t name[36]; /* UTF-16 encoded partition name */
/* Remainder of entry is reserved and should be 0 */
-} __attribute__((packed)) GptEntry;
+} __attribute__((aligned)) GptEntry;
#define GPTENTRY_EXPECTED_SIZE 128
diff --git a/firmware/include/vboot_struct.h b/firmware/include/vboot_struct.h
index fd5777a..a06d038 100644
--- a/firmware/include/vboot_struct.h
+++ b/firmware/include/vboot_struct.h
@@ -478,7 +478,7 @@ typedef struct VbSharedDataHeader {
* all the fields it knows about are present. Newer firmware needs to
* use reasonable defaults when accessing older structs.
*/
-} __attribute__((packed)) VbSharedDataHeader;
+} __attribute__((aligned)) VbSharedDataHeader;
/*
* Size of VbSharedDataheader for each version
--
2.23.0