From 8a880df37d5e2984fe300488c9f0c5d8436724d3 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sat, 5 Mar 2022 15:20:18 +0800 Subject: [PATCH] syslog/ramlog: Fix error: argument to 'section' attribute is not valid mach-o section specifier requires a segment and section separated by a comma Signed-off-by: Xiang Xiao --- drivers/syslog/Kconfig | 1 + drivers/syslog/ramlog.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/syslog/Kconfig b/drivers/syslog/Kconfig index 408aa47291..ccf65e56f8 100644 --- a/drivers/syslog/Kconfig +++ b/drivers/syslog/Kconfig @@ -244,6 +244,7 @@ if RAMLOG_SYSLOG config RAMLOG_BUFFER_SECTION string "The section where ramlog buffer is located" default ".bss" + depends on !ARCH_SIM ---help--- The section where ramlog buffer is located. The section shall not be initialized on system boot. diff --git a/drivers/syslog/ramlog.c b/drivers/syslog/ramlog.c index a500d597fd..880ab30671 100644 --- a/drivers/syslog/ramlog.c +++ b/drivers/syslog/ramlog.c @@ -125,7 +125,10 @@ static const struct file_operations g_ramlogfops = #ifdef CONFIG_RAMLOG_SYSLOG static char g_sysbuffer[CONFIG_RAMLOG_BUFSIZE] - locate_data(CONFIG_RAMLOG_BUFFER_SECTION); +#ifdef CONFIG_RAMLOG_BUFFER_SECTION + locate_data(CONFIG_RAMLOG_BUFFER_SECTION) +#endif +; /* This is the device structure for the console or syslogging function. It * must be statically initialized because the RAMLOG ramlog_putc function