Add new e_machine constants to elf.h
Checks
| Context |
Check |
Description |
| redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
| redhat-pt-bot/TryBot-32bit |
success
|
Build for i686
|
| linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Test passed
|
| linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Test passed
|
Commit Message
This adds the new e_machine constants EM_LANAI, EM_CEVA, EM_CEVA_X2,
EM_GRAPHCORE_IPU, EM_IMG1, EM_NFP, EM_VE, EM_ARC_COMPACT3_64,
EM_MCS6502, EM_ARC_COMPACT3, EM_KVX, EM_65816, EM_KF32, EM_U16_U8CORE,
EM_TACHYUM, EM_56800EF, EM_SBF, EM_AIENGINE, EM_SIMA_MLA, EM_BANG,
EM_LOONGGPU, EM_SW64, EM_AIECTRLCODE, EM_PPU, EM_LST and EM_CHILI
constants as announced on the generic-abi list and ups EM_NUM to 273.
---
elf/elf.h | 31 ++++++++++++++++++++++++++++---
1 file changed, 28 insertions(+), 3 deletions(-)
Comments
On 10/15/26 7:38 AM, Mark Wielaard wrote:
> This adds the new e_machine constants EM_LANAI, EM_CEVA, EM_CEVA_X2,
> EM_GRAPHCORE_IPU, EM_IMG1, EM_NFP, EM_VE, EM_ARC_COMPACT3_64,
> EM_MCS6502, EM_ARC_COMPACT3, EM_KVX, EM_65816, EM_KF32, EM_U16_U8CORE,
> EM_TACHYUM, EM_56800EF, EM_SBF, EM_AIENGINE, EM_SIMA_MLA, EM_BANG,
> EM_LOONGGPU, EM_SW64, EM_AIECTRLCODE, EM_PPU, EM_LST and EM_CHILI
> constants as announced on the generic-abi list and ups EM_NUM to 273.
There are 5 unpublished values in your list. I don't think we want to
include unpublished EM_* numbers in elf.h?
I'd accept up to 267 which is published in v4.2.
Reviewing https://github.com/xinuos/gabi
Compared against published v4.2:
https://gabi.xinuos.com/v42/elf/a-emachine.html
> ---
> elf/elf.h | 31 ++++++++++++++++++++++++++++---
> 1 file changed, 28 insertions(+), 3 deletions(-)
>
> diff --git a/elf/elf.h b/elf/elf.h
> index b482fcfb6489..6f9fdbf31bfd 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -355,12 +355,37 @@ typedef struct
> #define EM_AMDGPU 224 /* AMD GPU */
> /* reserved 225-242 */
> #define EM_RISCV 243 /* RISC-V */
> -
> +#define EM_LANAI 244 /* Lanai processor */
OK.
> +#define EM_CEVA 245 /* CEVA Processor Architecture Family */
OK.
> +#define EM_CEVA_X2 246 /* CEVA X2 Processor Family */
OK.
> #define EM_BPF 247 /* Linux BPF -- in-kernel virtual machine */
> +#define EM_GRAPHCORE_IPU 248 /* Graphcore Intelligent Processing Unit */
OK.
> +#define EM_IMG1 249 /* Imagination Technologies */
OK.
> +#define EM_NFP 250 /* Netronome Flow Processor (NFP) */
OK.
> +#define EM_VE 251 /* NEC Vector Engine */
OK.
> #define EM_CSKY 252 /* C-SKY */
> +#define EM_ARC_COMPACT3_64 253 /* Synopsys ARCv2.3 64-bit */
OK.
> +#define EM_MCS6502 254 /* MOS Technology MCS 6502 processor */
OK.
> +#define EM_ARC_COMPACT3 255 /* Synopsys ARCv2.3 32-bit */
OK.
> +#define EM_KVX 256 /* Kalray VLIW core of the MPPA */
OK.
> +#define EM_65816 257 /* WDC 65816/65C816 */
OK.
> #define EM_LOONGARCH 258 /* LoongArch */
> -
> -#define EM_NUM 259
> +#define EM_KF32 259 /* ChipON KungFu 32 */
OK.
> +#define EM_U16_U8CORE 260 /* LAPIS nX-U16/U8 */
OK.
> +#define EM_TACHYUM 261 /* Tachyum */
OK.
> +#define EM_56800EF 262 /* NXP 56800EF Digital Signal Controller (DSC) */
OK.
> +#define EM_SBF 263 /* Solana Bytecode Format */
OK.
> +#define EM_AIENGINE 264 /* AMD/Xilinx AIEngine architecture */
OK.
> +#define EM_SIMA_MLA 265 /* SiMa MLA */
OK.
> +#define EM_BANG 266 /* Cambricon BANG */
OK.
> +#define EM_LOONGGPU 267 /* Loongson LoongGPU */
OK.
> +#define EM_SW64 268 /* Wuxi Institute of Advanced Technology SW64 */
> +#define EM_AIECTRLCODE 269 /* AMD/Xilinx AIEngine ctrlcode */
> +#define EM_PPU 270 /* T-Head PPU */
> +#define EM_LST 271 /* Lisuan Technology Co., Ltd. LST */
> +#define EM_CHILI 272 /* OpenAI Chili architecture */
Not OK. These last 5 are unpublished?
> +
> +#define EM_NUM 273
Likewise this value is ahead of the published numbers.
>
> /* Old spellings/synonyms. */
>
>
> > +#define EM_SW64 268 /* Wuxi Institute of Advanced
> Technology SW64 */
> > +#define EM_AIECTRLCODE 269 /* AMD/Xilinx AIEngine ctrlcode */
> > +#define EM_PPU 270 /* T-Head PPU */
> > +#define EM_LST 271 /* Lisuan Technology Co., Ltd. LST
> */
> > +#define EM_CHILI 272 /* OpenAI Chili architecture */
>
> Not OK. These last 5 are unpublished?
>
These have been officially assigned and published on the generic-abi
mailing list. They will appear in the next published draft of Version 4.3
of the ELF spec.
-cary
On 10/17/26 8:43 PM, Cary Coutant wrote:
> > +#define EM_SW64 268 /* Wuxi Institute of Advanced Technology SW64 */
> > +#define EM_AIECTRLCODE 269 /* AMD/Xilinx AIEngine ctrlcode */
> > +#define EM_PPU 270 /* T-Head PPU */
> > +#define EM_LST 271 /* Lisuan Technology Co., Ltd. LST */
> > +#define EM_CHILI 272 /* OpenAI Chili architecture */
>
> Not OK. These last 5 are unpublished?
>
>
> These have been officially assigned and published on the generic-abi
> mailing list. They will appear in the next published draft of Version
> 4.3 of the ELF spec.
Thanks for clarifying.
May we wait until 4.3 has been published to include them?
My preference would be to update elf.h when we have a published ELF spec we can reference.
I'm happy to include all the other new constants from 4.2.
Hi,
On Mon, 2026-10-19 at 10:27 -0400, Carlos O'Donell wrote:
> On 10/17/26 8:43 PM, Cary Coutant wrote:
> > > +#define EM_SW64 268 /* Wuxi Institute of Advanced Technology SW64 */
> > > +#define EM_AIECTRLCODE 269 /* AMD/Xilinx AIEngine ctrlcode */
> > > +#define EM_PPU 270 /* T-Head PPU */
> > > +#define EM_LST 271 /* Lisuan Technology Co., Ltd. LST */
> > > +#define EM_CHILI 272 /* OpenAI Chili architecture */
> >
> > Not OK. These last 5 are unpublished?
> >
> > These have been officially assigned and published on the generic-abi
> > mailing list. They will appear in the next published draft of Version
> > 4.3 of the ELF spec.
>
> Thanks for clarifying.
>
> May we wait until 4.3 has been published to include them?
I think the point of officially assigning and publishing these
constants on generic-abi is precisely so we don't have to wait for new
versions of the gabi/ELF spec to start using them. There may be years
between publication of (draft) versions.
Cheers,
Mark
I've pushed all the new e_machine values into the v4.3 draft, if that
helps, Carlos. My plan is to keep that list current in the git repo and in
the HTML version, without publishing a new PDF version every time.
Really the only reason we're still in draft status is that I'm waiting for
Xinuos legal to approve a more permissive license. Unfortunately, it's a
very slow process.
-cary
On Mon, Oct 19, 2026 at 9:17 AM Mark Wielaard <mark@klomp.org> wrote:
> Hi,
>
> On Mon, 2026-10-19 at 10:27 -0400, Carlos O'Donell wrote:
> > On 10/17/26 8:43 PM, Cary Coutant wrote:
> > > > +#define EM_SW64 268 /* Wuxi Institute of
> Advanced Technology SW64 */
> > > > +#define EM_AIECTRLCODE 269 /* AMD/Xilinx AIEngine
> ctrlcode */
> > > > +#define EM_PPU 270 /* T-Head PPU */
> > > > +#define EM_LST 271 /* Lisuan Technology Co.,
> Ltd. LST */
> > > > +#define EM_CHILI 272 /* OpenAI Chili architecture */
> > >
> > > Not OK. These last 5 are unpublished?
> > >
> > > These have been officially assigned and published on the generic-abi
> > > mailing list. They will appear in the next published draft of Version
> > > 4.3 of the ELF spec.
> >
> > Thanks for clarifying.
> >
> > May we wait until 4.3 has been published to include them?
>
> I think the point of officially assigning and publishing these
> constants on generic-abi is precisely so we don't have to wait for new
> versions of the gabi/ELF spec to start using them. There may be years
> between publication of (draft) versions.
>
> Cheers,
>
> Mark
>
Hi,
Any update on this? It seems the e_machine values are published in all
possible official ways. Shall we just add them now?
Thanks,
Mark
On Tue, Oct 20, 2026 at 02:35:35PM -0700, Cary Coutant wrote:
> I've pushed all the new e_machine values into the v4.3 draft, if that
> helps, Carlos. My plan is to keep that list current in the git repo and in
> the HTML version, without publishing a new PDF version every time.
>
> Really the only reason we're still in draft status is that I'm waiting for
> Xinuos legal to approve a more permissive license. Unfortunately, it's a
> very slow process.
>
> -cary
>
>
> On Mon, Oct 19, 2026 at 9:17 AM Mark Wielaard <mark@klomp.org> wrote:
>
> > Hi,
> >
> > On Mon, 2026-10-19 at 10:27 -0400, Carlos O'Donell wrote:
> > > On 10/17/26 8:43 PM, Cary Coutant wrote:
> > > > > +#define EM_SW64 268 /* Wuxi Institute of
> > Advanced Technology SW64 */
> > > > > +#define EM_AIECTRLCODE 269 /* AMD/Xilinx AIEngine
> > ctrlcode */
> > > > > +#define EM_PPU 270 /* T-Head PPU */
> > > > > +#define EM_LST 271 /* Lisuan Technology Co.,
> > Ltd. LST */
> > > > > +#define EM_CHILI 272 /* OpenAI Chili architecture */
> > > >
> > > > Not OK. These last 5 are unpublished?
> > > >
> > > > These have been officially assigned and published on the generic-abi
> > > > mailing list. They will appear in the next published draft of Version
> > > > 4.3 of the ELF spec.
> > >
> > > Thanks for clarifying.
> > >
> > > May we wait until 4.3 has been published to include them?
> >
> > I think the point of officially assigning and publishing these
> > constants on generic-abi is precisely so we don't have to wait for new
> > versions of the gabi/ELF spec to start using them. There may be years
> > between publication of (draft) versions.
> >
> > Cheers,
> >
> > Mark
> >
Hi,
On Mon, Oct 26, 2026 at 10:58:12AM +0100, Mark Wielaard wrote:
> It seems the e_machine values are published in all
> possible official ways. Shall we just add them now?
Ping. Since the objection to adding the new constants have been
resolve, OK to push now?
> On Tue, Oct 20, 2026 at 02:35:35PM -0700, Cary Coutant wrote:
> > I've pushed all the new e_machine values into the v4.3 draft, if that
> > helps, Carlos. My plan is to keep that list current in the git repo and in
> > the HTML version, without publishing a new PDF version every time.
> >
> > Really the only reason we're still in draft status is that I'm waiting for
> > Xinuos legal to approve a more permissive license. Unfortunately, it's a
> > very slow process.
> >
> > -cary
> >
> >
> > On Mon, Oct 19, 2026 at 9:17 AM Mark Wielaard <mark@klomp.org> wrote:
> >
> > > Hi,
> > >
> > > On Mon, 2026-10-19 at 10:27 -0400, Carlos O'Donell wrote:
> > > > On 10/17/26 8:43 PM, Cary Coutant wrote:
> > > > > > +#define EM_SW64 268 /* Wuxi Institute of
> > > Advanced Technology SW64 */
> > > > > > +#define EM_AIECTRLCODE 269 /* AMD/Xilinx AIEngine
> > > ctrlcode */
> > > > > > +#define EM_PPU 270 /* T-Head PPU */
> > > > > > +#define EM_LST 271 /* Lisuan Technology Co.,
> > > Ltd. LST */
> > > > > > +#define EM_CHILI 272 /* OpenAI Chili architecture */
> > > > >
> > > > > Not OK. These last 5 are unpublished?
> > > > >
> > > > > These have been officially assigned and published on the generic-abi
> > > > > mailing list. They will appear in the next published draft of Version
> > > > > 4.3 of the ELF spec.
> > > >
> > > > Thanks for clarifying.
> > > >
> > > > May we wait until 4.3 has been published to include them?
> > >
> > > I think the point of officially assigning and publishing these
> > > constants on generic-abi is precisely so we don't have to wait for new
> > > versions of the gabi/ELF spec to start using them. There may be years
> > > between publication of (draft) versions.
> > >
> > > Cheers,
> > >
> > > Mark
> > >
On 10/20/26 5:35 PM, Cary Coutant wrote:
> I've pushed all the new e_machine values into the v4.3 draft, if that
> helps, Carlos. My plan is to keep that list current in the git repo
> and in the HTML version, without publishing a new PDF version every
> time.
>
> Really the only reason we're still in draft status is that I'm
> waiting for Xinuos legal to approve a more permissive license.
> Unfortunately, it's a very slow process.
I'd like to see some kind of more formal process that ensures that
the constants don't change. Publishing it is sufficient for me.
The draft doesn't meet this requirement.
Do you think that publishing future versions will be faster?
Is this a one-of problem that will be solved soon and you'll be
able to publish yearly with EM_* updates?
On 11/2/26 4:55 PM, Mark Wielaard wrote:
> Hi,
>
> On Mon, Oct 26, 2026 at 10:58:12AM +0100, Mark Wielaard wrote:
>> It seems the e_machine values are published in all
>> possible official ways. Shall we just add them now?
>
> Ping. Since the objection to adding the new constants have been
> resolve, OK to push now?
No. I've responded up-thread to Cary. Thanks for the ping.
I will add new e_machine values to the gabi.xinuos.com website as they are
assigned, and announce them to the generic-abi mailing list. These are
official assignments. I won't be publishing a new version of the document
(i.e., as a PDF with an updated version number) just for new e_machine
values — Appendix A in the PDF says to check the website for the latest
assignments.
The only reason Version 4.3 is still in draft status is the copyright
status. I really want Xinuos to approve a less restrictive copyright notice
before I publish. Once that's done, I'll publish new versions on a regular
basis as appropriate when changes are approved.
Over the past few years, we've been adding newly-assigned e_machine values
to elf.h in the gcc tree. I don't see why you shouldn't continue that
practice.
-cary
On Tue, Nov 3, 2026 at 2:15 PM Carlos O'Donell <carlos@redhat.com> wrote:
> On 10/20/26 5:35 PM, Cary Coutant wrote:
> > I've pushed all the new e_machine values into the v4.3 draft, if that
> > helps, Carlos. My plan is to keep that list current in the git repo
> > and in the HTML version, without publishing a new PDF version every
> > time.
> >
> > Really the only reason we're still in draft status is that I'm
> > waiting for Xinuos legal to approve a more permissive license.
> > Unfortunately, it's a very slow process.
>
> I'd like to see some kind of more formal process that ensures that
> the constants don't change. Publishing it is sufficient for me.
> The draft doesn't meet this requirement.
>
> Do you think that publishing future versions will be faster?
>
> Is this a one-of problem that will be solved soon and you'll be
> able to publish yearly with EM_* updates?
>
> --
> Cheers,
> Carlos.
>
>
I've added the newest e_machine values to Version 4.2 (published—not
draft), at https://gabi.xinuos.com/v42/index.html. Does that help, Carlos?
-cary
On Tue, Nov 10, 2026 at 12:02 PM Cary Coutant <ccoutant@gmail.com> wrote:
> I will add new e_machine values to the gabi.xinuos.com website as they
> are assigned, and announce them to the generic-abi mailing list. These are
> official assignments. I won't be publishing a new version of the document
> (i.e., as a PDF with an updated version number) just for new e_machine
> values — Appendix A in the PDF says to check the website for the latest
> assignments.
>
> The only reason Version 4.3 is still in draft status is the copyright
> status. I really want Xinuos to approve a less restrictive copyright notice
> before I publish. Once that's done, I'll publish new versions on a regular
> basis as appropriate when changes are approved.
>
> Over the past few years, we've been adding newly-assigned e_machine values
> to elf.h in the gcc tree. I don't see why you shouldn't continue that
> practice.
>
> -cary
>
>
> On Tue, Nov 3, 2026 at 2:15 PM Carlos O'Donell <carlos@redhat.com> wrote:
>
>> On 10/20/26 5:35 PM, Cary Coutant wrote:
>> > I've pushed all the new e_machine values into the v4.3 draft, if that
>> > helps, Carlos. My plan is to keep that list current in the git repo
>> > and in the HTML version, without publishing a new PDF version every
>> > time.
>> >
>> > Really the only reason we're still in draft status is that I'm
>> > waiting for Xinuos legal to approve a more permissive license.
>> > Unfortunately, it's a very slow process.
>>
>> I'd like to see some kind of more formal process that ensures that
>> the constants don't change. Publishing it is sufficient for me.
>> The draft doesn't meet this requirement.
>>
>> Do you think that publishing future versions will be faster?
>>
>> Is this a one-of problem that will be solved soon and you'll be
>> able to publish yearly with EM_* updates?
>>
>> --
>> Cheers,
>> Carlos.
>>
>>
@@ -355,12 +355,37 @@ typedef struct
#define EM_AMDGPU 224 /* AMD GPU */
/* reserved 225-242 */
#define EM_RISCV 243 /* RISC-V */
-
+#define EM_LANAI 244 /* Lanai processor */
+#define EM_CEVA 245 /* CEVA Processor Architecture Family */
+#define EM_CEVA_X2 246 /* CEVA X2 Processor Family */
#define EM_BPF 247 /* Linux BPF -- in-kernel virtual machine */
+#define EM_GRAPHCORE_IPU 248 /* Graphcore Intelligent Processing Unit */
+#define EM_IMG1 249 /* Imagination Technologies */
+#define EM_NFP 250 /* Netronome Flow Processor (NFP) */
+#define EM_VE 251 /* NEC Vector Engine */
#define EM_CSKY 252 /* C-SKY */
+#define EM_ARC_COMPACT3_64 253 /* Synopsys ARCv2.3 64-bit */
+#define EM_MCS6502 254 /* MOS Technology MCS 6502 processor */
+#define EM_ARC_COMPACT3 255 /* Synopsys ARCv2.3 32-bit */
+#define EM_KVX 256 /* Kalray VLIW core of the MPPA */
+#define EM_65816 257 /* WDC 65816/65C816 */
#define EM_LOONGARCH 258 /* LoongArch */
-
-#define EM_NUM 259
+#define EM_KF32 259 /* ChipON KungFu 32 */
+#define EM_U16_U8CORE 260 /* LAPIS nX-U16/U8 */
+#define EM_TACHYUM 261 /* Tachyum */
+#define EM_56800EF 262 /* NXP 56800EF Digital Signal Controller (DSC) */
+#define EM_SBF 263 /* Solana Bytecode Format */
+#define EM_AIENGINE 264 /* AMD/Xilinx AIEngine architecture */
+#define EM_SIMA_MLA 265 /* SiMa MLA */
+#define EM_BANG 266 /* Cambricon BANG */
+#define EM_LOONGGPU 267 /* Loongson LoongGPU */
+#define EM_SW64 268 /* Wuxi Institute of Advanced Technology SW64 */
+#define EM_AIECTRLCODE 269 /* AMD/Xilinx AIEngine ctrlcode */
+#define EM_PPU 270 /* T-Head PPU */
+#define EM_LST 271 /* Lisuan Technology Co., Ltd. LST */
+#define EM_CHILI 272 /* OpenAI Chili architecture */
+
+#define EM_NUM 273
/* Old spellings/synonyms. */