[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
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
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?
Main Index |
Thread Index |