[RISCV] ELF attribute section for RISC-V.
Leverage ARM ELF build attribute section to create ELF attribute section for RISC-V. Extract the common part of parsing logic for this section into ELFAttributeParser.[cpp|h] and ELFAttributes.[cpp|h]. Differential Revision: https://reviews.llvm.org/D74023
This commit is contained in:
@@ -1239,7 +1239,7 @@ void ObjectFileELF::ParseARMAttributes(DataExtractor &data, uint64_t length,
|
||||
lldb::offset_t Offset = 0;
|
||||
|
||||
uint8_t FormatVersion = data.GetU8(&Offset);
|
||||
if (FormatVersion != llvm::ARMBuildAttrs::Format_Version)
|
||||
if (FormatVersion != llvm::ELFAttrs::Format_Version)
|
||||
return;
|
||||
|
||||
Offset = Offset + sizeof(uint32_t); // Section Length
|
||||
|
||||
Reference in New Issue
Block a user