[PR] Skip NONE static relocations

Summary:
To supress warning of unsupported relocations

Vladislav Khmelevsky,
Advanced Software Technology Lab, Huawei

(cherry picked from FBD31738420)
This commit is contained in:
Vladislav Khmelevsky 2021-10-17 16:36:24 +03:00 committed by Maksim Panchenko
parent dcdd37fdc2
commit dc4b32e1b1
1 changed files with 2 additions and 0 deletions

View File

@ -2308,6 +2308,8 @@ void RewriteInstance::readRelocations(const SectionRef &Section) {
SmallString<16> TypeName;
Rel.getTypeName(TypeName);
uint64_t RType = Rel.getType();
if (Relocation::isNone(RType))
continue;
// Adjust the relocation type as the linker might have skewed it.
if (BC->isX86() && (RType & ELF::R_X86_64_converted_reloc_bit)) {