From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796251413; b=FsSZqqVyCIfukhtVbhF++0fGLe4wik0DvycAp+QGUTXJS06yUyXD3ZhXHgUrUiUVzBsj jWRRwGWO32TreztZe+Mlc7MaFH/0293V9G0aN1YWgVNDYAPtYezeOL3qDUPH/ojmx1rP9 w6K5zhXDkxBhQyDm+MwjQKlxxMaYQUHDHh8AV70KDmyXnakLshKNmNli5jFLQAXrl8/Xj Gu95e8mX3oUqjO/sSfzUjKecuKvehKnvvhoFJdQzMzC6lbR+4RqwlQa01iSlwRWD+TvG4 Yk34Ayg4DlsFq1muKHu1lCZ0dN3HDKHrM+50L8S3Pk473FVNaw/tP2v0aUO2uysAEDA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796251413; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=G3GiRCBkaiydUS/NnJxNsdqJ5r+b+8KwZa08D1sd19c=; b=bXR3+gbGqML3wPQeqOMECR/y2hiJawTp3Z1B9D8uOvObHi9bbq/HyO0ENu7j2MFA+Afw WENxrz+VbO8+/DsIKQ4L5Muy1wnwah2l29MCRTnXC2Gl8iZFjBTa/fnrzXH2DXvkfJXEd v0uM+obytP8ZxlOyDSSmQmCqxRzphBgIiDK5jpG4x96B15RsS8v1HoezIpg1p1P7JWX7V XIC7g0Ojgx4hvdeVmVzfvljRpcpI5KQicigqboDrtviwZx0tit00OF1e8bUMUJIO1FL+Q AXIdgIw0qzY7ZOH3PhCmGxW927kE67vH6fN3chSLtT+MsOIiJq/EgERyL3780NHuWIg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Yj6rj6lX; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F239606A322; Wed, 2 Dec 2026 22:43:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Yj6rj6lX Received: by smtp.kernel.org (Postfix) with ESMTPSA id 10EE01F00893; Wed, 2 Dec 2026 22:43:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796251413; bh=G3GiRCBkaiydUS/NnJxNsdqJ5r+b+8KwZa08D1sd19c=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Yj6rj6lXuxwvFZk5pyDLfXxSCmqPpvQnCNjUf0Dwf6TH3FC+fvW78wgjY2uNBTqIi LBWqwi8GIf+YgLPXOTvBdf9+BguWq6qMpEEZxGiQ25cXuoc4Z+NtmZ8Qn7GEkiXBBg Iip5jKxs7E57aut5nij1HfdRDXqjVvlmRIGKoQ6TOq6vVxrjnyZ3fiLscRtyYKU4OV 2s9TW0aO95h3VvXyipQHHA4inbw8252z962lWQBToY4O5ZNCa2HjKwlPkZW3WUXDAy UT6Oim8a89ya0Wap0OF3HaySsRg3s+6fFQIJ5d8sBYo1e1RmQiAvCxdu1MMlW782jj nZTm1++lMlXDA== Date: Wed, 2 Dec 2026 14:43:30 -0800 From: Josh Poimboeuf To: Miguel Ojeda Cc: Giuliano Procida , Peter Zijlstra , Miguel Ojeda , rust-for-linux@vger.kernel.org, Alice Ryhl , Boqun Feng , Gary Guo , =?utf-8?B?QmrDtnJu?= Roy Baron , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , Daniel Almeida , Tamir Duberstein , Alexandre Courbot , Onur =?utf-8?B?w5Z6a2Fu?= , linux-modules@vger.kernel.org, Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin Subject: Re: [PATCH v5 3/4] gpu: nova-core: convert nova_core_exports.c to assembly Message-ID: References: <20261112121512.1670347-1-gprocida@google.com> <20261112121512.1670347-4-gprocida@google.com> X-Mailing-List: linux-modules@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Mon, Nov 30, 2026 at 06:10:37PM +0100, Miguel Ojeda wrote: > On Thu, Nov 12, 2026 at 1:15 PM Giuliano Procida wrote: > > > > Convert `nova_core_exports.c` to `nova_core_exports.S`, emit > > `EXPORT_SYMBOL_GPL(sym)` directly in `exports_nova_core_generated.h` > > With GCC, `X86_KERNEL_IBT=n` and `NOVA_CORE` without `DRM_NOVA`, I see: > > drivers/gpu/nova-core/nova_core_exports.o: error: objtool: no .symtab > > The export list is empty in that case, GNU as does not write a symbol > table for an empty file, and objtool rejects such an object since > commit 4ed9d82bf5b2 ("objtool: Speed up SHT_GROUP reindexing") -- any > empty `.S` would. > > Cc'ing Josh and Peter: is that intended? `read_symbols()` still has a > comment saying that a missing symbol table is possible for an empty > `.o`. Definitely a bug, presumably the below fixes it? Feel free to take this patch if it's exposed by one of yours, otherwise let me know. --- From: Josh Poimboeuf Subject: [PATCH] objtool: Fix "no .symtab" error for empty object files Since commit 4ed9d82bf5b2 ("objtool: Speed up SHT_GROUP reindexing"), objtool no longer gracefully handles .o files with no symbols: drivers/gpu/nova-core/nova_core_exports.o: error: objtool: no .symtab A file without a symbol table section can't have any SHT_GROUP sections referencing said section, so it shouldn't be an error. Fixes: 4ed9d82bf5b2 ("objtool: Speed up SHT_GROUP reindexing") Reported-by: Miguel Ojeda Closes: https://lore.kernel.org/CANiq72m3X0j+tu8rX7fDhcPYHA+9e3jyvHeyj801Hf5m43KeUA@mail.gmail.com Signed-off-by: Josh Poimboeuf --- tools/objtool/elf.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c index a791f4ea6ec19..755ac77ca9c2c 100644 --- a/tools/objtool/elf.c +++ b/tools/objtool/elf.c @@ -732,10 +732,8 @@ static int mark_group_syms(struct elf *elf) struct symbol *sym; symtab = find_section_by_name(elf, ".symtab"); - if (!symtab) { - ERROR("no .symtab"); - return -1; - } + if (!symtab) + return 0; for_each_sec(elf, sec) { if (sec->sh.sh_type == SHT_GROUP && -- 2.56.1