From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id CD9263858D33 for ; Wed, 8 Feb 2023 00:59:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CD9263858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x632.google.com with SMTP id m2so17571284plg.4 for ; Tue, 07 Feb 2023 16:59:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=wy3MH4QMglShBe84xsqsOz/axC5F3IyLIKhqSEo6rpo=; b=epGc0w1HAdmf/m8iXYQAtEnvmJfGZCZ3xePWYOIYzo4UX77AorlZE3WlFDlZUEiTki FsPc6n/3glrdW51ogzyP2VUSTU5FtRnP1V35ECE8jO0mYONnAOuGDyBr3sNpCVbwRQIo ntj+uEvW/qwgKOJU5Wz3Hk2GzR4A3Ke1ATb2+GkPUej5G229sxN3Gy5Lpv2/+HHQwyIJ dS8EQ4A3sXWI1bdWR78lwrjIUoiPx2uPGjaS+yt+mqd8Wq/sjvdVkPbjEDO9zLx5pAZM kbq6Etb4w1KSY3IyOOV3/FgXw5fkT9HsfuDlajXvx10u0KXUk/XA4nsBquiewRhzvWah 2Kaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wy3MH4QMglShBe84xsqsOz/axC5F3IyLIKhqSEo6rpo=; b=eFI85qV9St8JJkwICyldhMAeCTyL0c9mmEh2OnUuMSxFPSlOUiQCeFjOiw1iP59Rys oxJrJbZKlHL7v8VZmvQr3vijxxYwn9nUHi3UNtljEtTxaGIrwYPdho8ymhUB4TYAsCKx zBJnNRKBUHpkEqVWnDDyo40QtAPOuIamKK/6joB2p2mGW9mrCqsQlwLflNtQHI0BemTT 4M2c2HKyP0GeHoqVH3zrO7LPmyYtlh9dYNhAkpmoqjH3mQ9qlC0eVlYhnnR4cd/5N0AY x10PQzCG1doIw0JJCk8qjcSjFzcsCO32CWgRIjYfN6AxKaqQr0ouR6ypudbK3qTjvofn ploQ== X-Gm-Message-State: AO0yUKW+OyDa5BNg3GtVsTfDu7BmRaWUC4/97HUdpvhjPlGGCoVhsxHr R8Y4SPCj5Xw9ikKyRw54/LRGn76Z2/k= X-Google-Smtp-Source: AK7set/ICzCXwmfXaPw3UWvcEVgAxdcngi4XblgbxNyEVn1AtxW1ouEGVmbbQnPEMG5nfiXtigd37A== X-Received: by 2002:a17:902:e547:b0:195:f3e3:b923 with SMTP id n7-20020a170902e54700b00195f3e3b923mr5671083plf.8.1675817989643; Tue, 07 Feb 2023 16:59:49 -0800 (PST) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id e4-20020a170902784400b001967692d6f5sm9418136pln.227.2023.02.07.16.59.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Feb 2023 16:59:49 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 54C88114086E; Wed, 8 Feb 2023 11:29:46 +1030 (ACDT) Date: Wed, 8 Feb 2023 11:29:46 +1030 From: Alan Modra To: binutils@sourceware.org Subject: Re: Resetting section vma after _bfd_dwarf2_find_nearest_line Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3035.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: f.bfd_ptr is set too early to be a reliable indicator of good debug info. * dwarf2.c (_bfd_dwarf2_slurp_debug_info): Correct test for debug info being previously found. diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index ab5a9f37ec1..b16ae11e5f2 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -5382,7 +5382,7 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, { /* Check that we did previously find some debug information before attempting to make use of it. */ - if (stash->f.bfd_ptr != NULL) + if (stash->f.dwarf_info_size != 0) { if (do_place && !place_sections (abfd, stash)) return false; -- Alan Modra Australia Development Lab, IBM