[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250213185408.m5aogf2trvhvi2td@jpoimboe>
Date: Thu, 13 Feb 2025 10:54:08 -0800
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Peter Zijlstra <peterz@...radead.org>, loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org, Nathan Chancellor <nathan@...nel.org>,
llvm@...ts.linux.dev
Subject: Re: [PATCH] compiler.h: Specify correct attribute for
.rodata..c_jump_table
On Thu, Feb 13, 2025 at 08:38:22PM +0800, Tiezhu Yang wrote:
> Based on the above analysis, in order to avoid changing the behavior of
> GNU assembler and silence the GNU assembler warning, is it possible to
> rename ".rodata..c_jump_table" to ".c_jump_table"?
Yeah, though for the final vmlinux link we'd still need it to end up in
.rodata so it remains read-only at runtime.
So we'd basically just have to add it to the RO_DATA() macro in
include/asm-generic/vmlinux.lds.h.
Does it still work if we call it ..rodata.c_jump_table or so? Then we
could just add "*(..rodata.*) to RO_DATA(). That would be somewhat less
surprising, and would also create a standard way for other code to do
the same thing by prefixing with "..rodata.".
--
Josh
Powered by blists - more mailing lists