similar to: LLD: patch to fix libCOFF calling exit() on success in a library function

Displaying 20 results from an estimated 300 matches similar to: "LLD: patch to fix libCOFF calling exit() on success in a library function"

2017 Aug 31
2
LLD: patch to fix libCOFF calling exit() on success in a library function
Correct, I am using libCOFF, libELF, and libMACHO all as a library. Ideally all cases would return and report an error and clean up memory, etc, instead of calling exit. However this is sufficient for my needs for now. It is ok for LLD to crash if I supply an invalid command line argument, I won't do that. On Thu, Aug 31, 2017 at 5:47 PM, Rui Ueyama <ruiu at google.com> wrote: >
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); -
2017 Oct 16
2
LLD COFF not closing mmaps to input files?
I think you want to call freeArena() before returning from lld::coff::link. On Sun, Oct 15, 2017 at 6:57 PM, Andrew Kelley via llvm-dev < llvm-dev at lists.llvm.org> wrote: > I believe this line is the culprit: > > COFF/Driver.cpp:102: > make<std::unique_ptr<MemoryBuffer>>(std::move(MB)); // take ownership > > Patch forthcoming. > > > On Sun, Oct
2018 Jul 25
2
LLD COFF library: crashes when lld::coff::link is called twice
If you call lld::coff::link twice, the second time gives this backtrace: msvcp140d.dll!00007ffc35830806() Unknown > zig.exe!std::_Debug_pointer<lld::coff::Chunk * __ptr64 const>(lld::coff::Chunk * const * _Ptr, const wchar_t * _File, unsigned int _Line) Line 926 C++ zig.exe!std::_Debug_range2<lld::coff::Chunk * __ptr64 const * __ptr64>(lld::coff::Chunk * const *
2018 Aug 08
2
LLD COFF library: crashes when lld::coff::link is called twice
+Rui and Peter On Wed, Jul 25, 2018 at 8:34 AM, Andrew Kelley via llvm-dev <llvm-dev at lists.llvm.org> wrote: > Here's a fix: > > --- a/lld/COFF/Driver.cpp > +++ b/lld/COFF/Driver.cpp > @@ -72,6 +72,9 @@ bool link(ArrayRef<const char *> Args, bool CanExitEarly, > raw_ostream &Diag) { > exitLld(errorCount() ? 1 : 0); > > freeArena(); > +
2018 Mar 20
2
lld/lto/win32 crash on DIE code
Op 20-3-2018 om 12:40 schreef Evgeny Leviant: > This one triggers an assertion in calculateSEHStateNumbers due to weird catchpad instruction > in @_island_debug_invoke and many other functions. The code expects either pointer to a filter > function or null in first operand, while you're passing pointer to structure: > > catchpad within %80 [{i8*, i8*}* anon..., ...] > >
2018 Mar 20
0
lld/lto/win32 crash on DIE code
This one triggers an assertion in calculateSEHStateNumbers due to weird catchpad instruction in @_island_debug_invoke and many other functions. The code expects either pointer to a filter function or null in first operand, while you're passing pointer to structure: catchpad within %80 [{i8*, i8*}* anon..., ...] ________________________________________ От: Carlo Kok <ck at
2018 Mar 20
2
lld/lto/win32 crash on DIE code
Op 16-3-2018 om 20:16 schreef Evgeny Leviant: > Hello Carlo, > > I tried your reproducer and faced different problem from one you described > (I'm using MacOS Sierra and lld built from trunk on Mar, 15). The crash happens > when SelectionDAGBuilder::lowerInvokable tries to access EH info of this function: > >
2018 Jun 07
2
[lld] ObjFile::createRegular is oblivious of PendingComdat
I encountered a segfault when using lld to cross-compile for Windows (+MinGW) from Linux. The problem happens with objects built by gcc. The problem is that ObjFile::CreateRegular considers a PendingComdat to be valid (and later causes an illegal pointer dereference). The following patch fixes the crash: diff --git a/COFF/InputFiles.cpp b/COFF/InputFiles.cpp index 9e2345b0a..f47d612df 100644
2018 Jun 07
2
[lld] ObjFile::createRegular is oblivious of PendingComdat
Can you upload a reproducer? You can create it using the /linkrepro flag. Peter On Thu, Jun 7, 2018 at 2:50 PM, Reid Kleckner via llvm-dev < llvm-dev at lists.llvm.org> wrote: > GCC does comdats completely differently from the spec. Since you contacted > me about this off of the mailing list, I started investigating what they > do, and it is completely different. It's
2017 Feb 14
3
RFC: A new llvm-dlltool driver and llvm-lib driver improvements
Well that means it would just be the only plan then. I assume the first step would be to move the code from lld into this new library and lld can use that? I can then re add the extra functionality for weak externals? We can then have lib and dlltool use this then. On Tue 14 Feb 2017 at 01:58, Rui Ueyama <ruiu at google.com> wrote: > On Mon, Feb 13, 2017 at 5:56 PM, Martell Malone
2016 Nov 08
3
leaks in lld on the bot
On Mon, Nov 7, 2016 at 5:53 PM, Davide Italiano <davide at freebsd.org> wrote: > On Mon, Nov 7, 2016 at 4:43 PM, Kostya Serebryany via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> The asan bootstrap bot is unhappy with lld. >> Rui, os someone, please take a look. >> >>
2016 Nov 08
2
leaks in lld on the bot
The asan bootstrap bot is unhappy with lld. Rui, os someone, please take a look. http://lab.llvm.org:8011/builders/sanitizer-x86_64- linux-bootstrap/builds/138/steps/check-lld%20asan/logs/stdio ==26011==ERROR: LeakSanitizer: detected memory leaks Direct leak of 184 byte(s) in 1 object(s) allocated from: #0 0x72fab0 in operator new(unsigned long)
2019 Dec 05
2
GC for defsym'd symbols in LLD
I have made some further investigation. My conclusion is that GNU ld does not do better than lld. Making the --defsym behavior ideal is difficult in the current framework. GNU ld has some unintended behaviors. ld.bfd a.o --defsym 'd=foo' --gc-sections -o a => GNU ld retains .text_foo ld.bfd a.o --defsym 'd=foo+3' --gc-sections -o a => GNU ld drops .text_foo ld.bfd a.o
2018 Mar 21
0
lld/lto/win32 crash on DIE code
It looks the problem lies in how your compiler generates debug info. LLVM doesn't expect DIDerivedType scope to be an instance of DICompileUnit. Here is a quick fix: DIE *DwarfUnit::getOrCreateContextDIE(const DIScope *Context) { - if (!Context || isa<DIFile>(Context)) + if (!Context || isa<DIFile>(Context) || isa<DICompileUnit>(Context)) However, I suggest talking to
2019 Jun 24
4
Expected behavior of lld during LTO for global symbols (Attr Internal/Common)
The direct cause of this issue is that, previously lld converted common symbols to defined symbols before passing input files to LTO, and after r360841 they are passed as common symbols to LTO. Making lld to work as before is easy, as we can convert common symbols to defined symbols as before. Here is a patch to do that, and I confirmed that that restores the original behavior for the reported
2020 Apr 09
3
Building libjpeg-turbo with LTO
Adding a couple of lld folks. I helped Shishir debug this, the link line looked like: /home/sjessu/build/bin/clang -O0 -flto -o jcstest jcstest.o ./.libs/libjpeg.a and the issue was that libjpeg.a was created with the system ar instead of llvm-ar. It worked when recreating libjpeg.a with llvm-ar. I noticed that the lld code has some special handling for the case when there is a missing
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.
2017 Feb 14
2
RFC: A new llvm-dlltool driver and llvm-lib driver improvements
On Mon, Feb 13, 2017 at 5:20 PM, Rui Ueyama via llvm-dev < llvm-dev at lists.llvm.org> wrote: > On Mon, Feb 13, 2017 at 4:46 PM, Martell Malone <martellmalone at gmail.com> > 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
2017 Feb 14
2
RFC: A new llvm-dlltool driver and llvm-lib driver improvements
Ohh nice. With that method I can support it without upsetting ld users by introducing an api breakage. On Tue 14 Feb 2017 at 01:32, Rui Ueyama <ruiu at google.com> wrote: > On Mon, Feb 13, 2017 at 5:26 PM, Peter Collingbourne <peter at pcc.me.uk> > wrote: > > On Mon, Feb 13, 2017 at 5:20 PM, Rui Ueyama via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >