From nobody Wed Feb 5 15:57:54 2025 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CFA611DE4E1 for ; Wed, 15 Jan 2025 22:50:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=93.17.235.10 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736981436; cv=none; b=Um/REMHhlR4Y7kkX0lS6q8K53La8FsczWXT80tU5ndy093OefSXaxvpfj38pmqDiJrV7t+iTI765U5Wiw+AhcA4UNSPYg+MZR9uF99F0/WydyANL+B3CLyActP0wEoYba9j+Pd5Tdionh9bHKfP82UTNNVLGqxuAzR6c0e97V5c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736981436; c=relaxed/simple; bh=n5PKzA7GDiJ+vIl39yQ9EFUuhqglOyZ5+cDQqSVGCYs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nuP5H8yLoobAR0aSAKqTDER/aGEl9LPmpt2my1p6chosUE0LRgB+y4vNSFofqGXzFEzeMPuqRztOZfGxi/e3sbYDVVj66H8Z86UfOsYYJK+AjxEUVypb7/IF1YZjg9mprpjafc8AUZtx6hBVDSCU+9Q+ovDd4ISnPzsuT8oZH0Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=csgroup.eu; spf=pass smtp.mailfrom=csgroup.eu; arc=none smtp.client-ip=93.17.235.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=csgroup.eu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=csgroup.eu Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4YYLcD37V4z9sRr; Wed, 15 Jan 2025 23:42:52 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RuBQKud5YVsR; Wed, 15 Jan 2025 23:42:52 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4YYLcD2Npxz9sRk; Wed, 15 Jan 2025 23:42:52 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 3DCAA8B77A; Wed, 15 Jan 2025 23:42:52 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id AEhSP7Uv2wGL; Wed, 15 Jan 2025 23:42:52 +0100 (CET) Received: from PO20335.idsi0.si.c-s.fr (unknown [192.168.202.221]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 15DC18B774; Wed, 15 Jan 2025 23:42:49 +0100 (CET) From: Christophe Leroy To: Josh Poimboeuf , Peter Zijlstra , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , Julien Thierry , Miroslav Benes , Raphael Gault , Michael Ellerman , Nicholas Piggin , Naveen N Rao , Madhavan Srinivasan Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, llvm@lists.linux.dev Subject: [PATCH v5 01/15] objtool: Fix generic annotation infrastructure cross build Date: Wed, 15 Jan 2025 23:42:41 +0100 Message-ID: <0ac0217b174efcefe772822089e9b64ff8c65da3.1736955567.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.47.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1736980963; l=1213; i=christophe.leroy@csgroup.eu; s=20211009; h=from:subject:message-id; bh=n5PKzA7GDiJ+vIl39yQ9EFUuhqglOyZ5+cDQqSVGCYs=; b=9nUpCHBH2MuF6kXRB8OESgj5pUg/Vwv9wBjo8aA5eEAfC5w5ABcr8HV2k0ZEnp+s+LP7Gxt50 WQWIL/XE0cwCPiSVvzpusLaUHSL+qQXRPwvYEDKhMfdGh7WefoesJgX X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Cross build for powerpc/32 on x86_64 leads to: CC init/main.o init/main.o: warning: objtool: early_randomize_kstack_offset+0xf0: Unknown = annotation type: 134217728 init/main.o: warning: objtool: start_kernel+0x4a8: Unknown annotation type:= 134217728 init/main.o: warning: objtool: do_one_initcall+0x178: Unknown annotation ty= pe: 134217728 Fix byte order. Fixes: 2116b349e29a ("objtool: Generic annotation infrastructure") Signed-off-by: Christophe Leroy --- v5: New in v5 --- tools/objtool/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index e92c5564d9ca..129c4e2245ae 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -2272,7 +2272,7 @@ static int read_annotate(struct objtool_file *file, } =20 for_each_reloc(sec->rsec, reloc) { - type =3D *(u32 *)(sec->data->d_buf + (reloc_idx(reloc) * sec->sh.sh_ents= ize) + 4); + type =3D bswap_if_needed(file->elf, *(u32 *)(sec->data->d_buf + (reloc_i= dx(reloc) * sec->sh.sh_entsize) + 4)); =20 offset =3D reloc->sym->offset + reloc_addend(reloc); insn =3D find_insn(file, reloc->sym->sec, offset); --=20 2.47.0