diff mbox series

[06/11] version: Put version_string[] variable into section .text_version_string

Message ID 20210802131838.21097-7-pali@kernel.org
State Rejected
Delegated to: Tom Rini
Headers show
Series Reduce usage of timestamp macros | expand

Commit Message

Pali Rohár Aug. 2, 2021, 1:18 p.m. UTC
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(-)

Comments

Tom Rini Aug. 2, 2021, 1:58 p.m. UTC | #1
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 mbox series

Patch

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[])