lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230725115959.GE3765278@hirez.programming.kicks-ass.net>
Date:   Tue, 25 Jul 2023 13:59:59 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Tiezhu Yang <yangtiezhu@...ngson.cn>
Cc:     Josh Poimboeuf <jpoimboe@...nel.org>,
        Huacai Chen <chenhuacai@...nel.org>, loongarch@...ts.linux.dev,
        linux-kernel@...r.kernel.org, loongson-kernel@...ts.loongnix.cn
Subject: Re: [PATCH v1 5/6] objtool: Add skipped member in struct reloc

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..

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ