[Object] getBuildAttributes: check e_machine. NFC
getBuildAttributes is only called for ARM/RISCV object files and `SHT_ARM_ATTRIBUTES == SHT_RISCV_ATTRIBUTES`, so the following check `Sec.sh_type == ELF::SHT_ARM_ATTRIBUTES || Sec.sh_type == ELF::SHT_RISCV_ATTRIBUTES` is actually fine. But the convention is to guard such processor-specific section type checks with an e_machine test.
parent
c54f22f5
Please register or sign in to comment