Chromium Code Reviews| Index: src/IceELFObjectWriter.cpp |
| diff --git a/src/IceELFObjectWriter.cpp b/src/IceELFObjectWriter.cpp |
| index ff68ba2582621fe7c6eda64d2a12950063d35120..230848c4f2c0a0c3de441e33a102c886f5af78fa 100644 |
| --- a/src/IceELFObjectWriter.cpp |
| +++ b/src/IceELFObjectWriter.cpp |
| @@ -36,7 +36,7 @@ struct { |
| #define X(tag, str, is_elf64, e_machine, e_flags) \ |
| { is_elf64, e_machine, e_flags } \ |
| , |
| - TARGETARCH_TABLE |
| + TARGETARCH_TABLE |
| #undef X |
| }; |
| @@ -244,7 +244,7 @@ void ELFObjectWriter::writeFunctionCode(const IceString &FuncName, |
| Section->appendData(Str, Asm->getBufferView()); |
| uint8_t SymbolType; |
| uint8_t SymbolBinding; |
| - if (IsInternal) { |
| + if (IsInternal && !Ctx.getFlags().getDisableInternal()) { |
| SymbolType = STT_NOTYPE; |
| SymbolBinding = STB_LOCAL; |
| } else { |
| @@ -545,6 +545,12 @@ void ELFObjectWriter::setUndefinedSyms(const ConstantList &UndefSyms) { |
| for (const Constant *S : UndefSyms) { |
| const auto Sym = llvm::cast<ConstantRelocatable>(S); |
| const IceString &Name = Sym->getName(); |
| + bool BadIntrinsic; |
| + const Intrinsics::FullIntrinsicInfo *Info = |
| + Ctx.getIntrinsicsInfo().find(Name, BadIntrinsic); |
| + if (Info) |
|
jvoung (off chromium)
2015/03/03 22:58:01
oops didn't think an intrinsic name would make it
Jim Stichnoth
2015/03/03 23:18:51
Yeah, these llvm.* symbols were making it into the
jvoung (off chromium)
2015/03/03 23:52:52
Okay, I agree it shouldn't be in the undefined sym
|
| + continue; |
| + assert(!BadIntrinsic); |
| assert(Sym->getOffset() == 0); |
| assert(Sym->getSuppressMangling()); |
| SymTab->noteUndefinedSym(Name, NullSection); |