Skip to content

Commit

Permalink
Add ELF machine IDs for AVR32, MicroBlaze and V800
Browse files Browse the repository at this point in the history
  • Loading branch information
jld01 committed Jul 26, 2024
1 parent abe036e commit ba86f53
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
20 changes: 20 additions & 0 deletions core/org.eclipse.cdt.core/.settings/.api_filters
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,24 @@
</message_arguments>
</filter>
</resource>
<resource path="utils/org/eclipse/cdt/utils/elf/Elf.java" type="org.eclipse.cdt.utils.elf.Elf$ELFhdr">
<filter id="336658481">
<message_arguments>
<message_argument value="org.eclipse.cdt.utils.elf.Elf.ELFhdr"/>
<message_argument value="EM_AVR32"/>
</message_arguments>
</filter>
<filter id="336658481">
<message_arguments>
<message_argument value="org.eclipse.cdt.utils.elf.Elf.ELFhdr"/>
<message_argument value="EM_MICROBLAZE"/>
</message_arguments>
</filter>
<filter id="336658481">
<message_arguments>
<message_argument value="org.eclipse.cdt.utils.elf.Elf.ELFhdr"/>
<message_argument value="EM_V800"/>
</message_arguments>
</filter>
</resource>
</component>
2 changes: 1 addition & 1 deletion core/org.eclipse.cdt.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.core; singleton:=true
Bundle-Version: 8.4.300.qualifier
Bundle-Version: 8.5.0.qualifier
Bundle-Activator: org.eclipse.cdt.core.CCorePlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Expand Down
13 changes: 13 additions & 0 deletions core/org.eclipse.cdt.core/utils/org/eclipse/cdt/utils/elf/Elf.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ public class ELFhdr {
public static final int EM_SPARC32PLUS = 18;
public static final int EM_PPC = 20;
public static final int EM_PPC64 = 21;
/** @since 8.5*/
public static final int EM_V800 = 36;
public static final int EM_ARM = 40;
public static final int EM_SH = 42;
public static final int EM_SPARCV9 = 43;
Expand Down Expand Up @@ -157,6 +159,10 @@ public class ELFhdr {
public static final int EM_RL78 = 197; /* Renesas RL78 Microcontroller */
/** @since 6.0 */
public static final int EM_AARCH64 = 183;
/** @since 8.5 */
public static final int EM_AVR32 = 185;
/** @since 8.5 */
public static final int EM_MICROBLAZE = 189;

/** @since 7.0 */
public static final int EM_RISCV = 243;
Expand Down Expand Up @@ -824,6 +830,9 @@ public Attribute getAttributes() throws IOException {
case Elf.ELFhdr.EM_H8_300H:
attrib.cpu = "h8300"; //$NON-NLS-1$
break;
case Elf.ELFhdr.EM_V800:
attrib.cpu = "v800"; //$NON-NLS-1$
break;
case Elf.ELFhdr.EM_V850:
case Elf.ELFhdr.EM_CYGNUS_V850:
attrib.cpu = "v850"; //$NON-NLS-1$
Expand Down Expand Up @@ -870,6 +879,9 @@ public Attribute getAttributes() throws IOException {
case Elf.ELFhdr.EM_AVR:
attrib.cpu = "avr"; //$NON-NLS-1$
break;
case Elf.ELFhdr.EM_AVR32:
attrib.cpu = "avr32"; //$NON-NLS-1$
break;
case Elf.ELFhdr.EM_MSP430:
attrib.cpu = "msp430"; //$NON-NLS-1$
break;
Expand All @@ -882,6 +894,7 @@ public Attribute getAttributes() throws IOException {
case Elf.ELFhdr.EM_X86_64:
attrib.cpu = "x86_64"; //$NON-NLS-1$
break;
case Elf.ELFhdr.EM_MICROBLAZE:
case Elf.ELFhdr.EM_XILINX_MICROBLAZE:
attrib.cpu = "microblaze"; //$NON-NLS-1$
break;
Expand Down

0 comments on commit ba86f53

Please sign in to comment.