From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id 3491D385841E; Fri, 29 Oct 2021 18:37:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3491D385841E Received: by mail-pl1-x635.google.com with SMTP id r5so7412354pls.1; Fri, 29 Oct 2021 11:37:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WWqgC0LlVdWGT289N2sSsL8yZ4i00KAYMrcMFr6sqT0=; b=rpQ2MyexWCPu8Rs1N5m+VqHZd2aVUVdxx3TDXMCkrFTY4aqNplkU6UGK30isJZ6S8D FvzBo1gJN0QK5AYP50a5fpMfYh8oMVIZJqKNh7zeS18EAI1G4dqGDPEZj6wdLb5GR2Lk 39HHxx03eDcRAcfHoGXOH7S3pmC3DxkDNt6g541d6qxsnJFfBuMIjjmIt0endtDH3qYf 0apYjaUHmYI2o4QOiLQBXnI4Zo8gJN5mjK6FKC6lfZck6K62h9NzkjUBIBf4Mh4bxPDP bR3IK92LrJ2CYz4F8WHnmTiEyaHqygr/XYGGKs22yAXy7TzlA4ciZ9jcsTyZdBolMbig bVAA== X-Gm-Message-State: AOAM5308xjt7Qam/7LP8boDTy2y4xt4F13WEX5SAHOk7ge5ZivUDq5Mw 4PFZGKFMElo2dWzppyA3NaIdLsJx5Gl0g6i89RbiGvFgXlc= X-Google-Smtp-Source: ABdhPJw5wjfS7NVzvLhpOKPD0XGGCi+sFgMZD5f0R1TEz8MxzDztmRnCCJUGc9lZxXyfbS+FZHX7dSoJu3QO74K1fZk= X-Received: by 2002:a17:902:cecf:b0:140:5397:92b7 with SMTP id d15-20020a170902cecf00b00140539792b7mr11361098plg.66.1635532649145; Fri, 29 Oct 2021 11:37:29 -0700 (PDT) MIME-Version: 1.0 References: <20211017005020.2645717-1-maskray@google.com> <1763c6f4-dfb9-e102-84d6-892ee2a3208a@redhat.com> In-Reply-To: <1763c6f4-dfb9-e102-84d6-892ee2a3208a@redhat.com> From: "H.J. Lu" Date: Fri, 29 Oct 2021 11:36:53 -0700 Message-ID: Subject: Re: [PATCH v2] elf: Support DT_RELR relative relocation format [BZ #27924] To: "Carlos O'Donell" Cc: Fangrui Song , GNU C Library , Binutils Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3023.5 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: 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, 29 Oct 2021 18:37:31 -0000 On Fri, Oct 29, 2021 at 11:22 AM Carlos O'Donell via Binutils wrote: > > On 10/16/21 20:50, Fangrui Song via Binutils wrote: > > PIE and shared objects usually have many relative relocations. In > > 2017/2018, SHT_RELR/DT_RELR was proposed on > > https://groups.google.com/g/generic-abi/c/bX460iggiKg/m/GxjM0L-PBAAJ > > ("Proposal for a new section type SHT_RELR") and is a pre-standard. RELR > > usually takes 3% or smaller space than R_*_RELATIVE relocations. The > > virtual memory size of a mostly statically linked PIE is typically 5~10% > > smaller. > > We've been going over this patch on the weekly Monday patch queue review. > > I took a note to point out that one of the blockers here is that it is difficult > to immediately test this work because it requires a working glibc build using > ldd (which has support for DT_RELR). > > What is the status of the lld support patches for glibc? > > If we made progress on the lld support then we'd be able to more easily review > a testable configuration and keep the review going forward. > I raised the mysterious crash issue: https://groups.google.com/g/generic-abi/c/bX460iggiKg We need an updated proposal without mysterious crashes. One option is that the linker should bump EI_ABIVERSION when generating DT_RELR. After this issue is resolved, I can look into the bfd linker support. -- H.J.