search for: symbolbody

Displaying 20 results from an estimated 22 matches for "symbolbody".

2016 Apr 27
4
RFC: LLD symbol table redesign
...izing indirection when resolving relocations. The key idea is that we perform symbol resolution by overwriting SymbolBodies, rather than by updating pointers. This is based on some ideas mentioned by Rafael on IRC. Conceptually, we split Symbol into a non-polymorphic part and a polymorphic part (a SymbolBody). The non-polymorphic part contains the flags that are currently stored in Symbol, while the polymorphic part would be a derived class of SymbolBody stored directly in the Symbol object without a level of indirection. The class definitions would roughly look like this: struct Symbol { uint8_t Bi...
2017 Feb 28
4
[lld] We call SymbolBody::getVA redundantly a lot...
tl;dr: it looks like we call SymbolBody::getVA about 5x more times than we need to Should we cache it or something? (careful with threads). Here is a link to a PDF of my Mathematica notebook which has all the details of my investigation: https://drive.google.com/open?id=0B8v10qJ6EXRxVDQ3YnZtUlFtZ1k There seem to be two main regimes...
2017 Mar 01
2
[lld] We call SymbolBody::getVA redundantly a lot...
...0 PM, Rui Ueyama <ruiu at google.com> wrote: > I don't think getVA is particularly expensive, and if it is not expensive > I wouldn't cache its result. Did you experiment to cache getVA results? I > think you can do that fairly easily by adding a std::atomic_uint64_t to > SymbolBody and use it as a cache for getVA. > You're right, caching it didn't have any significant effect (though I wasn't measuring super precisely ). I think I was remembering the profile wrong. I remember measuring that we had some very bad cache/TLB misses here, but I guess those aren'...
2017 Mar 01
2
[lld] We call SymbolBody::getVA redundantly a lot...
...gt; wrote: >> >>> I don't think getVA is particularly expensive, and if it is not >>> expensive I wouldn't cache its result. Did you experiment to cache getVA >>> results? I think you can do that fairly easily by adding a >>> std::atomic_uint64_t to SymbolBody and use it as a cache for getVA. >>> >> >> >> You're right, caching it didn't have any significant effect (though I >> wasn't measuring super precisely ). I think I was remembering the profile >> wrong. I remember measuring that we had some very ba...
2017 Jun 14
2
Using LLD to create a .lib from a .def
I'm copying some LLD code into my codebase like this: // workaround for LLD not exposing ability to convert .def to .lib #include <set> namespace lld { namespace coff { class SymbolBody; class StringChunk; struct Symbol; struct Export { StringRef Name; // N in /export:N or /export:E=N StringRef ExtName; // E in /export:E=N SymbolBody *Sym = nullptr; uint16_t Ordinal = 0; bool Noname = false; bool Data = false; bool Private = false; // If an export is a f...
2017 Jun 15
2
Using LLD to create a .lib from a .def
...llvm.org> wrote: > >> I'm copying some LLD code into my codebase like this: >> >> // workaround for LLD not exposing ability to convert .def to .lib >> >> #include <set> >> >> namespace lld { >> namespace coff { >> >> class SymbolBody; >> class StringChunk; >> struct Symbol; >> >> struct Export { >> StringRef Name; // N in /export:N or /export:E=N >> StringRef ExtName; // E in /export:E=N >> SymbolBody *Sym = nullptr; >> uint16_t Ordinal = 0; >> bool Noname...
2017 Mar 23
6
[RFC] better link error messages
...elf::EhFrameSection<llvm ::object::ELFType<(llvm::support::endianness)0, true> >::addSection(lld::elf::InputSectionBase*)' *Conflicting symbols* /ssd/clang/bin/ld.lld: error: /ssd/llvm-project/lld/ELF/Writer.cpp:38: duplicate symbol 'lld::elf::MipsGotSection::addEntry(lld::elf::SymbolBody&, long, lld::elf::RelExpr)' /ssd/clang/bin/ld.lld: error: /ssd/llvm-project/lld/ELF/SyntheticSections.cpp:673: previous definition was here For each error, we want to print out information about 1) symbol name, 2) source file name(s) and source location(s) if available and 3) source objec...
2017 Jun 16
2
Using LLD to create a .lib from a .def
...codebase like this: >>>> >>>> // workaround for LLD not exposing ability to convert .def to .lib >>>> >>>> #include <set> >>>> >>>> namespace lld { >>>> namespace coff { >>>> >>>> class SymbolBody; >>>> class StringChunk; >>>> struct Symbol; >>>> >>>> struct Export { >>>> StringRef Name; // N in /export:N or /export:E=N >>>> StringRef ExtName; // E in /export:E=N >>>> SymbolBody *Sym = nullptr;...
2017 Mar 25
4
[RFC] better link error messages
On Mar 24, 2017 5:22 PM, "Reid Kleckner" <rnk at google.com> wrote: I figured you might consider moving the basenames of the filename earlier in the diagnostic, something like: bin/ld.lld: *error:* duplicate symbol: lld::elf::MipsGotSection::addEntry(lld::elf::SymbolBody&, long, lld::elf::RelExpr) *>>> defined at* Writer.cpp:38 in /home/buildslave/buildslave/clang-cmake- aarch64-39vma/llvm/tools/lld/ELF/ *>>>* Writer.cpp.o in archive lib/liblldELF.a *>>> defined at* SyntheticSections.cpp:673 in /home/buildslave/buildslave/...
2017 Mar 29
3
[RFC] better link error messages
...Mar 24, 2017 5:22 PM, "Reid Kleckner" <rnk at google.com> wrote: > > I figured you might consider moving the basenames of the filename earlier > in the diagnostic, something like: > > bin/ld.lld: *error:* duplicate symbol: lld::elf::MipsGotSection::addEntry(lld::elf::SymbolBody&, > long, lld::elf::RelExpr) > *>>> defined at* Writer.cpp:38 in /home/buildslave/buildslave/ > clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/ > *>>>* Writer.cpp.o in archive lib/liblldELF.a > *>>> defined at* SyntheticSections.cpp:673 in /hom...
2017 Mar 24
4
[RFC] better link error messages
...dSection(lld::elf::InputSectionBase*) *>>> referenced by* /home/buildslave/buildslave/clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/Writer.cpp:207 *>>>* lib/liblldELF.a(Writer.cpp.o) bin/ld.lld: *error:* duplicate symbol: lld::elf::MipsGotSection::addEntry(lld::elf::SymbolBody&, long, lld::elf::RelExpr) *>>> defined at* /home/buildslave/buildslave/clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/Writer.cpp:38 *>>>* lib/liblldELF.a(Writer.cpp.o) *>>> defined at* /home/buildslave/buildslave/clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/...
2017 Mar 29
2
[RFC] better link error messages
....o in archive lib/liblldELF.a The wording of this one is mildly self contradictory. Undefined symbols aren't defined, they're... used? referenced? Jon > > > Duplicate symbol error: > > bin/ld.lld: error: duplicate symbol: > lld::elf::MipsGotSection::addEntry(lld::elf::SymbolBody&, long, > lld::elf::RelExpr) > *>>> defined at* Writer.cpp:38 > (/home/buildslave/buildslave/clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/Writer.cpp:38) > *>>>* Writer.cpp.o in archive lib/liblldELF.a > *>>> defined at* SyntheticSections.cpp:...
2017 Mar 29
2
[RFC] better link error messages
...gt; >>>> Referenced by Writer.cpp:207 (/ssd/llvm-project/lld/ELF/Writer.cpp:207) >>>> Writer.cpp.o in archive lib/liblldELF.a > > > Duplicate symbol error: > > bin/ld.lld: error: duplicate symbol: > lld::elf::MipsGotSection::addEntry(lld::elf::SymbolBody&, long, > lld::elf::RelExpr) >>>> defined at Writer.cpp:38 >>>> (/home/buildslave/buildslave/clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/Writer.cpp:38) >>>> Writer.cpp.o in archive lib/liblldELF.a >>>> defined at SyntheticSections.c...
2016 Jan 21
3
Need to refactor relocation handlers in ELF LLD
We have fairly large and complex code to handle relocations in Writer.cpp, Target.cpp, OutputSections.cpp and InputSections.cpp. They started with simple code, but because each patch added a small piece of code to the existing one, it is becoming out of control now. For example, we have lots of entangled boolean flags in the functions that interfere with each other in an obscure fashion. Even I
2016 Mar 16
2
LLD performance w.r.t. local symbols (and --build-id)
...r this is still unknown. The following commits showed significant performance changes for ScyllaDB. r263222 ~4% speedup for ScyllaDB commit 1ffd121a07a3d67bf52d849c0cdef0f2fad889ba Author: Rafael Espindola <rafael.espindola at gmail.com> Date: Fri Mar 11 12:06:30 2016 +0000 Create a SymbolBody for locals. pr26878 shows a case where locals have to be in the got. git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk at 263222 91177308-0d34-0410-b5e6-96231b3b80d8 r263225 ~4% speedup for ScyllaDB commit 34ca5194d5e5e28d760cc8a730a2e1f3b2b6a21f Author: Rafael Espindola <rafael...
2016 Jun 21
2
[LLD] thunk implementation correctness depends on order of input section.
...loop, updating anything created that relies upon IS->OutSecOff. My current thought is that to get a simple implementation of ARM/Thumb interworking thunks working, including thunks to PLT entries [*], I will need to add support for a Thunk to be added to a different InputSection than the target SymbolBody anyway. So I can add all Thunks to the current InputSection fix as part of the ARM/Thumb interworking. Support for range extension thunks are a way down the priority list at the moment so I don't propose to make any radical changes to scanRelocations at this point, however I'm willing to do...
2016 Mar 16
2
LLD performance w.r.t. local symbols (and --build-id)
...its showed significant performance changes for ScyllaDB. r263222 ~4% speedup for ScyllaDB commit 1ffd121a07a3d67bf52d849c0cdef0f2fad889ba Author: Rafael Espindola <rafael.espindola at gmail.com<mailto:rafael.espindola at gmail.com>> Date: Fri Mar 11 12:06:30 2016 +0000 Create a SymbolBody for locals. pr26878 shows a case where locals have to be in the got. git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk at 263222 91177308-0d34-0410-b5e6-96231b3b80d8 r263225 ~4% speedup for ScyllaDB commit 34ca5194d5e5e28d760cc8a730a2e1f3b2b6a21f Author: Rafael Espindola <rafael...
2015 Nov 21
2
[lld] R_MIPS_HI16 / R_MIPS_LO16 calculation
Hi, I am working on support R_MIPS_HI16 / R_MIPS_LO16 in the new LLD and have a couple of questions. == Q1 In case of MIPS O32 ABI we have to find a matching R_MIPS_LO16 relocation to calculate R_MIPS_HI16 one because R_MIPS_HI16 uses combined addend (AHI << 16) + (short)ALO where AHI is original R_MIPS_HI16 addend and ALO is addend of the matching R_MIPS_LO16 relocation [1]. There are two
2017 Feb 22
2
[lld] elf linker creates undefined empty symbol
On Tue, Feb 21, 2017 at 2:05 PM, Rafael Avila de Espindola via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Carlo Kok <ck at remobjects.com> writes: > > > On 2017-02-21 20:33, Rafael Avila de Espindola wrote: > >>> Input files: > >>> https://www.dropbox.com/s/8yn3dggx05atn47/binLinux.zip?dl=0 > >> > >> If you pass --reproduce
2017 Feb 22
2
[lld] elf linker creates undefined empty symbol
...X: " << Rel.getSymIndex() << "\n"; } if (Sort) { diff --git a/ELF/SyntheticSections.h b/ELF/SyntheticSections.h index a1190d2..9f99931 100644 --- a/ELF/SyntheticSections.h +++ b/ELF/SyntheticSections.h @@ -290,8 +290,8 @@ public: uint32_t Type; -private: SymbolBody *Sym; +private: const InputSectionBase<ELFT> *InputSec = nullptr; uintX_t OffsetInSec; bool UseSymVA;