From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2195 invoked by alias); 29 May 2015 01:10:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 2174 invoked by uid 89); 29 May 2015 01:10:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-ie0-f170.google.com Received: from mail-ie0-f170.google.com (HELO mail-ie0-f170.google.com) (209.85.223.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 29 May 2015 01:10:27 +0000 Received: by iesa3 with SMTP id a3so51795366ies.2 for ; Thu, 28 May 2015 18:10:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc :content-type; bh=TxQDJtQC1QmtZ7mDE7SjQw0XL/3QSQq4eUUcMxK4Qis=; b=K+SzzKc3G6lVQY+JGYrlAgYdQqGoreCgcqViny7o+WVdXPa+bl0+FMV+gAFVOZINXp TD3yMcc74/f7aL6az7e7UsnTY2urSVAOW9bvV/S4ynu/mDCs4WRtXwl+xPDEyQV+H3R4 5NPO3QmY5AkHVQteb4GqYgcVP8muOgdOJuqO1gWiARNoH/ag5KDRF8I3jaVFsvkHkVPE C/e56WLRTpjwzb1kpNk4SuPDZgtFG93vyqJCQH8efZKnBgygEbIpOLm1cI7kLLuRAipN LUoqHoQoFF71HGy1g1zuO96wHY08GspxNBeYU3qjyGmADohDD/eTAe0w1ZBJTQML7Cp0 URhw== X-Gm-Message-State: ALoCoQn2pUwe2NcVID+TPEsL8YqqKZGKIpCDV+yKNyUybS3isZIP+ESgc29aRfdmx+dXueK0Zsog X-Received: by 10.42.200.8 with SMTP id eu8mr12522749icb.65.1432861825536; Thu, 28 May 2015 18:10:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.105.197 with HTTP; Thu, 28 May 2015 18:10:04 -0700 (PDT) From: Roland McGrath Date: Fri, 29 May 2015 01:10:00 -0000 Message-ID: Subject: [PATCH users/roland/osabi] Recognize GNU .note.ABI-tag values 5 (syllable) and 6 (nacl) To: GDB Cc: "binutils@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-05/txt/msg00701.txt.bz2 These two values are assigned in glibc trunk (5 has been assigned to syllable for several years, and 6 is quite recent). I don't actually know anything about Syllable, but IMHO it makes sense for the other GNU packages that think about these values at all (binutils/gdb) to grok all the values that exist in the GNU package that owns this number space (libc). OK for trunk and gdb's 7.9 branch? (I don't really care about the readelf change, but I'm happy to put it on binutils' 2.25 branch if anyone thinks it's worthwhile.) Thanks, Roland binutils/ * readelf.c (print_gnu_note: NT_GNU_ABI_TAG): Recognize GNU_ABI_TAG_SYLLABLE and GNU_ABI_TAG_NACL. gdb/ * defs.h (enum gdb_osabi): Add GDB_OSABI_SYLLABLE and GDB_OSABI_NACL. * osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Recognize GNU_ABI_TAG_SYLLABLE and GNU_ABI_TAG_NACL. * configure.tgt (*-*-nacl*): Set gdb_osabi=GDB_OSABI_NACL. include/elf/ * common.h (GNU_ABI_TAG_SYLLABLE): New macro. (GNU_ABI_TAG_NACL): New macro. diff --git a/binutils/readelf.c b/binutils/readelf.c index b584db5..a0c20a3 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -15125,6 +15125,12 @@ print_gnu_note (Elf_Internal_Note *pnote) case GNU_ABI_TAG_NETBSD: osname = "NetBSD"; break; + case GNU_ABI_TAG_SYLLABLE: + osname = "Syllable"; + break; + case GNU_ABI_TAG_NACL: + osname = "NaCl"; + break; default: osname = "Unknown"; break; diff --git a/gdb/configure.tgt b/gdb/configure.tgt index 4e4d6a9..d7f083d 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -702,6 +702,7 @@ case "${targ}" in gdb_osabi=GDB_OSABI_FREEBSD_ELF ;; *-*-linux* | *-*-uclinux*) gdb_osabi=GDB_OSABI_LINUX ;; +*-*-nacl*) gdb_osabi=GDB_OSABI_NACL ;; *-*-nto*) gdb_osabi=GDB_OSABI_QNXNTO ;; m68*-*-openbsd* | m88*-*-openbsd* | vax-*-openbsd*) ;; *-*-openbsd*) gdb_osabi=GDB_OSABI_OPENBSD_ELF ;; diff --git a/gdb/defs.h b/gdb/defs.h index 44702ea..20d9eaf 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -569,6 +569,8 @@ enum gdb_osabi GDB_OSABI_LYNXOS178, GDB_OSABI_NEWLIB, GDB_OSABI_SDE, + GDB_OSABI_SYLLABLE, + GDB_OSABI_NACL, GDB_OSABI_INVALID /* keep this last */ }; diff --git a/gdb/osabi.c b/gdb/osabi.c index 9d90c55..879f68b 100644 --- a/gdb/osabi.c +++ b/gdb/osabi.c @@ -492,6 +492,14 @@ generic_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect, void *obj) *osabi = GDB_OSABI_NETBSD_ELF; break; + case GNU_ABI_TAG_SYLLABLE: + *osabi = GDB_OSABI_SYLLABLE; + break; + + case GNU_ABI_TAG_NACL: + *osabi = GDB_OSABI_NACL; + break; + default: internal_error (__FILE__, __LINE__, _("generic_elf_osabi_sniff_abi_tag_sections: " diff --git a/include/elf/common.h b/include/elf/common.h index b087d9c..e6d8c14 100644 --- a/include/elf/common.h +++ b/include/elf/common.h @@ -635,6 +635,8 @@ #define GNU_ABI_TAG_SOLARIS 2 #define GNU_ABI_TAG_FREEBSD 3 #define GNU_ABI_TAG_NETBSD 4 +#define GNU_ABI_TAG_SYLLABLE 5 +#define GNU_ABI_TAG_NACL 6 /* Values for NetBSD .note.netbsd.ident notes. Note name is "NetBSD". */