prog_loader: Play nice with gc-sections
With an x86_64-elf toolchain, this code that is unused outside of ramstage, is causing undefined references. Help the compiler along a little bit by conditionally compiling the code in ramstage only. Change-Id: I75518149b53c24eda4b985b0fef856447e196dec Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-on: http://review.coreboot.org/10585 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
3e5bc1feab
commit
eec2db4da7
|
@ -121,6 +121,8 @@ fail:
|
||||||
die("Ramstage was not loaded!\n");
|
die("Ramstage was not loaded!\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __RAMSTAGE__ // gc-sections should take care of this
|
||||||
|
|
||||||
static struct prog global_payload =
|
static struct prog global_payload =
|
||||||
PROG_INIT(ASSET_PAYLOAD, CONFIG_CBFS_PREFIX "/payload");
|
PROG_INIT(ASSET_PAYLOAD, CONFIG_CBFS_PREFIX "/payload");
|
||||||
|
|
||||||
|
@ -170,3 +172,5 @@ void payload_run(void)
|
||||||
|
|
||||||
prog_run(payload);
|
prog_run(payload);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue