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 <elf.h>, 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

Reply via email to