From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 60423 invoked by alias); 22 Mar 2018 12:39:24 -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 59480 invoked by uid 89); 22 Mar 2018 12:39:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.4 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=amodra@gmail.com, amodragmailcom, Modra, modra X-Spam-Status: No, score=-2.8 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-HELO: mail-oi0-f52.google.com Received: from mail-oi0-f52.google.com (HELO mail-oi0-f52.google.com) (209.85.218.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Mar 2018 12:39:21 +0000 Received: by mail-oi0-f52.google.com with SMTP id u141-v6so7186553oif.1 for ; Thu, 22 Mar 2018 05:39:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=FqMq3T2Ei9NPmvJjLOcW9NwS9jPBMNtg/gHgfXnmsNM=; b=kqB/RQ1HKn6TokF8ittW19KItWBpAsjAri0AYPiT2x0A9vI3RxjCPiIouXOkMmdEv/ /Jndvqox5H8CNUjFQzqoIzf1uCWTO3V4HDpbAKxmeLupUNMgUjLugusGphov2JhreiwL PhAqa6xavKnVkjgpx2Zszvto5afVLPnHeVfQx6zDUDQVg3Zj71qDabSaIj7/WLUReN5B G/qtiqEs5sXg4VLhqXEVNkGij5puFq+2vQHg1bwXBShMvFSFTA+O47DD7kB3ScsfE0FW IzgOT3cLcudRaNYqCfWwHxtoErI3uPZFzqlpdA7Qi1qWdU/5IEOolf6TyP9J2oPPXVO9 libA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=FqMq3T2Ei9NPmvJjLOcW9NwS9jPBMNtg/gHgfXnmsNM=; b=X+onzFwfwjerT5dS65XnXphWkKbFfk14S5iQKqs8IMQYgKAjM3/JX2DmN6nD8H+xQH npAu0zg/sYaEsON42JFS7nH0Pi31YjKIQ0sPC1LuwLExjvdHRKUSAy0ovjMeI9PlW0w0 b7L3AZyKHPSt1gKXz2FtvtdB3+ATFpRNK2rGV4cJaona0B+YHHHg9Hdz3UldfluTNU1F 7EVLo9EZd9BVqXJ5lMiYxIxvXqxHxXG1cv058X+qMBTOIRmVzyhRgqy2Vo9UCcEIpapq vYf8qFQxncJ2i3waI9hWYjAHTqvbmTy/O+Xk87YWt3OENeR7RJZij8TfICSfY19IUMRB XKnw== X-Gm-Message-State: AElRT7Fl8BkzChA3yMssHvipxYwVRJNGGhO6zFHkdd5B2E958tRUObAL NkDLEfCyTcKSYCnxJzV6xBi+YpA7sH1mwknkwCU= X-Google-Smtp-Source: AG47ELszDhNapQ+0XmPCUq4VzCpMKAGP/VM7+9Detn+oWkLJtL+Df2faF4TwXFsstfGd9iEvViMgjqJ90jVsw21JuG4= X-Received: by 10.202.234.70 with SMTP id i67mr13325265oih.316.1521722359385; Thu, 22 Mar 2018 05:39:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.10.20 with HTTP; Thu, 22 Mar 2018 05:39:18 -0700 (PDT) In-Reply-To: <20180322122957.GQ3812@bubble.grove.modra.org> References: <20180317133115.GA4681@gmail.com> <20180322122957.GQ3812@bubble.grove.modra.org> From: "H.J. Lu" Date: Mon, 01 Jan 2018 00:00:00 -0000 Message-ID: Subject: Re: RFC: Audit external function called indirectly via GOT To: Generic System V Application Binary Interface Cc: "Carlos O'Donell" , gnu-gabi@sourceware.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-q1/txt/msg00013.txt.bz2 On Thu, Mar 22, 2018 at 5:29 AM, Alan Modra wrote: > On Wed, Mar 21, 2018 at 10:15:26PM -0700, Cary Coutant wrote: >> If you get rid of the GOT entry, and have the point of call jump >> indirectly through the PLTGOT entry, which is initialized to point to >> part (b) of the PLT entry, everything should work the same as without >> -fno-plt. Essentially, all -fno-plt would do is inline part (a) of the >> PLT entry. >> >> -cary >> >> * I'm using parts (a) and (b) to refer to the two parts of a PLT >> entry: (a) an indirect jump via the PLTGOT entry, and (b) code that >> jumps to the lazy binding routine, passing the JUMP_SLOT index. > > Yes, that essentially is what I've done for -fno-plt on powerpc. > The call stub code is inlined while the rest of the PLT is more or > less unchanged. So you get all of the usual lazy-binding features > by default, and can use "-z now -z relro" if you want a read-only > PLT. > On x86, PLT is always read-only. The issue is the writable PLTGOT. On x86, -fno-plt removes the writable PLTGOT. My proposal puts back the writable PLTGOT which is only used for LD_AUDIT. -- H.J.