[ELF] Error on relocations to local undefined symbols
For a reference to a local symbol, ld.bfd and gold error if the symbol is defined in a discarded section but accept it if the symbol is undefined. This inconsistent behavior seems unnecessary for us (it probably makes sense for them as they differentiate local/global symbols, the error would mean more code). Catch such errors. Symbol index 0 may be used by marker relocations, e.g. R_*_NONE R_ARM_V4BX. Don't error on them. The difference from D61563 (which caused msan failure) is we don't call Sym.computeBinding() on local symbols - VersionId is uninitialized. llvm-svn: 361213
Loading
Please register or sign in to comment