diff --git a/hermit/libkern/stdio.c b/hermit/libkern/stdio.c index c09b3f74f..89119f8db 100644 --- a/hermit/libkern/stdio.c +++ b/hermit/libkern/stdio.c @@ -47,6 +47,10 @@ static uint32_t early_print = NO_EARLY_PRINT; #endif static spinlock_irqsave_t olock = SPINLOCK_IRQSAVE_INIT; static atomic_int32_t kmsg_counter = ATOMIC_INIT(-1); + +/* Workaround for a compiler bug. gcc 5.1 seems to ignore this array, if we + defined it as as static array. At least it is as static array not part of + the binary. => no valid kernel messages */ /* static */ unsigned char kmessages[KMSG_SIZE] __attribute__ ((section(".kmsg"))) = {[0 ... KMSG_SIZE-1] = 0x00}; int koutput_init(void)