
hgolden, I actually am having difficulty running your script and reproducing the same output. There are two problems. First, the path that is in your example doesn't exist on my system. There are a few possible candidates: `/usr/lib/x86_64-linux-gnu/libc.so` is a linker script that has contents
{{{ /* GNU ld script Use the shared library, but some functions are only in the static library, so try that secondarily. */ OUTPUT_FORMAT(elf64-x86-64) GROUP ( /lib/x86_64-linux-gnu/libc.so.6 /usr/lib/x86_64-linux- gnu/libc_nonshared.a AS_NEEDED ( /lib/x86_64-linux-gnu/ld-
#10046: Linker script patch in rts/Linker.c doesn't work for (non-C or non-en..) locales -------------------------------------+------------------------------------- Reporter: hgolden | Owner: simonmar Type: bug | Status: new Priority: normal | Milestone: 8.0.1 Component: Runtime System | Version: 7.8.4 (Linker) | Resolution: | Keywords: linker script Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect result | Unknown/Multiple at runtime | Test Case: Blocked By: | Blocking: Related Tickets: 2615, 9237 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by hgolden): Replying to [comment:4 ezyang]: linux-x86-64.so.2 ) )
}}} My apology for not replying promptly! The library above should have the same results on your system. Please replace the library name in the `loadDLL` function with the name of any linker script on your test system. Then, when I run the script compiled by GHC 7.6.3, I get `Nothing`. So I can't seem to coax out the Chinese output. If you are getting `Nothing` that suggests a problem with the regular expression. It should find the `/lib/x86_64-linux-gnu/libc.so.6` in the GROUP command and try to `dlopen` it. I will investigate.
BTW, in GHC 7.10 you need to initialize the object linker, otherwise it will segfault. In the past the RTS initialized the object linker when it started up. Maybe this is related to a change in that logic?
-- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10046#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler