mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-21 04:41:34 +00:00
gcc often inserts it's own names for sections (e.g.
gnu.linkonce.t.FunctionName). Convert them to "normal" LLVM names, otherwise linker won't be able to merge them. llvm-svn: 32958
This commit is contained in:
parent
1eb0ef6834
commit
fdd778278f
@ -80,8 +80,13 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
|
||||
X86SharedAsmPrinter::decorateName(CurrentFnName, F);
|
||||
|
||||
SwitchToTextSection(getSectionForFunction(*F).c_str(), F);
|
||||
|
||||
// Change GNU linkonce to LLVM linkonce name
|
||||
if (F->hasSection() &&
|
||||
(F->getSection().find(".gnu.linkonce.t") != std::string::npos))
|
||||
SwitchToTextSection(getSectionForFunction(*F).c_str(), NULL);
|
||||
else
|
||||
SwitchToTextSection(getSectionForFunction(*F).c_str(), F);
|
||||
|
||||
switch (F->getLinkage()) {
|
||||
default: assert(0 && "Unknown linkage type!");
|
||||
case Function::InternalLinkage: // Symbols default to internal.
|
||||
|
Loading…
x
Reference in New Issue
Block a user