From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk1-xa2d.google.com (mail-vk1-xa2d.google.com [IPv6:2607:f8b0:4864:20::a2d]) by sourceware.org (Postfix) with ESMTPS id 8675A3858C60 for ; Fri, 15 Oct 2021 17:42:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8675A3858C60 Received: by mail-vk1-xa2d.google.com with SMTP id x207so5544946vke.2 for ; Fri, 15 Oct 2021 10:42:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0vGWB6Rd/VHgRFA3W0zaVSs4Y9pmcPVnLIDYutUcQxI=; b=0qkA8NAkYD2tJQlIz2jznqV4NABY80A/p5LyCmFXbPSK2t78Q8QtSMhvNWAdAOEeCY aTkLmo6IajbcAwIg8nhdyhYPiY083A8yV5efgXQO//Skr3ziIxjhohE4o52symzv6ZN6 VoKuZuYCHi2XcCD/LBFDACU+Z9xFK9xJ29wWpkTCKWrWBWwAZNCO90luicjuhE4T/pUO hJ1tF4L3RjqrusxMM0BnnMo5yCdHifweNOO00qbzOWZMo6yDrd1kWCbhW/0VXkpDspuF /Mn50Nk9jhfDXhyt/JMF163nWXhOTiejWp8vWnW50SXl1/EqVZugpP/bL0ffkxqxg4E7 mk4w== X-Gm-Message-State: AOAM531lQPmr4wgMtxpzfK8qDzgBw2KGbga4KKDJsQx0MFWZ03I9TKbf RbClRhKhL18ZfE+8BZHdY6tRZafKaxznIA== X-Google-Smtp-Source: ABdhPJxXaVvZ6F0ERT1Oe31IuKs/NETomk7oktzkWAZYxiWvYH8Ve37kIDT0RXnF+i6MMMg8fr90bQ== X-Received: by 2002:a1f:3409:: with SMTP id b9mr13805666vka.21.1634319753110; Fri, 15 Oct 2021 10:42:33 -0700 (PDT) Received: from ?IPv6:2804:431:c7ca:c6c7:f05e:9652:ab99:7fa2? ([2804:431:c7ca:c6c7:f05e:9652:ab99:7fa2]) by smtp.gmail.com with ESMTPSA id p191sm4295733vkp.31.2021.10.15.10.42.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Oct 2021 10:42:32 -0700 (PDT) Subject: Re: [PATCH] elf: Fix elf_get_dynamic_info() for bootstrap From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Manuel Lauss , Szabolcs Nagy References: <20211015174123.2305597-1-adhemerval.zanella@linaro.org> Message-ID: Date: Fri, 15 Oct 2021 14:42:31 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211015174123.2305597-1-adhemerval.zanella@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Oct 2021 17:42:38 -0000 On 15/10/2021 14:41, Adhemerval Zanella wrote: > THe d6d89608ac8c broke powerpc for --enable-bind-now because it turned > out that different than patch assumption rtld elf_get_dynamic_info() > does require to handle RTLD_BOOTSTRAP to avoid DT_FLAGS and > DT_RUNPATH (more specially the GLRO usage which is not reallocate > yet). > > This patch fixes by passing two arguments to elf_get_dynamic_info() > to inform that by rtld (bootstrap) or static pie initialization > (static_pie_bootstrap). I think using explicit argument is way more > clear and burried C preprocessor, and compiler should remove the > dead code. > > I checked on x86_64 and i686 with default options, --enable-bind-now, > and --enable-bind-now and --enable--static-pie. I also check on > aarch64, armhf, powerpc64, and powerpc with default and > --enable-bind-now. Manuel and Szabolcs, If you could check if this breaks something in your environment I would be grateful. I really want to fix this nasty regression...