mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 16:37:50 +00:00
c5783af354
As done for other sections, define the extern as a character array,
which relaxes many of the compiler-time object size checks, which would
otherwise assume it's a single long. Solves the following build error:
arch/sh/kernel/machvec.c: error: array subscript 'struct sh_machine_vector[0]' is partly outside array bounds of 'long int[1]' [-Werror=array-bounds]: => 105:33
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: linux-sh@vger.kernel.org
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/lkml/alpine.DEB.2.22.394.2209050944290.964530@ramsan.of.borg/
Fixes: 9655ad03af
("sh: Fixup machvec support.")
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Acked-by: Rich Felker <dalias@libc.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
12 lines
311 B
C
12 lines
311 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ASM_SH_SECTIONS_H
|
|
#define __ASM_SH_SECTIONS_H
|
|
|
|
#include <asm-generic/sections.h>
|
|
|
|
extern char __machvec_start[], __machvec_end[];
|
|
extern char __uncached_start, __uncached_end;
|
|
extern char __start_eh_frame[], __stop_eh_frame[];
|
|
|
|
#endif /* __ASM_SH_SECTIONS_H */
|
|
|