search for: syntheticsect

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

2017 Mar 29
2
[RFC] better link error messages
...y(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:673 > (/home/buildslave/buildslave/clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/SyntheticSections.cpp:673) > *>>>* SyntheticSections.cpp.o in archive lib/liblldELF.a > > -- Jon Roelofs jonathan at codesourcery.com CodeSourcery / Mentor Embedded
2017 Mar 29
2
[RFC] better link error messages
...ld::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:673 >>>> (/home/buildslave/buildslave/clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/SyntheticSections.cpp:673) >>>> SyntheticSections.cpp.o in archive lib/liblldELF.a > > > On Wed, Mar 29, 2017 at 12:12 PM, Jonathan Roelofs > <jonathan at cod...
2020 Aug 11
2
Seeking help on LLD and extending ELF
Hi all, I am experimenting with extending ELF. I want to add a custom ELF section, something similar to a 'SyntheticSection'. However, I'm not able to find documentation / doxygen for LLD code. Are there any existing examples of adding custom ELF sections at link time in LLVM framework? Is it possible? Any pointers? Thanks in advance!Cheers! -------------- next part -------------- An HTML attachment was scr...
2017 Mar 29
3
[RFC] better link error messages
...on::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/ > clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/ > *>>>* SyntheticSections.cpp.o in archive lib/liblldELF.a > > > Please don't do this (split the base name from the path). Tools that match > file names, grep, etc....
2017 Mar 25
4
[RFC] better link error messages
...l: 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/ clang-cmake-aarch64-39vma/llvm/tools/lld/ELF/ *>>>* SyntheticSections.cpp.o in archive lib/liblldELF.a Oftentimes filenames are unique enough that it tells you where to go immediately. Maybe it's a bad idea for the source location...
2017 Mar 24
4
[RFC] better link error messages
...&, 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/SyntheticSections.cpp:673 *>>>* lib/liblldELF.a(SyntheticSections.cpp.o) This format prints out source file names and object file names in different lines. I found that that is easier to read than print them in the same line, as error messages with some amount of whitespace are easier to fi...
2017 Mar 23
6
[RFC] better link error messages
...n(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 object file name(s) and archive file name(s) if available. Currently, these messages lack object file names, an...
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
...> >> > -- > Carlo Kok > RemObjects Software > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170222/6462969a/attachment.html> -------------- next part -------------- diff --git a/ELF/SyntheticSections.cpp b/ELF/SyntheticSections.cpp index 19326bc..05fb9e3 100644 --- a/ELF/SyntheticSections.cpp +++ b/ELF/SyntheticSections.cpp @@ -1031,6 +1031,7 @@ template <class ELFT> void RelocationSection<ELFT>::writeTo(uint8_t *Buf) { // in account 'local' and 'global' G...
2017 Jan 04
5
RFC: LLD range extension thunks
...imes. 2.) The alterations to the core data structures to permit more than one Thunk per symbol and the logic to select the "right" Thunk for each relocation. The design I'd like to aim at moves thunk creation into finalizeSections() at a point where the sizes and addresses of all the SyntheticSections are known. This would mean that the final address of each caller and callee could be used, and after thunk creation there would be no further content changes. This would mean: - All code that runs prior to thunk creation may have the offset in the OutputSection altered by the addition of thunks...
2018 Jan 25
0
Adding a new target to 'llvm-lld'
...content such as Thunks. Further things to consider are whether the default ELF layout suits your target. The parts that needed most modifications for Arm were: - Relocations.cpp; TLS, GNU_IFUNC often need customisation. - Writer.cpp ; The overall controller of the layout and address allocation. - SyntheticSections.cpp ; Where linker generated sections are created. - Thunks.cpp ; Creation of linker generated trampolines between functions. - InputSection.cpp ; Support relocation calculations specific to Arm. I needed to add support for a couple of Arm specific section types to InputFiles.cpp, but otherwise...
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 that we redundantly call SymbolBody::getVA: 1. most
2017 Jan 05
2
RFC: LLD range extension thunks
...to permit more than >> one Thunk per symbol and the logic to select the "right" Thunk for >> each relocation. >> >> The design I'd like to aim at moves thunk creation into >> finalizeSections() at a point where the sizes and addresses of all the >> SyntheticSections are known. This would mean that the final address of >> each caller and callee could be used, and after thunk creation there >> would be no further content changes. This would mean: >> - All code that runs prior to thunk creation may have the offset in >> the OutputSecti...
2018 Jan 25
4
Adding a new target to 'llvm-lld'
Hi LLVM-Devs, I am considering switching to using 'llvm-lld' instead of Gnu 'ld' in a future revision of our out-of-tree target, and I am wondering is there a getting started guide for how to go about extending 'llvm-lld' to support an additional target. Thanks, MartinO -------------------------------------------------------------- Intel Research and Development
2018 Aug 21
7
[lld] avoid emitting PLT entries for ifuncs
...ype, RelocatedAddr, Expr); diff --git a/ELF/Writer.cpp b/ELF/Writer.cpp index 90462ecc7..418133ebd 100644 --- a/ELF/Writer.cpp +++ b/ELF/Writer.cpp @@ -1570,8 +1570,11 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() { applySynthetic({InX::EhFrame}, [](SyntheticSection *SS) { SS->finalizeContents(); }); - for (Symbol *S : Symtab->getSymbols()) + for (Symbol *S : Symtab->getSymbols()) { S->IsPreemptible |= computeIsPreemptible(*S); + if (S->isGnuIFunc() && Config->ZIfuncnoplt) + S->ExportDynamic = true; + } //...
2017 Jul 31
3
[RFC] Profile guided section layout
Hi Rafael, On 07/31/2017 04:20 PM, Rafael Avila de Espindola via llvm-dev wrote: > However, do we need to start with instrumentation? The original paper > uses sampling with good results and current intel cpus can record every > branch in a program. > > I would propose starting with just an lld patch that reads the call > graph from a file. The format would be very similar to
2020 Oct 12
2
Fragmented DWARF
Hi all, At the recent LLVM developers' meeting, I presented a lightning talk on an approach to reduce the amount of dead debug data left in an executable following operations such as --gc-sections and duplicate COMDAT removal. In that presentation, I presented some figures based on linking a game that had been built by our downstream clang port and fragmented using the described approach.
2020 Nov 04
3
Fragmented DWARF
...'s format is not too complex, so >>> similarly the parser isn't too complex. You can see LLD's ELF >>> implementation in ELF/EhFrame.cpp, how it is used in ELF/InputSection.cpp >>> (see the bits to do with EhInputSection) and EhFrameSection in >>> ELF/SyntheticSections.h (plus various usages of these two throughout the >>> LLD code). I think the key to any structural changes in the DWARF format to >>> make them more amenable to link-time parsing is being able to read a >>> minimal amount without needing to parse the payload (e.g. a...
2017 Jul 31
2
[RFC] Profile guided section layout
...t;>; + def no_color_diagnostics: F<"no-color-diagnostics">, HelpText<"Do not use colors in diagnostics">; diff --git a/ELF/Writer.cpp b/ELF/Writer.cpp index a9e3856..3a6e174 100644 --- a/ELF/Writer.cpp +++ b/ELF/Writer.cpp @@ -20,11 +20,13 @@ #include "SyntheticSections.h" #include "Target.h" #include "Threads.h" +#include "llvm/ADT/Hashing.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/FileOutputBuffer.h" #include "llvm/Support/raw_ostream...
2017 Jun 15
7
[RFC] Profile guided section layout
...t;>; + def no_color_diagnostics: F<"no-color-diagnostics">, HelpText<"Do not use colors in diagnostics">; diff --git a/ELF/Writer.cpp b/ELF/Writer.cpp index d41baec..d9bd757 100644 --- a/ELF/Writer.cpp +++ b/ELF/Writer.cpp @@ -20,11 +20,13 @@ #include "SyntheticSections.h" #include "Target.h" #include "Threads.h" +#include "llvm/ADT/Hashing.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/FileOutputBuffer.h" #include "llvm/Support/raw_ostream...