diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2017-03-08 22:36:28 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2017-03-08 22:36:28 +0000 |
commit | cdaaff0c7aeb20760b3592c779598a41a2a7c9cb (patch) | |
tree | dc1d073fc0c34fdbb0197b9369dea7976c302c92 /lld/ELF/MarkLive.cpp | |
parent | 9db419b9fd25a84c6e99f762e5189c8a326aa994 (diff) |
Remove DefinedSynthetic.
With this we have a single section hierarchy. It is a bit less code,
but the main advantage will be in a future patch being able to handle
foo = symbol_in_obj;
in a linker script. Currently that fails since we try to find the
output section of symbol_in_obj. With this we should be able to just
return an InputSection from the expression.
Diffstat (limited to 'lld/ELF/MarkLive.cpp')
-rw-r--r-- | lld/ELF/MarkLive.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/MarkLive.cpp b/lld/ELF/MarkLive.cpp index 7a6c982047b..e1bc64d925c 100644 --- a/lld/ELF/MarkLive.cpp +++ b/lld/ELF/MarkLive.cpp @@ -78,7 +78,7 @@ static void resolveReloc(InputSectionBase &Sec, RelT &Rel, typename ELFT::uint Offset = D->Value; if (D->isSection()) Offset += getAddend<ELFT>(Sec, Rel); - Fn({D->Section->Repl, Offset}); + Fn({cast<InputSectionBase>(D->Section)->Repl, Offset}); } else if (auto *U = dyn_cast<Undefined>(&B)) { for (InputSectionBase *Sec : CNamedSections.lookup(U->getName())) Fn({Sec, 0}); @@ -223,7 +223,7 @@ template <class ELFT> void elf::markLive() { auto MarkSymbol = [&](const SymbolBody *Sym) { if (auto *D = dyn_cast_or_null<DefinedRegular>(Sym)) - Enqueue({D->Section, D->Value}); + Enqueue({cast<InputSectionBase>(D->Section), D->Value}); }; // Add GC root symbols. |