aboutsummaryrefslogtreecommitdiff
path: root/src/arch/x86/car.ld
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-22 12:56:22 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-09-11 06:28:27 +0000
commit910490f3f48d418824276045489d1ceb221e0ba1 (patch)
tree13b0a4dce7e0928acc9c0a5f0bb0e8c039b82001 /src/arch/x86/car.ld
parent1095bfafed27a9e71b646ae8515c367480d0ed04 (diff)
arch/x86: Restrict use of _car_global[start|end]
Restrict the use of symbol names _car_global_[start|end] to be used exclusively with CAR_GLOBAL_MIGRATION=y. They just alias the start and end of .bss section in CAR. Change-Id: I36c858a4f181516d4c61f9fd1d5005c7d2c06057 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35034 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src/arch/x86/car.ld')
-rw-r--r--src/arch/x86/car.ld10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/arch/x86/car.ld b/src/arch/x86/car.ld
index a09150fcd9..6ccbd8c236 100644
--- a/src/arch/x86/car.ld
+++ b/src/arch/x86/car.ld
@@ -64,11 +64,13 @@
. += 80;
_car_ehci_dbg_info_end = .;
- /* _car_global_start and _car_global_end provide symbols to per-stage
+ /* _bss and _ebss provide symbols to per-stage
* variables that are not shared like the timestamp and the pre-ram
* cbmem console. This is useful for clearing this area on a per-stage
* basis when more than one stage uses cache-as-ram for CAR_GLOBALs. */
- _car_global_start = .;
+
+ . = ALIGN(ARCH_POINTER_ALIGN_SIZE);
+ _bss = .;
#if ENV_STAGE_HAS_BSS_SECTION
/* Allow global uninitialized variables for stages without CAR teardown. */
*(.bss)
@@ -76,10 +78,12 @@
*(.sbss)
*(.sbss.*)
#else
+ _car_global_start = .;
*(.car.global_data);
+ _car_global_end = .;
#endif
. = ALIGN(ARCH_POINTER_ALIGN_SIZE);
- _car_global_end = .;
+ _ebss = .;
_car_unallocated_start = .;
#if !CONFIG(C_ENVIRONMENT_BOOTBLOCK)