Message ID | 20210802131838.21097-7-pali@kernel.org |
---|---|
State | Rejected |
Delegated to: | Tom Rini |
Headers | show |
Series | Reduce usage of timestamp macros | expand |
On Mon, Aug 02, 2021 at 03:18:33PM +0200, Pali Rohár wrote: > This would allow to reference this variable easily from linker scripts. > > Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Tom Rini <trini@konsulko.com>
diff --git a/cmd/version.c b/cmd/version.c index 965ac2e2144d..ad632fe4fb7a 100644 --- a/cmd/version.c +++ b/cmd/version.c @@ -13,7 +13,7 @@ #include <asm/cb_sysinfo.h> #endif -const char __weak version_string[] = U_BOOT_VERSION_STRING; +const char __weak version_string[] __section(".text_version_string") = U_BOOT_VERSION_STRING; static int do_version(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
This would allow to reference this variable easily from linker scripts. Signed-off-by: Pali Rohár <pali@kernel.org> --- cmd/version.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)