mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 21:53:12 +08:00
[ELF] Make sure SHT_ARM_ATTRIBUTES is only recognized by Arm Targets
The SHT_ARM_ATTRIBUTES section type is in the processor specific space adding guard to make sure that it is only recognized when EMachine is EM_ARM. llvm-svn: 319304
This commit is contained in:
@@ -471,6 +471,8 @@ InputSectionBase *ObjFile<ELFT>::createInputSection(const Elf_Shdr &Sec) {
|
||||
|
||||
switch (Sec.sh_type) {
|
||||
case SHT_ARM_ATTRIBUTES: {
|
||||
if (Config->EMachine != EM_ARM)
|
||||
break;
|
||||
ARMAttributeParser Attributes;
|
||||
ArrayRef<uint8_t> Contents = check(this->getObj().getSectionContents(&Sec));
|
||||
Attributes.Parse(Contents, /*isLittle*/Config->EKind == ELF32LEKind);
|
||||
|
||||
Reference in New Issue
Block a user