From patchwork Thu Feb 23 03:50:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 60777 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp102980wrd; Wed, 22 Feb 2023 19:51:18 -0800 (PST) X-Google-Smtp-Source: AK7set9bY46lrdx99x6aqDv/kVH2WNSMMruh6m4EM/M8MjssopV5UA3dX4jzL+AW9riTNoR+moeF X-Received: by 2002:a17:906:af85:b0:888:db6b:5fa9 with SMTP id mj5-20020a170906af8500b00888db6b5fa9mr15635655ejb.67.1677124278597; Wed, 22 Feb 2023 19:51:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677124278; cv=none; d=google.com; s=arc-20160816; b=UQRUnSLR8xuvILAnP3X6SMTwPTxUksDk4E/wPzt1ObOXgCuJEbbA9uUDNuPmEqNr32 T/ciNCgO8NeOwDbDGJiCVDstMfzVNX1w6jCoIcRtlyzbfcF3eB2NJ8uMIYpcT7oXKNFn UAwMeaLKWJ4S0ozIlLzYd2++J6sM9KktItp9xF+G8xPQpHjLIDaJkfnlZ+vicyZH7c6V Loac1OKutOc4DP72z9Ha7o+Wc+/DEp3lf+YquLTPJNHg6lpZpQm3ddOHRcJeS2NBL6BW mbSZ1zRFlYApy3p813vN7hk3/ta3Dv6iKwpO402RYukUtu6oEbBgwLp7fhbCrYFg4wsy KCfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=lxNUGxJl//6JV+6eCSeh/jtv5N0Yg0doVIbWE1/t+c4=; b=PHOhxhkZekwrQgjrQ0IMhfl1MTkN+0tC/4qBUhofb92S/CeObdd+Dq8zKJftd7byqz igNTaRXZceKAO0LL2r5T7jVy3W29JUIMSOKPdOoVx0NN5zh8POHoyChndg6sprewRnSY q6Zp1lLm2LkaJkyMyRfGaTLEnx2o8mubt62mOK59QDmR44idCIo7J8UglF34f4pXnQtV UqfNN1qrrM/7pUmK17xcV83QEl1gC2eDRtaYoQ1SstIv5u96pq69F2PGDfdI8QIxmoVO k9foekDSpNWEioxEEC00jKcApVnHEKZfAjxNeNPAyytHu7tMEZ0ySHReoKwju5laVVym HPOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=KSY3rzBY; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id p24-20020a056402045800b004af66f0645bsi2407273edw.515.2023.02.22.19.51.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 19:51:18 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=KSY3rzBY; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6B1BB3851AB9 for ; Thu, 23 Feb 2023 03:50:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B1BB3851AB9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677124247; bh=lxNUGxJl//6JV+6eCSeh/jtv5N0Yg0doVIbWE1/t+c4=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=KSY3rzBYTgN+zCl+UpsjUbvN3BCpcMnBr8YjYvXwmkV0nssZBPlti66esBL5TcdDb OvLSYsTDZHwkqPO87XdiXVJtkPQV5zfuTX0K0+vVVUBvtWgmEIZmtMrqsiIZpQAx79 hbmWxYI8Wala/k6b1KY1qRQ5c1HMyc+Jzy+GmZLA= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by sourceware.org (Postfix) with ESMTPS id E75083858033 for ; Thu, 23 Feb 2023 03:50:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E75083858033 Received: by mail-pj1-x1030.google.com with SMTP id pt11so12054402pjb.1 for ; Wed, 22 Feb 2023 19:50:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lxNUGxJl//6JV+6eCSeh/jtv5N0Yg0doVIbWE1/t+c4=; b=XyP91jNHsYJdXHb9tfanBSXkox9Erc+7DbaRC8MnSdYbU5NaiVSUDgU5+sGgL/fFmd bm1R/+2nLrJn0OwWreUI2U+5CtI04dDwOhCEO8NDiHzx0Scy0ac1EjOOjFCvkZ1A8LEc mMbLU99RCsNIGC2s6sRrvFux8VgF/kp9RhWvu6iC/ZoTGVrzZzl+8khi0QKdRFz4jAqT o2ds/XPSIKB8bxORbYtgBbTbnuHBRf7xUMN0VSmtXWRR+g3i69wtL9fWEnSeDlxJMeO+ vu88WRNhxAYReuNkPefAUN1P+8iXt2+2uUSbJh15Wt+TWQ7rDF53b1EuhSVM3kUfikm5 Ydng== X-Gm-Message-State: AO0yUKU44F7qqGSrixrSmOvahX1eXvhY3yRjWURN78HRSZUdUmh5+N+F uR7vhbXqKl/1I3qOe1WAgblm9hZ4rD8= X-Received: by 2002:a05:6a20:938c:b0:bc:fb05:3c3f with SMTP id x12-20020a056a20938c00b000bcfb053c3fmr12216192pzh.43.1677124237852; Wed, 22 Feb 2023 19:50:37 -0800 (PST) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:8e1e:cc42:da50:5c93]) by smtp.gmail.com with ESMTPSA id g4-20020a62e304000000b005cdbd9c8825sm3986734pfh.195.2023.02.22.19.50.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Feb 2023 19:50:37 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 298CC1142D15; Thu, 23 Feb 2023 14:20:35 +1030 (ACDT) Date: Thu, 23 Feb 2023 14:20:35 +1030 To: binutils@sourceware.org Subject: dwarf1 .line SEC_HAS_CONTENTS Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3034.8 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 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alan Modra via Binutils From: Alan Modra Reply-To: Alan Modra Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758592267733780749?= X-GMAIL-MSGID: =?utf-8?q?1758592267733780749?= * dwarf1.c (parse_line_table): Ignore .line without SEC_HAS_CONTENTS. Formatting. diff --git a/bfd/dwarf1.c b/bfd/dwarf1.c index 90461004b0a..a80d19db7de 100644 --- a/bfd/dwarf1.c +++ b/bfd/dwarf1.c @@ -301,13 +301,13 @@ parse_line_table (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) bfd_size_type size; msec = bfd_get_section_by_name (stash->abfd, ".line"); - if (! msec) + if (! msec || (msec->flags & SEC_HAS_CONTENTS) == 0) return false; size = msec->rawsize ? msec->rawsize : msec->size; stash->line_section - = bfd_simple_get_relocated_section_contents - (stash->abfd, msec, NULL, stash->syms); + = bfd_simple_get_relocated_section_contents (stash->abfd, msec, NULL, + stash->syms); if (! stash->line_section) return false;