Remove hack used to strip unwanted chars from section name
Use MCSectionELF methods as much as possible, removing some
ELFWriter methods which are now unused
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78940 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/ELFCodeEmitter.cpp b/lib/CodeGen/ELFCodeEmitter.cpp
index 61a9d5a..38cf826 100644
--- a/lib/CodeGen/ELFCodeEmitter.cpp
+++ b/lib/CodeGen/ELFCodeEmitter.cpp
@@ -73,7 +73,7 @@
EW.getGlobalELFVisibility(F));
FnSym->SectionIdx = ES->SectionIdx;
FnSym->Size = ES->getCurrentPCOffset()-FnStartOff;
- EW.addGlobalSymbol(F, true);
+ EW.AddPendingGlobalSymbol(F, true);
// Offset from start of Section
FnSym->Value = FnStartOff;
@@ -102,9 +102,9 @@
MachineRelocation &MR = Relocations[i];
intptr_t Addr;
if (MR.isGlobalValue()) {
- EW.addGlobalSymbol(MR.getGlobalValue());
+ EW.AddPendingGlobalSymbol(MR.getGlobalValue());
} else if (MR.isExternalSymbol()) {
- EW.addExternalSymbol(MR.getExternalSymbol());
+ EW.AddPendingExternalSymbol(MR.getExternalSymbol());
} else if (MR.isBasicBlock()) {
Addr = getMachineBasicBlockAddress(MR.getBasicBlock());
MR.setConstantVal(ES->SectionIdx);