Hi Ian, I'm trying to cross build llvm and llvm-gcc on Linux for ARM by using GOLD as the linker. This has exposed some problems we have in GOLD. One of them related to the assert in the relocate_for_relocatable() method (target-reloc.h, line 557): new_symndx = object->symtab_index(r_sym); gold_assert(new_symndx != -1U); This assert gets triggered when the build links glibc with the -r -X flags (remove local symbols). This happens because with the given -X option GOLD removes all local symbols, including those which still needed to resolve static relocs later. LD keeps that kind of local symbols in the symbol table even if -X requested. I guess GOLD should do the same. Please find attached the patch that fixes this issue. Thank you, Viktor.