Source-Changes-D archive

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

Re: CVS commit: src/sys/sys



    Date:        Wed, 12 Nov 2025 21:26:49 +0000
    From:        "Joseph Koshy" <jkoshy%netbsd.org@localhost>
    Message-ID:  <20251112212649.46105FC2E%cvs.NetBSD.org@localhost>

  | Bump __NetBSD_Version__ to mark the change to the Elf{32,64}_Versym
  | types in <sys/exec_elf.h>.

That was the wrong way for this (harmless overall, so don't revert it).
That define is for internal kernel ABI changes (and should really almost
never be tested by anything in userland.)

What should have (and still should) happen, is to add a new #define
to <sys/exec_elf.h> which is there when the new version exists on NetBSD.

Don't take this suggestion seriously (I'm lousy at inventing names),
but something like

#define	_NetBSD_ElfHdr_Version 2

Then code can be patched to instead of doing

	#if defined(__NetBSD__)

to instead do

	#if defined(__NetBSD) && \
	   (!defined(_NetBSD_ElfHdr_Version) || _NetBSD_Elfdr_Version < 2)

or something like that.

kre

ps: whether to reserve version number 1 for what existed before the
new header was added is a question for someone else to ponder.  Depends
whether anyone might go back and retrofit it into the old version.





Home | Main Index | Thread Index | Old Index