From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id DB36B3858D3C for ; Mon, 28 Nov 2022 01:58:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DB36B3858D3C 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-x62f.google.com with SMTP id w23so8786937ply.12 for ; Sun, 27 Nov 2022 17:58:02 -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:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=AGSFE1Wp70FypHM+rCPBzKoRSA2wHnpbG3x7I3yJTRs=; b=lUu+kEiE0MzI66YBDoQaOmIBGIrj4IgLmPUu56GSo3u5Hb94ky+9j1r6uZeUx60k4c 3CVx1H1AE8ez0BBd0JRv4Tq5zdn3UFKMguWm9PfUGYBgW1ht+hTCXtcRzVf7C1JsKhmk Tz7rnQTv6TJbKzGi2pau2hBSkrHCcd23Wl/k+CQpc2tpnXi+ln/2t4vJ9Fi5vdfKxzO4 aMDmLbkXBKOZqn1ClUlqmHn3rxbcDOWqv2whnY6jS1YHD86MCWIArjmMBY1p7U+1gkH+ /FolOKWGKJSLjaJlINLW+YjH5TSrjKF0Wu1gcnTsDJki9k3UmzL/hzOjy7nliBzXZWVH ooMA== 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:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=AGSFE1Wp70FypHM+rCPBzKoRSA2wHnpbG3x7I3yJTRs=; b=cETrt3Ys48SFbNmbHg+IUhdktibcsPuH59Cc/LFQs+qipeZMGjmNfVJTzHvrU4K+t7 6UzDZr87ycGDaE8Lw0eGfam0EGMbv6N8TFiTT/ho1XdLvrr8kYzlRPdqprn1Pmd2jlj1 axLyqRimIfybeZvWp/rYTopfT9DsUhNsVH/DCUeEzo0T8nPvYTadhv44pm9nSU8btjMU 84XUVUeE6yzYMctkvP+piH9T7mjSWzGy3A9NF3aItMGhMbaZOJUFRHQYlxmKzZGizjHR QKRrUYTETh4cPQyQqhi0ePTyTCdTUQRgwbprGn+A5GVx9Amv/pRI2mBNziZ9UA2llRmU F14g== X-Gm-Message-State: ANoB5pnCOgCRwT3kfj4pL6URSYWooLMwmmrUWbAaT/oPxFqJe6Jq1V8G FosNWXkaGvD0A1G/IQjSZ40ce4HhLUI= X-Google-Smtp-Source: AA0mqf5Bn4YIKx86fshKYEsU0FaAh5H1TPKxqwZcN8+4qsjMV9ouuUL+fga3OY+DcDPza08oHU6tgA== X-Received: by 2002:a17:902:d592:b0:186:8930:20e6 with SMTP id k18-20020a170902d59200b00186893020e6mr30343227plh.64.1669600681451; Sun, 27 Nov 2022 17:58:01 -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 r3-20020a63d903000000b0046f73d92ea5sm5688267pgg.90.2022.11.27.17.58.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Nov 2022 17:58:00 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 12A5F11405E8; Mon, 28 Nov 2022 12:27:58 +1030 (ACDT) Date: Mon, 28 Nov 2022 12:27:58 +1030 From: Alan Modra To: Michael Matz Cc: binutils@sourceware.org Subject: Re: [PATCH 4/8] section-select: Completely rebuild matches 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=-3030.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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: On Fri, Nov 25, 2022 at 04:55:12PM +0000, Michael Matz via Binutils wrote: > this resets all section matches before updating for newly created > sections (i.e. completely rebuilds the matches). This fixes powerpc > "TOC opt" tests that shows a difference in section order: originally > .got of "linker stubs" comes before .toc (both placed into the same > .got output section due to ".got {*(.got .toc)}". But .got of linker > stubs is created later, and in the second run of resolve_wilds is > appended to the list, hence is then coming after .toc (which was added > already in the earlier resolve_wilds run). So order swapped -> > test fails. That's a problem. The got header is created in the .got of "linker stubs", and code setting the value of .TOC. assumes that the header will be located first in the .got output section. This ties in with where ld.so expects to find the header too. -- Alan Modra Australia Development Lab, IBM