From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YM7Lx-0006Rm-6U for qemu-devel@nongnu.org; Thu, 12 Feb 2015 22:55:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YM7Lt-0006cB-RV for qemu-devel@nongnu.org; Thu, 12 Feb 2015 22:55:41 -0500 Received: from out1134-211.mail.aliyun.com ([42.120.134.211]:22171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YM7Lt-0006bt-9S for qemu-devel@nongnu.org; Thu, 12 Feb 2015 22:55:37 -0500 Message-ID: <54DD7784.80504@sunrus.com.cn> Date: Fri, 13 Feb 2015 12:03:16 +0800 From: Chen Gang S MIME-Version: 1.0 References: <54DBED38.4060005@sunrus.com.cn> <54DBEFD3.1070609@sunrus.com.cn> <54DBF2D2.3000802@ezchip.com> <54DC1EC7.9000808@sunrus.com.cn> <54DC229A.9070008@sunrus.com.cn> <54DD2A18.1030500@ezchip.com> In-Reply-To: <54DD2A18.1030500@ezchip.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] tile: Can load elf64 tilegx binary successfully for linux-user. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chris Metcalf , riku.voipio@iki.fi, Peter Maydell Cc: "walt@tilera.com" , qemu-devel On 2/13/15 06:32, Chris Metcalf wrote: > On 2/11/2015 10:48 PM, Chen Gang S wrote: >> On 2/12/15 11:32, Chen Gang S wrote: >>>>>>> >>> >> +#define EM_TILE 191 /* Tile */ >>>>>>> >>> >>+#define EM_TILE_OLD 0x2597 /* Tile compat */ >>>>> >> > >>>>> >> >No need for EM_TILE_OLD - it never really got out into the wild. >>>>> >> > >>>>> >> >Also, 191 is EM_TILEGX in , so you really should use the same name here, not EM_TILE. >>>>> >> > >> Oh, I can not fine EM_TILEGX in "elf.h" in master branch. I guess, I >> need to define it, too. > > It is in glibc's /usr/include/elf.h since version 2.16. > OK, thanks. Really it is, and glibc also defines another archs (e.g. microblaze). But I guess, at present, we have to use qemu's "elf.h": - qemu may use another libc libraries (e.g. newlibc, I guess), which may not have these macros. - If qemu will consider about the system elf.h file in the future, it will change all related macros (it almost means rewrite its elf.h). So for me, at present, just follow with the current qemu's elf.h is OK: (define EM_TILEGX directly without ifdef EM_TILEGX or endif). Thanks. -- Chen Gang Open, share, and attitude like air, water, and life which God blessed