From nobody Wed Nov 27 08:28:08 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1700081861; cv=none; d=zohomail.com; s=zohoarc; b=U9g0nad2WupLSxaU02pvah7k9nV7CcUgeUFj9X/7NOm3MgjI5RMXmGwg0XESCTW3B3f9CthzCd7VKp2p5QFntFK/y75nFw+ZQJVd1fLYCXxBzRoQhd0oOrPrvupNw2MFyovKyg7lN4HhqROG9AOl9Sf4RQDI/oYX3nE0D5oDSds= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1700081861; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=J7aCt684M/Mo4aPxjDOnz7JyGbXhEmNf+Qyqgmy0nPo=; b=PBzffx02IW05kNfnzsLj6pAAXxaRcP1wUjWHsCfmNxAwWaIjfE09HlIYVYqT3cjTJcmECqJvuQXhrCCVoEaUl5p4N9OXXv3avUsb1wX7J8i/nlrkAkfFdL+OhOACybDDQO92MuUta3VQFm3qutfRxHt79PvNfoDdG4+KCiT8ook= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1700081861644657.4914440069869; Wed, 15 Nov 2023 12:57:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r3MvX-0004pL-2L; Wed, 15 Nov 2023 15:55:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r3MvU-0004mT-7Q for qemu-devel@nongnu.org; Wed, 15 Nov 2023 15:55:57 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r3MvQ-0008Bx-Cq for qemu-devel@nongnu.org; Wed, 15 Nov 2023 15:55:55 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-32f70391608so62582f8f.2 for ; Wed, 15 Nov 2023 12:55:51 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id b11-20020a05600010cb00b0032f9688ea48sm11516899wrx.10.2023.11.15.12.55.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 12:55:46 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 636BD5F7B7; Wed, 15 Nov 2023 20:55:43 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700081750; x=1700686550; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=J7aCt684M/Mo4aPxjDOnz7JyGbXhEmNf+Qyqgmy0nPo=; b=C52Y7YO0MFzNY+yqvKHlzRt6hBCLcdSBhgZ7iRyqpGxj03Q03xleco5olf1rLD4pKE +ts4qw+mI6Vg5aZd24RBFMYazt6jHlkgqfKZ6cgFy6uGa/1i3qB6qPuLg/WCx2fAF73N KGqG8boz2y5t75Izs/UczIOFc/l3myk6ag5rHs28Kb6gWuogWRrwC0wkhipTI/AHdHE9 c1wtsMWvQQWSAeuFmL2ayS35JWNWoUvr7xo4xpHaa6Y5wrcMpnMCfnCVH19ONxkWn8aa 09P+IcA7bbrCJmn0d+eIJc1j84JzlKXGgWvJfNr2um5TyCqDaWRlgssgm4xI213IWOYT pBXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700081750; x=1700686550; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J7aCt684M/Mo4aPxjDOnz7JyGbXhEmNf+Qyqgmy0nPo=; b=jr0D4l2+8MiGBM6WlIlM+BswMJXGf2nsMjRZr1FqYFo2LoRs1kXrsNUJx86ec4FHhv 3JjOydSaPY+YTcSY6P1m9dW6vPN7SRU2YUjQ+ODUS7Dih/E6s9j+gqIVMvxmYgXqLe7l cjtf0UmwrenNIPvg+T9I6havi0uG/Hye+0HPNyDTPzCkGzABVYUwNnS5t48qgOHREigB 2AeeEAepN7jPaTnccs9OLJHTBjc8QA3nMAycx5Snkx2GgFiBSpF2PdGlsyvH2r8CG2xf /ERESzzi2dMM8vJ+UazusYX3HrLWwFK3D9ph1sNUWfop9pmQ/ArwGkrUTtrwVXwQblx9 T2Bg== X-Gm-Message-State: AOJu0YxCYSsWfdsS7x3pEpJ0t3ho9kBzQULD65p6tNHIqODsDmqhFiq4 dx48BL7wIoJ76mHeqYgc/yXtgA== X-Google-Smtp-Source: AGHT+IHEkMmH8ID4OjMSzmSjpKy/0AAy/kyhrV7sh9Hbu0ir33doJ2UI/IRULe2SZGRkwoW9VyghtQ== X-Received: by 2002:a5d:584c:0:b0:32f:7e1d:f039 with SMTP id i12-20020a5d584c000000b0032f7e1df039mr10866947wrf.46.1700081750692; Wed, 15 Nov 2023 12:55:50 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Thomas Huth , Peter Maydell , Beraldo Leal , Mahmoud Mandour , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Alexandre Iooss Subject: [PATCH 07/10] hw/core: skip loading debug on all failures Date: Wed, 15 Nov 2023 20:55:39 +0000 Message-Id: <20231115205542.3092038-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231115205542.3092038-1-alex.bennee@linaro.org> References: <20231115205542.3092038-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1700081862914100003 ELF_LOAD_FAILED is one of many negative return codes we can have. Lets treat any positive size_t as a success for loading. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- hw/core/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/core/loader.c b/hw/core/loader.c index 3c79283777..e7a9b3775b 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -505,7 +505,7 @@ ssize_t load_elf_ram_sym(const char *filename, clear_lsb, data_swab, as, load_rom, sym_cb); } =20 - if (ret !=3D ELF_LOAD_FAILED) { + if (ret > 0) { debuginfo_report_elf(filename, fd, 0); } =20 --=20 2.39.2