Index: lld/trunk/ELF/Target.cpp =================================================================== --- lld/trunk/ELF/Target.cpp +++ lld/trunk/ELF/Target.cpp @@ -383,6 +383,8 @@ return R_TLS; case R_386_TLS_LE_32: return R_NEG_TLS; + case R_386_NONE: + return R_HINT; default: error("do not know how to handle relocation " + toString(Type) + " (" + Twine(Type) + ")"); Index: lld/trunk/test/ELF/relocation-none-i686.test =================================================================== --- lld/trunk/test/ELF/relocation-none-i686.test +++ lld/trunk/test/ELF/relocation-none-i686.test @@ -0,0 +1,23 @@ +# RUN: yaml2obj %s -o %t.o +# RUN: ld.lld %t.o -o %t.out + +# Test that we can handle R_386_NONE. + +!ELF +FileHeader: + Class: ELFCLASS32 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_386 +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC ] + - Name: .rel.text + Type: SHT_RELA + Link: .symtab + Info: .text + Relocations: + - Offset: 0x0000000000000000 + Symbol: '' + Type: R_386_NONE