NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-alpha/51926: The alpha EM_ALPHA and EM_ALPHA_EXP machine type handling seems out-of-date



The following reply was made to PR port-alpha/51926; it has been noted by GNATS.

From: Guillem Jover <guillem%debian.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: port-alpha-maintainer%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
	netbsd-bugs%netbsd.org@localhost
Subject: Re: port-alpha/51926: The alpha EM_ALPHA and EM_ALPHA_EXP machine
 type handling seems out-of-date
Date: Thu, 2 Feb 2017 04:40:49 +0100

 Hi!
 
 On Tue, 2017-01-31 at 16:45:00 +0000, Martin Husemann wrote:
 >  I have slight trouble parsing your PR.
 >  NetBSD uses the "old" machine ID, mostly for historic reasons.
 >  
 >  This does not matter a lot, since both IDs are accepted when analyzing or
 >  executing binaries and AFAICT the only place where there is an actual 
 >  difference is when creating core dumps.
 >  
 >  So are you suggesting a concrete change? What comment do you think is wrong
 >  exactly?
 
 Yes, sorry, I see the report can be confusing, so let me clarify. There
 is this now in sys/sys/exec_elf.h (and other elf.h across the codebase):
 
   #define EM_ALPHA	41	/* DIGITAL Alpha */
   #define EM_ALPHA_EXP	36902	/* used by NetBSD/alpha; obsolete */
 
 The machine iD 36902 (0x9026), is what pretty much everyone else is
 using as the current ID, but as this:
 
   #define EM_ALPHA	0x9026
 
 and the other one as:
 
   #define EM_OLD_ALPHA	41
 
 Also in sys/arch/alpha/include/elf_machdep.h ther is this:
 
   #define      ELF64_MACHDEP_ID        EM_ALPHA_EXP    /* XXX */
 
 So I think at last the code comments should be updated, first to
 remove the "obslete" notes all over the place, and to remove the XXX,
 because that's the right ID.
 
 And ideally the EM_ALPHA macros would be switched to what other
 implementations use EM_ALPHA (0x9026), EM_OLD_ALPHA (0x9026) or similar,
 along with all other relevant references to those in the codebase, to
 avoid further confusion?
 
 Thanks,
 Guillem
 



Home | Main Index | Thread Index | Old Index