[PATCH] D19490: ELF: Move code to where it is used, and related cleanups. NFC.
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 26 11:48:53 PDT 2016
rafael added inline comments.
================
Comment at: ELF/MarkLive.cpp:28
@@ -27,2 +27,3 @@
#include "Symbols.h"
+#include "Target.h"
#include "Writer.h"
----------------
Can you remove the include from InputSection.cpp?
================
Comment at: ELF/OutputSections.cpp:1155
@@ -1154,10 +1154,3 @@
fatal("FDE doesn't reference another section");
- InputSectionBase<ELFT> *Target = S->getRelocTarget(*RelI).first;
- if (Target && Target->Live) {
- uint32_t CieOffset = Offset + 4 - ID;
- auto I = OffsetToIndex.find(CieOffset);
- if (I == OffsetToIndex.end())
- fatal("invalid CIE reference");
- Cies[I->second].Fdes.push_back(EHRegion<ELFT>(S, Index));
- Out<ELFT>::EhFrameHdr->reserveFde();
- this->Header.sh_size += alignTo(Length, sizeof(uintX_t));
+ uint32_t SymIndex = RelI->getSymbol(Config->Mips64EL);
+ SymbolBody &B = S->getFile()->getSymbolBody(SymIndex).repl();
----------------
This code is pretty much exactly what getRelocTargetSym was. Maybe keep just that as an utility function and move the rest to MarkLive?
http://reviews.llvm.org/D19490
More information about the llvm-commits
mailing list