The common code looks good to me. I did notice that you parse the st_other to get all four MIPS code models, but when building a symbol table only two models are handled. Does that mean running ld -r on a .o file will lose model info? http://reviews.llvm.org/D6236