[commit: ghc] master: Properly handle dlerror() message on FreeBSD when linking linker scripts (0a891c8)

git at git.haskell.org git at git.haskell.org
Tue Aug 15 01:35:39 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/0a891c8c448a0e70abb075702857d743674ad1ad/ghc

>---------------------------------------------------------------

commit 0a891c8c448a0e70abb075702857d743674ad1ad
Author: Gleb Popov <6yearold at gmail.com>
Date:   Mon Aug 14 20:54:36 2017 -0400

    Properly handle dlerror() message on FreeBSD when linking linker scripts
    
    Test Plan: `GHCi.loadDll "/usr/lib/libc++.so` now works on FreeBSD.
    
    Reviewers: austin, bgamari, erikd, simonmar
    
    Reviewed By: simonmar
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D3841


>---------------------------------------------------------------

0a891c8c448a0e70abb075702857d743674ad1ad
 rts/Linker.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rts/Linker.c b/rts/Linker.c
index 3700726..18f2c6b 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -482,7 +482,7 @@ initLinker_ (int retain_cafs)
 #   endif /* RTLD_DEFAULT */
 
     compileResult = regcomp(&re_invalid,
-           "(([^ \t()])+\\.so([^ \t:()])*):([ \t])*(invalid ELF header|file too short)",
+           "(([^ \t()])+\\.so([^ \t:()])*):([ \t])*(invalid ELF header|file too short|invalid file format)",
            REG_EXTENDED);
     if (compileResult != 0) {
         barf("Compiling re_invalid failed");



More information about the ghc-commits mailing list