rustc_target::spec

Function ef_avr_arch

Source
pub fn ef_avr_arch(target_cpu: &str) -> u32
Expand description

Resolve the value of the EF_AVR_ARCH field for AVR ELF files, given the name of the target CPU / MCU.

In ELF files using the AVR architecture, the lower 7 bits of the e_flags field is a code that identifies the “ISA revision” of the object code.

This flag is generally set by AVR compilers in their output ELF files, and linkers like avr-ld check this flag in all of their input files to make sure they are compiled with the same ISA revision.