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