From patchwork Wed Nov 15 20:55:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 743991 Delivered-To: patch@linaro.org Received: by 2002:a5d:67cf:0:b0:32d:baff:b0ca with SMTP id n15csp2966640wrw; Wed, 15 Nov 2023 12:57:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IGyk1ZV2d7OtF8TQDPDPzRrpgHA1dcSO/fPoJjyb5HGCzXEOpuHxvM5Y4mgGorGgzYxmscm X-Received: by 2002:a05:6870:288a:b0:1f0:3fdc:5995 with SMTP id gy10-20020a056870288a00b001f03fdc5995mr18313670oab.50.1700081861320; Wed, 15 Nov 2023 12:57:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700081861; cv=none; d=google.com; s=arc-20160816; b=HQDp1hA+rFVikbaj5jxwLufrIR8T6UhDAG+0+NCCjjE3mO7ipnCTfDLXIO8MPSAWVU pgLDY+RnpX2LRgSuIzHhpb+9iz2WDkMwWvVb9WRL6/IQr5JjSsVfYSzGPQUkicXHVZZV vY6C6bJ0zfor1sHoy4zWGWXtTbkyDMEuqIXhY1a6DXStuKXaQf6LS/j53zFRT+/1ePYD fh89YY46P71niohkexeWD2vGYlPTGmTYX6X57l461+xcId8mEI5Llf0Ed0ZaKlR3IaVM VWBjbhRQnuhf41NQboJvKa5/wWQh727nprrHnyDg4aY8H2nUYnMATx0GLhm7cw0RViXz mtHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=J7aCt684M/Mo4aPxjDOnz7JyGbXhEmNf+Qyqgmy0nPo=; fh=VX240Z2IZJQtf5WSWx5doHfPl1phoYGIiN62laV0qLc=; b=clUhCIiocQ1bEU5alikt3fjLb6v1PQJ4+uBC4gG+XM3tGjqor6Ya0mbvImlTP9esvV iZvu8GloXmkhRcsiAzL12e8ttmb8Yh+5ci6hrexgyObkdaBAh/EPInsX9hejntXiZpG9 yQswOhMP0GvSdPdprBGK0pvfGeh91nI5D6/7spo5jYxoR312TI8u3kSNLbOP/1ckt/F3 yht23oe/XG2PIGOXC31J8mI2AWuKyyzv6H9dYWdYmZlUYxCS/LuwUG3qEtwpUvZCrf6U N2oHMBV8ieyCxr2VukgMaV3vE8p/xo/DEKhZBlRPbuxqZ/RlEPRYucgdl19bjUmvmbof Kd6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C52Y7YO0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c20-20020a05620a0cf400b00779d17610absi9242979qkj.608.2023.11.15.12.57.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Nov 2023 12:57:41 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C52Y7YO0; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Thomas Huth , Peter Maydell , Beraldo Leal , Mahmoud Mandour , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philippe_M?= =?utf-8?q?athieu-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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org 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ée Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- 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); } - if (ret != ELF_LOAD_FAILED) { + if (ret > 0) { debuginfo_report_elf(filename, fd, 0); }