From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2e.google.com (mail-oa1-x2e.google.com [IPv6:2001:4860:4864:20::2e]) by sourceware.org (Postfix) with ESMTPS id 92BB0385801B for ; Mon, 25 Apr 2022 17:23:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 92BB0385801B Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-deb9295679so16782920fac.6 for ; Mon, 25 Apr 2022 10:23:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=02j5Jje1YhHgF86+8YueOWjRS2vwCsnFCF0qUnwl1vY=; b=Pqyow7RIe/85BfaLQ8vz6Opal4orl4AKi71qp3t3kSGDFrrxHLGRSG+yEvpShKu1p6 sTu0NDMy6FU8V9OSmd0orfuo17EHjFYzKlJcs4lIvHJWP29j0Nw1aDiI4aCWJB37b/z3 RvwOtVVS4DwYFQS6g+doVF3jqUyj4iJczzC5I2F3fQ8PB7CYFpeH4VyHwSVriSk6r2I0 KFabGK0+I8MJlfYuJm93KuvMngRHSarbu3V3M5VQUJ9zZYbCHlIo70AAsylsUTD1wr1z pnL/RPcxEgDWMfdrUJcbDKkfuHwfYEYn36oew7d2zBPavaV0O/09MxbGzn/Nm0hDNFUz y0Cg== X-Gm-Message-State: AOAM5331+1u2+N44VKmNGYv12pwNt25gGpbHnttVkksyWsznT2R2wLVF 5CBmTL/rK0nk+kigD9ML/uMNOw== X-Google-Smtp-Source: ABdhPJxNuRRrrMB5b76qZuprlxMdyr9j7dX/jksCXlTl1L+y9g5EbyFqC9TYG81OdkJgc1tUvn0b9A== X-Received: by 2002:a05:6871:10a:b0:e6:851f:f779 with SMTP id y10-20020a056871010a00b000e6851ff779mr7518364oab.123.1650907426997; Mon, 25 Apr 2022 10:23:46 -0700 (PDT) Received: from ?IPV6:2804:431:c7ca:4214:b4dd:3339:98d6:1ec0? ([2804:431:c7ca:4214:b4dd:3339:98d6:1ec0]) by smtp.gmail.com with ESMTPSA id x16-20020a056808145000b00323371f6935sm3992346oiv.15.2022.04.25.10.23.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Apr 2022 10:23:46 -0700 (PDT) Message-ID: <24b4ea75-f160-12d8-26e7-6a7069f77665@linaro.org> Date: Mon, 25 Apr 2022 14:23:43 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH v11 0/7] Support DT_RELR relative relocation format Content-Language: en-US To: "H.J. Lu" , libc-alpha@sourceware.org References: <20220422190139.2615492-1-hjl.tools@gmail.com> From: Adhemerval Zanella In-Reply-To: <20220422190139.2615492-1-hjl.tools@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.6 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, URIBL_BLACK 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: Mon, 25 Apr 2022 17:23:48 -0000 On 22/04/2022 16:01, H.J. Lu wrote: > Changes in v11: > > 1. Replace > > if (!(map)->l_info[DT_RELR]) > > with > > if ((map)->l_info[DT_RELR] == NULL) > > 2. Add a space to --disable-default-dt-relr option. > 3. Compile extra DT_RELR tests with $(no-stack-protector). > 4. Add DT_RELR related macros to scripts/glibcelf.py. > > Changes in v10: > > 1. Don't check GLIBC_PRIVATE definition for DT_RELR in ld.so since ld.so > has no DT_NEEDED entry. > > Changes in v9: > > 1. A DT_RELR shared library without DT_NEEDED works. > 2. A DT_RELR shared library without DT_VERNEED works. > 3. A DT_RELR shared library without libc.so on DT_NEEDED works. > > Changes in v8: > > 1. Remove the out-of-date comments in _dl_check_map_versions. > 2. Change "long" to "long int". > 3. Update the DT_RELR NEWS entry. > > Changes in v7: > > 1. Add GLIBC_ABI_DT_RELR support before adding DT_RELR support. > 2. Update the DT_RELR NEWS entry. > 3. Misc fixes. > > Changes in v6: > > 1. Move ELF_DYNAMIC_DO_RELR before ELF_DYNAMIC_DO_REL. > > Changes in v5: > > 1. Update NEWS entry with the linker option, -z pack-relative-relocs. > 2. Remove elf/libc-abi-version.exp and use $(READELF) to check > GLIBC_ABI_DT_RELR. > > Changes in v4: > > 1. Always enable GLIBC_ABI_DT_RELR check. > 2. Use $(OBJDUMP) instead of $(NM) for GLIBC_ABI_DT_RELR check. > > Changes in v3: > > 1. Don't define SUPPORT_DT_RELR. > 2. Enable DT_RELR in glibc shared libraries and position independent > executables (PIE) automatically if linker supports -z pack-relative-relocs. > > Changes in v2: > > 1. Enable DT_RELR for all targets. > 2. Issue an error if there is a DT_RELR entry without GLIBC_ABI_DT_RELR > dependency nor GLIBC_PRIVATE definition. > > Fangrui Song (1): > elf: Support DT_RELR relative relocation format [BZ #27924] The patchset looks ok, the only piece that I think it does not add much and it would be better to be dropped is the '--disable-default-dt-relr' support. As we discussed in the weekly patchset call, having less configure switches is desirable and this specific option will most likely not be used.