From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by sourceware.org (Postfix) with ESMTPS id 5E270385841C for ; Sat, 25 Dec 2021 01:03:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5E270385841C Received: by mail-pj1-x1036.google.com with SMTP id v16so8743644pjn.1 for ; Fri, 24 Dec 2021 17:03:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=NTkdYv5BDNY9ANz396I6CqymKCae9pkDeqzhZMMaiEU=; b=b5SejUObg7aMJn8fPZk6C0TRfVfPXNCTewAZxet8IbS6L6sWurMsJQ6oIEHhq1rfzp 8XwOq+olEr/9NvPrsNupKbzvmYYOWMKN6rY0JKM6Ers26CYnm6AcO77XNwaHU7kQBY91 nKgJE6Boht+LF38gJ93OjKa+UnZBScBPCYvKMJ+FUsw1I4Bg9LkpRzZXf1EEDaVIRBiu fSSVEbV0KnCvFvUd5WjE3S6U/jLExaODfZ/k5Ue+zFygMyhN3E2oFaWPFD4jbCtjGO0+ VmJ3PMjvuc3ZvRX/5EWrjsDNj4nhG5AJa/uJk5o4VZ8o6PpQANCf59g+Gfq5tXZJq8A1 l3Cw== X-Gm-Message-State: AOAM532xLegTHlicDOVa+sBU6qrPTh+Axg9vu+Pdko16IAzpUGKHLqkV Si+7IiiIEvbXACF4Uq1TQXD5CfgQpfA= X-Google-Smtp-Source: ABdhPJyo0wx7DypErOyT/gxIfrn52wDVpg17xh+lYLrQjqXi1UYVUoeQ8NycyvzVt1wiY1TSmZMXRg== X-Received: by 2002:a17:902:bd44:b0:148:a2f7:9d85 with SMTP id b4-20020a170902bd4400b00148a2f79d85mr8641061plx.164.1640394222825; Fri, 24 Dec 2021 17:03:42 -0800 (PST) Received: from squeak.grove.modra.org ([2406:3400:51d:8cc0:8b8a:4661:4061:3688]) by smtp.gmail.com with ESMTPSA id j16sm11298453pfj.16.2021.12.24.17.03.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Dec 2021 17:03:41 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 399951140F38; Sat, 25 Dec 2021 11:33:39 +1030 (ACDT) Date: Sat, 25 Dec 2021 11:33:39 +1030 From: Alan Modra To: "H.J. Lu" Cc: Binutils , Nick Clifton , Florian Weimer Subject: Re: [PATCH v2] elf: Set p_align to the minimum page size if possible Message-ID: References: <20211215163232.1787673-1-hjl.tools@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-3029.9 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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-List-Received-Date: Sat, 25 Dec 2021 01:03:45 -0000 On Wed, Dec 22, 2021 at 06:38:54AM -0800, H.J. Lu wrote: > I choose commonpagesize due to this glibc bug: > > https://sourceware.org/bugzilla/show_bug.cgi?id=28688 This means we are stuck. Choosing commonpagesize or minpagesize will generate binaries that won't run with older glibc if the actual page size is maxpagesize (assuming maxpagesize != commonpagesize). I don't see a way to change DT_LOAD p_align that is backwards compatible, except perhaps using a p_align of zero if the required segment alignment (as calculated from section alignment) is less than maxpagesize. That horrible hack just happens to work for older glibc, but may break other loaders. -- Alan Modra Australia Development Lab, IBM