mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
	Huacai Chen <chenhuacai@kernel.org>,
	loongarch@lists.linux.dev, linux-kernel@vger.kernel.org,
	loongson-kernel@lists.loongnix.cn
Subject: Re: [PATCH v1 5/6] objtool: Add skipped member in struct reloc
Date: Tue, 25 Jul 2023 13:59:59 +0200	[thread overview]
Message-ID: <20230725115959.GE3765278@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <1690272910-11869-6-git-send-email-yangtiezhu@loongson.cn>

On Tue, Jul 25, 2023 at 04:15:09PM +0800, Tiezhu Yang wrote:
> There exist multiple relocation types in one location, such as a pair of
> R_LARCH_ADD32 and R_LARCH_SUB32 in section .rela.discard.unreachable and
> .rela.discard.reachable on LoongArch.
> 
> Here is an example:
> 
> $ readelf -rW init/main.o
> 
> Relocation section '.rela.discard.unreachable' at offset 0x3e20 contains 2 entries:
>     Offset             Info             Type               Symbol's Value  Symbol's Name + Addend
> 0000000000000000  0000000a00000032 R_LARCH_ADD32          0000000000000000 .init.text + 230
> 0000000000000000  0000001a00000037 R_LARCH_SUB32          0000000000000000 L0^A + 0
> 

Please explain; why is this?

How does:

#define __annotate_unreachable(c) ({					\
	   asm volatile(__stringify_label(c) ":\n\t"                       \
			".pushsection .discard.unreachable\n\t"            \
			".long " __stringify_label(c) "b - .\n\t"          \
			".popsection\n\t" : : "i" (c));                    \
})
#define annotate_unreachable() __annotate_unreachable(__COUNTER__)

Manage to generate this..

  reply	other threads:[~2023-07-25 12:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-25  8:15 [PATCH v1 0/6] Add objtool and orc support for LoongArch Tiezhu Yang
2023-07-25  8:15 ` [PATCH v1 1/6] objtool/LoongArch: Enable objtool to be built Tiezhu Yang
2023-07-25  8:15 ` [PATCH v1 2/6] objtool/LoongArch: Implement instruction decoder Tiezhu Yang
2023-07-25  8:15 ` [PATCH v1 3/6] objtool/x86: Separate arch-specific and generic parts Tiezhu Yang
2023-07-25  8:15 ` [PATCH v1 4/6] objtool/LoongArch: Enable orc to be built Tiezhu Yang
2023-07-25 11:51   ` Peter Zijlstra
2023-07-27 10:58     ` Tiezhu Yang
2023-07-25 11:56   ` Peter Zijlstra
2023-07-28  1:31     ` Tiezhu Yang
2023-07-25  8:15 ` [PATCH v1 5/6] objtool: Add skipped member in struct reloc Tiezhu Yang
2023-07-25 11:59   ` Peter Zijlstra [this message]
2023-08-03 11:36     ` Tiezhu Yang
2023-08-03 12:11       ` Peter Zijlstra
2023-08-09 11:51         ` Xi Ruoyao
2023-08-09 11:58           ` Xi Ruoyao
2023-07-25  8:15 ` [PATCH v1 6/6] LoongArch: Add ORC unwinder support Tiezhu Yang
2023-07-25 12:01 ` [PATCH v1 0/6] Add objtool and orc support for LoongArch Peter Zijlstra
2023-08-09  9:55   ` Tiezhu Yang

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=20230725115959.GE3765278@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=chenhuacai@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loongarch@lists.linux.dev \
    --cc=loongson-kernel@lists.loongnix.cn \
    --cc=yangtiezhu@loongson.cn \
    /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®