mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Code-gen may inject code into the IR before it emits the ASM. The linker
obviously cannot know that this code is present, let alone used. So prevent the internalize pass from internalizing those global values which code-gen may insert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154645 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
511568dd1f
commit
aab3c0cb07
@ -122,6 +122,9 @@ bool InternalizePass::runOnModule(Module &M) {
|
||||
|
||||
bool Changed = false;
|
||||
|
||||
// Never internalize functions which code-gen might insert.
|
||||
ExternalNames.insert("__stack_chk_fail");
|
||||
|
||||
// Mark all functions not in the api as internal.
|
||||
// FIXME: maybe use private linkage?
|
||||
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
|
||||
@ -150,6 +153,9 @@ bool InternalizePass::runOnModule(Module &M) {
|
||||
ExternalNames.insert("llvm.global_dtors");
|
||||
ExternalNames.insert("llvm.global.annotations");
|
||||
|
||||
// Never internalize symbols code-gen inserts.
|
||||
ExternalNames.insert("__stack_chk_guard");
|
||||
|
||||
// Mark all global variables with initializers that are not in the api as
|
||||
// internal as well.
|
||||
// FIXME: maybe use private linkage?
|
||||
|
Loading…
Reference in New Issue
Block a user