Fix GHC ticket 2615 (linker scripts in .so files)
Howard B. Golden
hgolden at socal.rr.com
Thu Dec 3 00:06:51 EST 2009
Hi Simon M.,
On Wednesday December 2, 2009, I wrote:
> I'm not sure how to write a test case that can be added to the
> validation tests. By _hand_ I have been testing by running:
> $ ghc-stage2 --interactive -lpcre
> On my system (Gentoo), /usr/lib64/libpcre.so is a linker script.
> However, I don't think this will always be true on other systems. I'd
> appreciate some suggestions about how to write the test.
I thought of this approach: In the test I will create a linker script
and point it to some convenient library (e.g., libc.so). Then I'll load
For example, if libc is /lib64/libc.so.6, I will create a linker script
in <test_directory>/testc.so which contains GROUP ( /lib64/libc.so.6 ).
Then I'll execute:
./ghc-stage2 --interactive <test_directory>/testc.so
Note: <test_directory> must be an absolute path; relative paths don't
This should succeed with the following messages:
GHCi, version 18.104.22.16891126: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
Loading object (dynamic) <test_directory>/testc.so ... done
final link ... done
Please let me know if this is an acceptable test case or give your
More information about the Cvs-ghc