[clang] [llvm] [Hexagon] ELF attributes for Hexagon (PR #85359)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 14 22:00:19 PDT 2024


================
@@ -395,7 +396,8 @@ template <class ELFT> class ELFObjectFile : public ELFObjectFileBase {
 
     for (const Elf_Shdr &Sec : *SectionsOrErr) {
       if (Sec.sh_type == ELF::SHT_ARM_ATTRIBUTES ||
-          Sec.sh_type == ELF::SHT_RISCV_ATTRIBUTES) {
+          Sec.sh_type == ELF::SHT_RISCV_ATTRIBUTES ||
----------------
MaskRay wrote:

These values are all equal. However, we should check `getEMachine() == EM_HEXAGON` before testing a processor-specific section type

https://github.com/llvm/llvm-project/pull/85359


More information about the llvm-commits mailing list