From 644a512e560147324ecf74ebce5e336bc57dd7bf Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Tue, 25 Aug 2020 16:00:44 -0700 Subject: symbols: Change implementation details of DECLARE_OPTIONAL_REGION() It seems that GCC's LTO doesn't like the way we implement DECLARE_OPTIONAL_REGION(). This patch changes it so that rather than having a normal DECLARE_REGION() in and then an extra DECLARE_OPTIONAL_REGION() in the C file using it, you just say DECLARE_OPTIONAL_REGION() directly in (in place and instead of the usual DECLARE_REGION()). This basically looks the same way in the resulting object file but somehow LTO seems to like it better. Signed-off-by: Julius Werner Change-Id: I6096207b311d70c8e9956cd9406bec45be04a4a2 Reviewed-on: https://review.coreboot.org/c/coreboot/+/44791 Tested-by: build bot (Jenkins) Reviewed-by: Jacob Garber Reviewed-by: Hung-Te Lin Reviewed-by: HAOUAS Elyes --- src/vendorcode/google/chromeos/symbols.h | 2 +- src/vendorcode/google/chromeos/watchdog.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'src/vendorcode/google/chromeos') diff --git a/src/vendorcode/google/chromeos/symbols.h b/src/vendorcode/google/chromeos/symbols.h index 1e966da338..45f9c3e10b 100644 --- a/src/vendorcode/google/chromeos/symbols.h +++ b/src/vendorcode/google/chromeos/symbols.h @@ -5,6 +5,6 @@ #include -DECLARE_REGION(watchdog_tombstone) +DECLARE_OPTIONAL_REGION(watchdog_tombstone) #endif /* __CHROMEOS_SYMBOLS_H */ diff --git a/src/vendorcode/google/chromeos/watchdog.c b/src/vendorcode/google/chromeos/watchdog.c index 5b3f1844a7..d3273cb442 100644 --- a/src/vendorcode/google/chromeos/watchdog.c +++ b/src/vendorcode/google/chromeos/watchdog.c @@ -14,8 +14,6 @@ #define WATCHDOG_TOMBSTONE_MAGIC 0x9d2f41a7 -DECLARE_OPTIONAL_REGION(watchdog_tombstone); - static void elog_handle_watchdog_tombstone(void *unused) { bool flag = false; -- cgit v1.2.3