From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21685 invoked by alias); 13 Jun 2016 15:57:08 -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 21666 invoked by uid 89); 13 Jun 2016 15:57:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.1 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*RU:209.85.192.196, Hx-spam-relays-external:209.85.192.196 X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,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-pf0-f196.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=reply-to:subject:references:to:cc:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=LVJPRZ2hh5iVoUg8A6RwUAlXtMjboZ6oTLASmUhnvZI=; b=jbG9nY6lv6R0U2BBjPRScOSbiPLJWJA4ePylTnmeSvK013fAE8XPC6HuAumloe7OoQ sYocvOsXMnX4fJOF00QRXnHYllyGuQ7mSC0ApLv4l3k8/LHkAX7PwanxQ7orvn1GqV3m 4RCY4urAzyahVTsRyzGCwrFrH3fbDd2YTIPTxVVPJXJJutQrz6JnxiQbCH9s5jGlq/1b lQYG/J+7YJQdLgs1xpWpAa44TCbqJHd8ZCuRvXLo8fkfCJAMM7yHwvZnemXfTCNVguTu sDOlEnrOZg5d7Yq8YeEmd21zYiQV59T8gjJD8pPa0wNgZZSaqr8Q++YNw+cl6nktf2Sl OvMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:reply-to:subject:references:to:cc:from :organization:message-id:date:user-agent:mime-version:in-reply-to :content-transfer-encoding; bh=LVJPRZ2hh5iVoUg8A6RwUAlXtMjboZ6oTLASmUhnvZI=; b=PCNaaC94eQTqZj+1feXOIXy8HbuLYM8qkGefwUTMI9gelMMaSP7KQS6NHVLFBDMD+g TT8m1Sx78YnslM9oaoKADtvmeFrSu30jeE+/AGH8s7fcJjDPYBFFPg+iT41LG9R4MiDF L7eJo5SP5FjmwqUsEAMaB8yIPJ2QjSxpy/+0eefXoXq6aHwuOfEro86DSVeQX599C1GB kE353sy4mB3J/r+PWQVPlcS9X9NyL5JcW7KxsBtu5TjcBjkk+UZ9GS/5q2090Se1UJGe BKpXeAYgWoSw3kKeJhbnORemsd75aATRDnxqQ9GYd42YAlvSXvnllDG61RC7u6XEA9Fc jK3g== X-Gm-Message-State: ALyK8tJDCqMcTe43hk1jWwI8REGGZFRnw6hjPlue4dTSVsQzEtu8G7u4YlkYCAHVe4+EKg== X-Received: by 10.98.101.71 with SMTP id z68mr22155057pfb.53.1465833422597; Mon, 13 Jun 2016 08:57:02 -0700 (PDT) Reply-To: hegdesmailbox@gmail.com Subject: Re: OSABI on Linux Distros References: <7160c0e3-b49c-1ab8-c0d3-cee12355f895@gmail.com> <20160610212256.D5A772C39F7@topped-with-meat.com> To: Carlos O'Donell , Roland McGrath , "H.J. Lu" Cc: gnu-gabi@sourceware.org From: Suprateeka R Hegde Organization: HEGDESASPECT Message-ID: <03e8b45f-f334-f480-1432-096c08c0ee3a@gmail.com> Date: Fri, 01 Jan 2016 00:00:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 160613-0, 13-06-2016), Outbound message X-Antivirus-Status: Clean X-SW-Source: 2016-q2/txt/msg00018.txt.bz2 On 13-Jun-2016 08:56 PM, Carlos O'Donell wrote: > On 06/11/2016 02:44 AM, Suprateeka R Hegde wrote: >> On 11-Jun-2016 02:52 AM, Roland McGrath wrote: >>>> What is the reason why we emit OSABI value as "UNIX - System V" >>>> (ELFOSABI_SYSV) even on GNU/Linux systems? Shouldn't it be just "GNU" >>>> (ELFOSABI_GNU)? >>> >>> In GNU systems the use of this field is specifically to indicate that >>> certain GNU extensions to ELF are used in the particular object. In >>> particular, if any .dynsym entries use STT_GNU_IFUNC o STB_GNU_UNIQUE, >>> then e_ident[EI_OSABI] must be ELFOSABI_GNU. >> >> OK. I understood this part. But then I did not know this set is >> partial. I thought use of *any* GNU specific extension should mark it >> as GNU OSABI. >> >> For instance, GNU_RELRO, GNU_EH_FRAME, GNU_STACK, etc. Even with all >> these, it is still marked SYSV ABI. > > I'm not as authoritative on this as Roland is, but in my opinion I expect > that because all three of these entries are optional they do not constitute > a change in the EI_OSABI. > > You can ignore GNU_RELRO without any problem, you just won't have a > read-only segment after relocation. > > You can ignore GNU_STACK without any problems, it's information > for the dynamic loader to set default stack permissions. When unset the > glibc dynamic loader will use sensible per-machine defaults, likewise > other implementations should also. > > The GNU_EH_FRAME can be ignored if you're not using the GNU-based > unwinder which uses this PT_* entry to find .eh_frame_hdr. > > Other dynamic linkers should ignore program header segments they don't > understand, and thus the above optionally processed entries should not > change the EI_OSABI. You are considering only dynamic linker here. > >> 1. Do we have a documented list of GNU extensions that are necessary >> to mark an ELF as GNU ABI? > > Not that I am aware of. H.J. might better answer this question. I shall wait for the answer. > >> 2. Why the list is partial? Why not all GNU extensions? > > Only the required GNU extensions should mark EI_OSABI as ELFOSABI_GNU. > > If you don't implement STT_GNU_IFUNC or STB_GNU_UNIQUE then things > actually fail. It depends on what you are considering here. You considered only dynamic linker. I consider even non-GNU tools that reads ELF. When such a tool encounters SYSV as the ABI, it cannot do much. However, if the tool can see that the ELF has GNU extensions, then it can do better job of dumping GNU specific ELF details. My actual question is what is the harm if we mark GNU ABI for *any* GNU extension and not restrict it to a partial list. -- Supra