From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29133 invoked by alias); 4 Oct 2018 16:34:23 -0000 Mailing-List: contact gnu-gabi-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: gnu-gabi-owner@sourceware.org Received: (qmail 29113 invoked by uid 89); 4 Oct 2018 16:34:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.1 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:U*amodra, H*i:sk:CAJimCs X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-oi1-f178.google.com Received: from mail-oi1-f178.google.com (HELO mail-oi1-f178.google.com) (209.85.167.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 04 Oct 2018 16:34:21 +0000 Received: by mail-oi1-f178.google.com with SMTP id 22-v6so7011133oiz.2; Thu, 04 Oct 2018 09:34:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=RpqDG0K0FyCuXXDqpvcfMBATrr+daYLDxoTLRws2jJo=; b=oWtGp3Empp8DXPE9+hEDaQRfi8t6gCuHlA4NrI4/uJgutCW8fNIoApkdXWWlQPKHNu puG/YuDIlBE9IS1RjCUVl7NhAl6rXC6BEsXllzKTDzNlv0LRhgvtRZQrNiwZiMUcYmfj x7TNh/PyiP5YVUNTsMOJndMz6P0slXJMxffT/n65RAh9qGAJ3Aaeoe1Cu0LnZ521A+PT fbpsEjzUl9Yq+T4HUaT+ar3hh8Y+J5e9e2C+9yT/9lWVwG4UHJLHn1EiXSq0nLhDb8t7 2tFSG0Hlopzw/ah/jhYP9alxjH6gZ98IHmWtFYyp0lKAq466P6DUej4fRXQxsnZg7E3t 7Gbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=RpqDG0K0FyCuXXDqpvcfMBATrr+daYLDxoTLRws2jJo=; b=oQkD6Tx6598GoDY7cx3/lzB7Bn0/RSQW5z83SMwPjklsbO+cvaNm1BJUr60veLB75q slus2nh+ddPLT3mMqLHNUDySkmWAf/ktlRcOZocVd9iko0/qmbRqdpHcWTVNGEwQvvZM fX61F9ba/f12+LGULZI0tWPtooVfrB6YNgccOeGtWfrHTS+irsli1jwdO61v5G1B9acn 26Lt4Ntiba23tJfPtjHoKeZoCU4czieyEw6LIOCaOVZrZOCzH4SLAI8ZeqL2Sr+Wf6ZE FuCMzJ2Eb6kHkzlsadTzLCK3HXihk6ae9+YVzwQ++R+6bCZm6YO7DrUCeGFFX4OVhAR4 L3bA== X-Gm-Message-State: ABuFfojwYHNt/radU5XhEtJNzmXvU1xSR6Gi9QUU5k2Waz8dB8OYPfnw uuBgxM0otpdvDb0ujVn5bZvAooBJeJmZBVleqnQ= X-Google-Smtp-Source: ACcGV60GmUcgbSpE0TnPLL312DA4Jhr4A3ufcsynCVKbepIp6QPsCyNnMGUusTa1vAPrBf2Qi7Pkb0FeNgdpratawz8= X-Received: by 2002:aca:3c86:: with SMTP id j128-v6mr3484733oia.128.1538670859683; Thu, 04 Oct 2018 09:34:19 -0700 (PDT) MIME-Version: 1.0 References: <20181003075416.GD3179@bubble.grove.modra.org> <20181004021457.GE3179@bubble.grove.modra.org> In-Reply-To: From: "H.J. Lu" Date: Mon, 01 Jan 2018 00:00:00 -0000 Message-ID: Subject: Re: RFC: Add GNU_PROPERTY_NEED_PHDRS To: Cary Coutant Cc: Alan Modra , Michael Matz , Rich Felker , "Carlos O'Donell" , Florian Weimer , Szabolcs Nagy , Jan Beulich , Binutils , gnu-gabi@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-q4/txt/msg00013.txt.bz2 On Thu, Oct 4, 2018 at 8:10 AM Cary Coutant wrote: > > > If you specify PHDRS in a script, ld uses exactly those program > > headers, and I believe it should continue to operate that way. So to > > add PT_GNU_EH_FRAME, say, when an executable has .eh_frame_hdr, you'd > > need a script with PT_GNU_EH_FRAME specified in PHDRS. And another > > without PT_GNU_EH_FRAME when the executable doesn't have > > .eh_frame_hdr. That soon becomes impractial considering the number of > > optional headers, requiring auto-generation of the PHDRS script > > snippet. > > Oh, I see. Yeah, that does make it impractical. > > Still, I'd like to understand why HJ claims it's intrusive to have ld > create a PT_LOAD segment for the headers. I haven't tried it yet in > gold (don't support -z separate-code), but it doesn't seem like it > would be at all difficult or intrusive. The linker part is relatively easy. The problems are with strip and objcopy. They aren't prepared to deal with it. -- H.J.