From patchwork Tue Jul 27 17:25:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 60019 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 14541B70AA for ; Wed, 28 Jul 2010 04:20:23 +1000 (EST) Received: from localhost ([127.0.0.1]:48256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdolE-0003BN-IW for incoming@patchwork.ozlabs.org; Tue, 27 Jul 2010 14:20:16 -0400 Received: from [140.186.70.92] (port=35677 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OdohR-0001j9-VJ for qemu-devel@nongnu.org; Tue, 27 Jul 2010 14:16:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OdohQ-0003Tm-KU for qemu-devel@nongnu.org; Tue, 27 Jul 2010 14:16:21 -0400 Received: from a.mail.sonic.net ([64.142.16.245]:55583) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OdohQ-0003TV-Cr for qemu-devel@nongnu.org; Tue, 27 Jul 2010 14:16:20 -0400 Received: from are.twiddle.net (are.twiddle.net [75.101.38.216]) by a.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id o6RHPeud006285 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 27 Jul 2010 10:25:40 -0700 Received: from are.twiddle.net (localhost [127.0.0.1]) by are.twiddle.net (8.14.4/8.14.4) with ESMTP id o6RHPeVR006915 for ; Tue, 27 Jul 2010 10:25:40 -0700 Received: (from rth@localhost) by are.twiddle.net (8.14.4/8.14.4/Submit) id o6RHPeNf006914 for qemu-devel@nongnu.org; Tue, 27 Jul 2010 10:25:40 -0700 From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 27 Jul 2010 10:25:28 -0700 Message-Id: <1280251538-6860-3-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.2 In-Reply-To: <1280251538-6860-1-git-send-email-rth@twiddle.net> References: <1280251538-6860-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 Subject: [Qemu-devel] [PATCH 02/12] Add more DT_* and AT_* constants to qemu's copy of elf.h. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Moving some PPC AT_* constants from elfload.c at the same time. Signed-off-by: Richard Henderson --- elf.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ linux-user/elfload.c | 9 --------- 2 files changed, 44 insertions(+), 9 deletions(-) diff --git a/elf.h b/elf.h index eb9e3be..7067c90 100644 --- a/elf.h +++ b/elf.h @@ -147,8 +147,37 @@ typedef int64_t Elf64_Sxword; #define DT_DEBUG 21 #define DT_TEXTREL 22 #define DT_JMPREL 23 +#define DT_BINDNOW 24 +#define DT_INIT_ARRAY 25 +#define DT_FINI_ARRAY 26 +#define DT_INIT_ARRAYSZ 27 +#define DT_FINI_ARRAYSZ 28 +#define DT_RUNPATH 29 +#define DT_FLAGS 30 +#define DT_LOOS 0x6000000d +#define DT_HIOS 0x6ffff000 #define DT_LOPROC 0x70000000 #define DT_HIPROC 0x7fffffff + +/* DT_ entries which fall between DT_VALRNGLO and DT_VALRNDHI use + the d_val field of the Elf*_Dyn structure. I.e. they contain scalars. */ +#define DT_VALRNGLO 0x6ffffd00 +#define DT_VALRNGHI 0x6ffffdff + +/* DT_ entries which fall between DT_ADDRRNGLO and DT_ADDRRNGHI use + the d_ptr field of the Elf*_Dyn structure. I.e. they contain pointers. */ +#define DT_ADDRRNGLO 0x6ffffe00 +#define DT_ADDRRNGHI 0x6ffffeff + +#define DT_VERSYM 0x6ffffff0 +#define DT_RELACOUNT 0x6ffffff9 +#define DT_RELCOUNT 0x6ffffffa +#define DT_FLAGS_1 0x6ffffffb +#define DT_VERDEF 0x6ffffffc +#define DT_VERDEFNUM 0x6ffffffd +#define DT_VERNEED 0x6ffffffe +#define DT_VERNEEDNUM 0x6fffffff + #define DT_MIPS_RLD_VERSION 0x70000001 #define DT_MIPS_TIME_STAMP 0x70000002 #define DT_MIPS_ICHECKSUM 0x70000003 @@ -207,6 +236,21 @@ typedef int64_t Elf64_Sxword; #define AT_PLATFORM 15 /* string identifying CPU for optimizations */ #define AT_HWCAP 16 /* arch dependent hints at CPU capabilities */ #define AT_CLKTCK 17 /* frequency at which times() increments */ +#define AT_FPUCW 18 /* info about fpu initialization by kernel */ +#define AT_DCACHEBSIZE 19 /* data cache block size */ +#define AT_ICACHEBSIZE 20 /* instruction cache block size */ +#define AT_UCACHEBSIZE 21 /* unified cache block size */ +#define AT_IGNOREPPC 22 /* ppc only; entry should be ignored */ +#define AT_SECURE 23 /* boolean, was exec suid-like? */ +#define AT_BASE_PLATFORM 24 /* string identifying real platforms */ +#define AT_RANDOM 25 /* address of 16 random bytes */ +#define AT_EXECFN 31 /* filename of the executable */ +#define AT_SYSINFO 32 /* address of kernel entry point */ +#define AT_SYSINFO_EHDR 33 /* address of kernel vdso */ +#define AT_L1I_CACHESHAPE 34 /* shapes of the caches: */ +#define AT_L1D_CACHESHAPE 35 /* bits 0-3: cache associativity. */ +#define AT_L2_CACHESHAPE 36 /* bits 4-7: log2 of line size. */ +#define AT_L3_CACHESHAPE 37 /* val&~255: cache size. */ typedef struct dynamic{ Elf32_Sword d_tag; diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 5a0d3d4..2727222 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -480,15 +480,6 @@ static uint32_t get_elf_hwcap(void) } /* - * We need to put in some extra aux table entries to tell glibc what - * the cache block size is, so it can use the dcbz instruction safely. - */ -#define AT_DCACHEBSIZE 19 -#define AT_ICACHEBSIZE 20 -#define AT_UCACHEBSIZE 21 -/* A special ignored type value for PPC, for glibc compatibility. */ -#define AT_IGNOREPPC 22 -/* * The requirements here are: * - keep the final alignment of sp (sp & 0xf) * - make sure the 32-bit value at the first 16 byte aligned position of