From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id 03CC0385740D for ; Sat, 21 May 2022 01:51:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 03CC0385740D Received: by mail-pf1-x42d.google.com with SMTP id i24so9080317pfa.7 for ; Fri, 20 May 2022 18:51:56 -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=hoQmUU7Wxz5ui5fqz55mNdyU1ELCwgMR5UETTxyfsPo=; b=49VlrSwAvz0u61yp3EHZQGNgFLM8Fepi4ErXwGPfaaFwcErxEehrDe0gUsZ2vVBhH1 jmqpOq86B6IuuY70Ig0f57W8dVbU/CXTeFMTsKQexNSpWtaZ+epSTrMpVNh1k2AdkO1i gvrK4KhfC/RsWjBuyc7f/1ZwURpjwo9E7Y5hOTXDj6lRuCiv2sT5hDn8iiZDIwJEzR5N gvWl2CTr0Z3Cpy11NoalsieqOsBAHDgPbgPj0N4MXuczicOPAHjsJTAZVnsaVUD8wNrf 953dVrncdM3TWAHIWheSMYh0QDgPBh2BPOxk8YonOMNoVocW3xVq8fztYowWdOall7Xk Su9A== X-Gm-Message-State: AOAM531P08gJsbRNefW5/8yAcXNH+CWvevHXKayuOtmm+Q3YdRpOQqof 4X1QyMndLM0Vpbri+h1KVJPR3c3id14m6i463iQ= X-Google-Smtp-Source: ABdhPJxIxo5fipSOP2Mp1C29KIV9YJL8Eq8DZqaRolridEjYtyAfaJEkkhfzt1suijynNMAyjyShJ2m/0qOFnN9VK+Q= X-Received: by 2002:a63:5464:0:b0:3c1:4930:fbd5 with SMTP id e36-20020a635464000000b003c14930fbd5mr10554778pgm.94.1653097911445; Fri, 20 May 2022 18:51:51 -0700 (PDT) MIME-Version: 1.0 References: <20220516131714.37463-1-hjl.tools@gmail.com> <87h75psibt.fsf@oldenburg.str.redhat.com> <20220520225009.mfkzwang4spyznee@google.com> In-Reply-To: <20220520225009.mfkzwang4spyznee@google.com> From: "H.J. Lu" Date: Fri, 20 May 2022 18:51:15 -0700 Message-ID: Subject: Re: [PATCH v2] Enable DT_RELR in glibc shared libraries and PIEs automatically To: Fangrui Song Cc: Florian Weimer , "H.J. Lu via Libc-alpha" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3019.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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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: Sat, 21 May 2022 01:52:02 -0000 On Fri, May 20, 2022 at 3:50 PM Fangrui Song via Libc-alpha wrote: > > On 2022-05-16, Florian Weimer via Libc-alpha wrote: > >* H. J. Lu via Libc-alpha: > > > >> Enable DT_RELR in glibc shared libraries and position independent > >> executables (PIE) automatically if linker supports -z > >> pack-relative-relocs. > > > >Thanks for updating the commit subject. > > > >Reviewed-by: Florian Weimer > > > >Florian > > > > Thanks for the patch. > > Question: does gdb need DT_RELR support to debug such a shared object? > `gdb elf/ld.so` will report > > BFD: path/to/elf/ld.so: unknown type [0x13] section `.relr.dyn' > > but I do not know whether any functionality is affected in the absence > of SHT_RELR support. You need GDB 12 or 11.2 for DT_RELR. -- H.J.