mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Peter Zijlstra <peterz@infradead.org>,
	loongarch@lists.linux.dev, linux-kernel@vger.kernel.org,
	Nathan Chancellor <nathan@kernel.org>,
	llvm@lists.linux.dev
Subject: Re: [PATCH] compiler.h: Specify correct attribute for .rodata..c_jump_table
Date: Fri, 14 Feb 2025 16:56:38 +0800	[thread overview]
Message-ID: <f4f6d6ef-28cd-922d-fa24-6dd451b44607@loongson.cn> (raw)
In-Reply-To: <20250214084415.yrffvbop2f6z3du3@jpoimboe>

On 02/14/2025 04:44 PM, Josh Poimboeuf wrote:
> On Fri, Feb 14, 2025 at 10:23:08AM +0800, Tiezhu Yang wrote:
>> I have a draft diff, I will do more test and send it
>> as a formal patch once the other patches are landed
>> because this patch depends on them.
>
> Actually since this is a bug fix, I'm thinking it should be merged in
> the tip/objtool/urgent branch so it can go in an -rc.  Then it should be
> trivial for me to rebase your patches on top.

OK, I will send a patch based on tip/objtool/urgent branch ASAP.

>> The code looks something like this:
>
> Looks good to me.  nit: loongarch can use the C_JUMP_TABLE_SECTION
> define.

Yes, thank you, hope you can amend it when applying my original patch,
maybe like this:

diff --git a/tools/objtool/arch/loongarch/special.c 
b/tools/objtool/arch/loongarch/special.c
index 27c6473608f3..e39f86d97002 100644
--- a/tools/objtool/arch/loongarch/special.c
+++ b/tools/objtool/arch/loongarch/special.c
@@ -131,7 +131,7 @@ static struct reloc 
*find_reloc_of_rodata_c_jump_table(struct section *sec,
                 if (reloc_offset(reloc) > offset)
                         break;

-               if (!strncmp(reloc->sym->sec->name, 
".rodata..c_jump_table", 21)) {
+               if (!strcmp(reloc->sym->sec->name, C_JUMP_TABLE_SECTION)) {
                         *table_size = 0;
                         return reloc;
                 }

Thanks,
Tiezhu


      reply	other threads:[~2025-02-14  8:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-24  6:27 Tiezhu Yang
2025-02-12 17:50 ` Josh Poimboeuf
2025-02-13  2:20   ` Tiezhu Yang
2025-02-13  2:39     ` Josh Poimboeuf
2025-02-13 12:38       ` Tiezhu Yang
2025-02-13 18:54         ` Josh Poimboeuf
2025-02-14  2:23           ` Tiezhu Yang
2025-02-14  8:44             ` Josh Poimboeuf
2025-02-14  8:56               ` Tiezhu Yang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f4f6d6ef-28cd-922d-fa24-6dd451b44607@loongson.cn \
    --to=yangtiezhu@loongson.cn \
    --cc=akpm@linux-foundation.org \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=loongarch@lists.linux.dev \
    --cc=nathan@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®