search for: linkerdriver

Displaying 20 results from an estimated 39 matches for "linkerdriver".

2017 Aug 31
2
LLD: patch to fix libCOFF calling exit() on success in a library function
...coff::link. >From downstream fork of LLD: https://github.com/zig-lang/zig/commit/41da9fdb69065082f57c604b12eb02ca166cb18d diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp index 854c3e69098..8b17f039870 100644 --- a/lld/COFF/Driver.cpp +++ b/lld/COFF/Driver.cpp @@ -1030,7 +1030,7 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) { if (!Args.hasArgNoClaim(OPT_INPUT)) { fixupExports(); createImportLibrary(/*AsLib=*/true); - exit(0); + return; } // Handle /delayload @@ -1122,7 +1122,7 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) { //...
2017 Oct 16
2
LLD COFF not closing mmaps to input files?
...: > >> I've got a patched LLD 5.0.0 like this: >> >> diff --git a/deps/lld/COFF/Driver.cpp b/deps/lld/COFF/Driver.cpp >> index 854c3e69..8bab1c11 100644 >> --- a/deps/lld/COFF/Driver.cpp >> +++ b/deps/lld/COFF/Driver.cpp >> @@ -1030,7 +1030,7 @@ void LinkerDriver::link(ArrayRef<const char *> >> ArgsArr) { >> if (!Args.hasArgNoClaim(OPT_INPUT)) { >> fixupExports(); >> createImportLibrary(/*AsLib=*/true); >> - exit(0); >> + return; >> } >> >> // Handle /delayload >> @@...
2017 Aug 31
2
LLD: patch to fix libCOFF calling exit() on success in a library function
...>> ng/zig/commit/41da9fdb69065082f57c604b12eb02ca166cb18d >> >> >> diff --git a/lld/COFF/Driver.cpp b/lld/COFF/Driver.cpp >> index 854c3e69098..8b17f039870 100644 >> --- a/lld/COFF/Driver.cpp >> +++ b/lld/COFF/Driver.cpp >> @@ -1030,7 +1030,7 @@ void LinkerDriver::link(ArrayRef<const char *> >> ArgsArr) { >> if (!Args.hasArgNoClaim(OPT_INPUT)) { >> fixupExports(); >> createImportLibrary(/*AsLib=*/true); >> - exit(0); >> + return; >> } >> >> // Handle /delayload >> @@...
2017 Oct 16
2
LLD COFF not closing mmaps to input files?
I've got a patched LLD 5.0.0 like this: diff --git a/deps/lld/COFF/Driver.cpp b/deps/lld/COFF/Driver.cpp index 854c3e69..8bab1c11 100644 --- a/deps/lld/COFF/Driver.cpp +++ b/deps/lld/COFF/Driver.cpp @@ -1030,7 +1030,7 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) { if (!Args.hasArgNoClaim(OPT_INPUT)) { fixupExports(); createImportLibrary(/*AsLib=*/true); - exit(0); + return; } // Handle /delayload @@ -1172,9 +1172,6 @@ void LinkerDriver::link(ArrayRef<const char *> ArgsArr) { //...
2016 Nov 08
2
leaks in lld on the bot
...Files.cpp:823:7 #2 0xb9de74 in lld::elf::SymbolTable<llvm::object::ELFType<(llvm::support::endianness)1, true> >::addFile(lld::elf::InputFile*) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/tools/lld/ELF/SymbolTable.cpp:61:8 #3 0x82c46f in void lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::support::endianness)1, true> >(llvm::opt::InputArgList&) /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/tools/lld/ELF/Driver.cpp:723:12 #4 0x819578 in lld::elf::LinkerDriver::main(llvm::ArrayRef<char const*>, bool)...
2016 Nov 08
3
leaks in lld on the bot
...ld::elf::SymbolTable<llvm::object::ELFType<(llvm::support::endianness)1, >> true> >::addFile(lld::elf::InputFile*) >> /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/tools/lld/ELF/SymbolTable.cpp:61:8 >> #3 0x82c46f in void >> lld::elf::LinkerDriver::link<llvm::object::ELFType<(llvm::support::endianness)1, >> true> >(llvm::opt::InputArgList&) >> /mnt/b/sanitizer-buildbot2/sanitizer-x86_64-linux-bootstrap/build/llvm/tools/lld/ELF/Driver.cpp:723:12 >> #4 0x819578 in lld::elf::LinkerDriver::main(llvm::ArrayRe...
2018 Jul 25
2
LLD COFF library: crashes when lld::coff::link is called twice
...C++ zig.exe!lld::coff::SymbolTable::getChunks() Line 311 C++ zig.exe!`anonymous namespace'::Writer::createSections() Line 340 C++ zig.exe!`anonymous namespace'::Writer::run() Line 288 C++ zig.exe!lld::coff::writeResult() Line 166 C++ zig.exe!lld::coff::LinkerDriver::link(llvm::ArrayRef<char const *> ArgsArr) Line 1331 C++ zig.exe!lld::coff::link(llvm::ArrayRef<char const *> Args, bool CanExitEarly, llvm::raw_ostream & Diag) Line 71 C++ zig.exe!ZigLLDLink(ZigLLVM_ObjectFormatType oformat, const char * * args, unsigned __int64 ar...
2018 Aug 08
2
LLD COFF library: crashes when lld::coff::link is called twice
...:getChunks() Line 311 C++ >> zig.exe!`anonymous namespace'::Writer::createSections() Line 340 >> C++ >> zig.exe!`anonymous namespace'::Writer::run() Line 288 C++ >> zig.exe!lld::coff::writeResult() Line 166 C++ >> zig.exe!lld::coff::LinkerDriver::link(llvm::ArrayRef<char const *> >> ArgsArr) Line 1331 C++ >> zig.exe!lld::coff::link(llvm::ArrayRef<char const *> Args, bool >> CanExitEarly, llvm::raw_ostream & Diag) Line 71 C++ >> zig.exe!ZigLLDLink(ZigLLVM_ObjectFormatType oformat, cons...
2019 Jun 24
4
Expected behavior of lld during LTO for global symbols (Attr Internal/Common)
...any symbols. But I don't fully understand what is going on. I'll try to investigate tomorrow. diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 008a6cd7954..d9deddbf357 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -1789,6 +1789,11 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &Args) { if (!Config->Relocatable) Symtab->scanVersionScript(); + // Replace common symbols with regular symbols, so that common + // symbols in input object files appear as regular symbols in .bss + // in the output. + replaceCommonSymbols(); + //...
2020 Apr 09
3
Building libjpeg-turbo with LTO
...lso contains some native objects and thus had a non-zero symbol table. I created a version of libjpeg.a using the system library and containing only the bitcode objects, and confirmed it links fine with lld (the native objects weren't needed in this case). BTW this is the code in ELF/Driver.cpp LinkerDriver::addFile. Would it be possible to extend the hack in lld to handle cases like this with some bitcode objects and some non-bitcode objects, so that the bitcode objects are not simply ignored? Thanks, Teresa On Wed, Apr 8, 2020 at 10:25 AM Shishir V Jessu via llvm-dev < llvm-dev at lists.llvm.o...
2017 Feb 14
2
RFC: A new llvm-dlltool driver and llvm-lib driver improvements
> > No, I meant an even thinner wrapper which textually translates arguments. > For example, the wrapper would translates "/out:foo.exe foo.obj" to "-o > foo.exe foo.obj" and then call lld::COFFF:link(). It doesn't do anything > with Config object nor LinkerDriver::run and have absolutely zero knowledge > on the internals of LLD. Ohh okay I misunderstood. (Why I'm asking this is because I want to sure that there's no difference > between the regular Windows linker and mingw. If all differences are > superficial, the command line translator...
2017 Feb 14
2
RFC: A new llvm-dlltool driver and llvm-lib driver improvements
...meant an even thinner wrapper which textually translates arguments. >>> For example, the wrapper would translates "/out:foo.exe foo.obj" to "-o >>> foo.exe foo.obj" and then call lld::COFFF:link(). It doesn't do anything >>> with Config object nor LinkerDriver::run and have absolutely zero knowledge >>> on the internals of LLD. >> >> Ohh okay I misunderstood. >> >> (Why I'm asking this is because I want to sure that there's no difference >>> between the regular Windows linker and mingw. If all differences...
2017 Feb 14
2
RFC: A new llvm-dlltool driver and llvm-lib driver improvements
...; wrote: > > No, I meant an even thinner wrapper which textually translates arguments. > For example, the wrapper would translates "/out:foo.exe foo.obj" to "-o > foo.exe foo.obj" and then call lld::COFFF:link(). It doesn't do anything > with Config object nor LinkerDriver::run and have absolutely zero knowledge > on the internals of LLD. > > Ohh okay I misunderstood. > > (Why I'm asking this is because I want to sure that there's no difference > between the regular Windows linker and mingw. If all differences are > superficial, the comma...
2017 Feb 14
2
RFC: A new llvm-dlltool driver and llvm-lib driver improvements
...; wrote: > > No, I meant an even thinner wrapper which textually translates arguments. > For example, the wrapper would translates "/out:foo.exe foo.obj" to "-o > foo.exe foo.obj" and then call lld::COFFF:link(). It doesn't do anything > with Config object nor LinkerDriver::run and have absolutely zero knowledge > on the internals of LLD. > > Ohh okay I misunderstood. > > (Why I'm asking this is because I want to sure that there's no difference > between the regular Windows linker and mingw. If all differences are > superficial, the comma...
2017 Feb 14
3
RFC: A new llvm-dlltool driver and llvm-lib driver improvements
...; wrote: > > No, I meant an even thinner wrapper which textually translates arguments. > For example, the wrapper would translates "/out:foo.exe foo.obj" to "-o > foo.exe foo.obj" and then call lld::COFFF:link(). It doesn't do anything > with Config object nor LinkerDriver::run and have absolutely zero knowledge > on the internals of LLD. > > Ohh okay I misunderstood. > > (Why I'm asking this is because I want to sure that there's no difference > between the regular Windows linker and mingw. If all differences are > superficial, the comma...
2017 Feb 13
2
RFC: A new llvm-dlltool driver and llvm-lib driver improvements
...t; translates all arguments into the MSVC style and then invoke the COFF > linker's main function. That should work, if I am understanding this correctly I can create an argument parser (probably partially based on the ELF one) then I can set the data in the COFF Config object and call COFF LinkerDriver::run etc directly from that? This proposal is for generally moving code from lld into llvm that could be part of lib.exe / dlltool, what are your thoughts here? On Mon, Feb 13, 2017 at 8:57 PM, Rui Ueyama <ruiu at google.com> wrote: > On Mon, Feb 13, 2017 at 12:52 PM, Martell Malone &lt...
2019 Feb 27
2
lld-link crash when linking intrinsics lib
.../llvm/releaseinstall/bin/lld-link+0x270e52) #3 0x00007f896c8ea890 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12890) #4 0x0000559a34c11325 lld::coff::markLive(llvm::ArrayRef<lld::coff::Chunk*>) (/home/jshi19/llvm/releaseinstall/bin/lld-link+0x2de325) #5 0x0000559a34bf0220 lld::coff::LinkerDriver::link(llvm::ArrayRef<char const*>) (/home/jshi19/llvm/releaseinstall/bin/lld-link+0x2bd220) #6 0x0000559a34bf0478 lld::coff::link(llvm::ArrayRef<char const*>, bool, llvm::raw_ostream&) (/home/jshi19/llvm/releaseinstall/bin/lld-link+0x2bd478) #7 0x0000559a34b2a300 main (/home/jshi19/...
2019 Feb 28
4
lld-link crash when linking intrinsics lib
...90 __restore_rt >> (/lib/x86_64-linux-gnu/libpthread.so.0+0x12890) >> >> #4 0x0000559a34c11325 >> lld::coff::markLive(llvm::ArrayRef<lld::coff::Chunk*>) >> (/home/jshi19/llvm/releaseinstall/bin/lld-link+0x2de325) >> >> #5 0x0000559a34bf0220 lld::coff::LinkerDriver::link(llvm::ArrayRef<char >> const*>) (/home/jshi19/llvm/releaseinstall/bin/lld-link+0x2bd220) >> >> #6 0x0000559a34bf0478 lld::coff::link(llvm::ArrayRef<char const*>, bool, >> llvm::raw_ostream&) (/home/jshi19/llvm/releaseinstall/bin/lld-link+0x2bd478) >&...
2018 Jun 07
2
[lld] ObjFile::createRegular is oblivious of PendingComdat
...lld/COFF/Writer.cpp:0:43 #9 0x00000000006499f9 (anonymous namespace)::Writer::run() /ssd2/pirama/llvm-upstrea$ /llvm/tools/lld/COFF/Writer.cpp:342:3 #10 0x0000000000649843 lld::coff::writeResult() /ssd2/pirama/llvm-upstream/llvm/tool$ /lld/COFF/Writer.cpp:232:31 #11 0x00000000005d1268 lld::coff::LinkerDriver::link(llvm::ArrayRef<char const*>) /s$ d2/pirama/llvm-upstream/llvm/tools/lld/COFF/Driver.cpp:1536:3 #12 0x00000000005c8687 lld::coff::link(llvm::ArrayRef<char const*>, bool, llvm::raw_$ stream&) /ssd2/pirama/llvm-upstream/llvm/tools/lld/COFF/Driver.cpp:75:7 #13 0x0000000000946db0 l...
2019 Jul 16
2
lld-link crash when build openssl with LTO
...:coff::Chunk*>) > /home/jshi19/llvm/llvm-project/lld/COFF/MarkLive.cpp:55:0 > > #7 0x000056348d5f363e std::vector<lld::coff::Chunk*, > std::allocator<lld::coff::Chunk*> >::~vector() > /usr/include/c++/7/bits/stl_vector.h:434:0 > > #8 0x000056348d5f363e lld::coff::LinkerDriver::link(llvm::ArrayRef<char > const*>) /home/jshi19/llvm/llvm-project/lld/COFF/Driver.cpp:1840:0 > > #9 0x000056348d5f3d08 lld::coff::link(llvm::ArrayRef<char const*>, bool, > llvm::raw_ostream&) /home/jshi19/llvm/llvm-project/lld/COFF/Driver.cpp:78:0 > > #10 0x00005...