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
This commit is contained in:
Bruno Cardoso Lopes
2009-08-13 21:25:27 +00:00
parent b8e1055f41
commit d163e8b14c
4 changed files with 88 additions and 147 deletions
+3 -3
View File
@@ -73,7 +73,7 @@ bool ELFCodeEmitter::finishFunction(MachineFunction &MF) {
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 @@ bool ELFCodeEmitter::finishFunction(MachineFunction &MF) {
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);