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/lib/bootblock.c | 2 -- src/lib/timestamp.c | 2 -- 2 files changed, 4 deletions(-) (limited to 'src/lib') diff --git a/src/lib/bootblock.c b/src/lib/bootblock.c index 1c433d008e..7ee246e459 100644 --- a/src/lib/bootblock.c +++ b/src/lib/bootblock.c @@ -10,8 +10,6 @@ #include #include -DECLARE_OPTIONAL_REGION(timestamp); - __weak void bootblock_mainboard_early_init(void) { /* no-op */ } __weak void bootblock_soc_early_init(void) { /* do nothing */ } __weak void bootblock_soc_init(void) { /* do nothing */ } diff --git a/src/lib/timestamp.c b/src/lib/timestamp.c index 5121eb859c..7347d07b16 100644 --- a/src/lib/timestamp.c +++ b/src/lib/timestamp.c @@ -11,8 +11,6 @@ #define MAX_TIMESTAMPS 192 -DECLARE_OPTIONAL_REGION(timestamp); - /* This points to the active timestamp_table and can change within a stage as CBMEM comes available. */ static struct timestamp_table *glob_ts_table; -- cgit v1.2.3