summaryrefslogtreecommitdiff
path: root/rts/Linker.c
Commit message (Collapse)AuthorAgeFilesLines
* 2nd try: remove lochash, it isn't needed (now)Simon Marlow2008-08-041-35/+0
|
* FIX BUILD on WindowsSimon Marlow2008-08-041-4/+0
|
* UNDO: FIX #2375: remove oc->lochash completely, it apparently isn't usedSimon Marlow2008-08-041-0/+35
|
* workaround #2277: turn off the RTS timer when calling into editlineSimon Marlow2008-07-301-0/+2
|
* FIX #2375: remove oc->lochash completely, it apparently isn't usedSimon Marlow2008-07-301-35/+0
|
* use RTLD_LAZY instead of RTLD_NOWSimon Marlow2008-07-241-1/+3
| | | | | | | RTLD_NOW apparently causes some problems, according to previous mailing-list discussion http://www.haskell.org/pipermail/cvs-ghc/2007-September/038570.html
* debug output tweakSimon Marlow2008-07-241-1/+1
|
* add NetBSD to some of the #ifdefs (patch partly from 6.8 branch)Simon Marlow2008-07-141-2/+2
|
* add threadStatus# primop, for querying the status of a ThreadId#Simon Marlow2008-07-101-0/+1
|
* add new primop: asyncExceptionsBlocked# :: IO BoolSimon Marlow2008-07-091-0/+1
|
* FIX part of #2301, and #1619Simon Marlow2008-07-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 2301: Control-C now causes the new exception (AsyncException UserInterrupt) to be raised in the main thread. The signal handler is set up by GHC.TopHandler.runMainIO, and can be overriden in the usual way by installing a new signal handler. The advantage is that now all programs will get a chance to clean up on ^C. When UserInterrupt is caught by the topmost handler, we now exit the program via kill(getpid(),SIGINT), which tells the parent process that we exited as a result of ^C, so the parent can take appropriate action (it might want to exit too, for example). One subtlety is that we have to use a weak reference to the ThreadId for the main thread, so that the signal handler doesn't prevent the main thread from being subject to deadlock detection. 1619: we now ignore SIGPIPE by default. Although POSIX says that a SIGPIPE should terminate the process by default, I wonder if this decision was made because many C applications failed to check the exit code from write(). In Haskell a failed write due to a closed pipe will generate an exception anyway, so the main difference is that we now get a useful error message instead of silent program termination. See #1619 for more discussion.
* Fix conversions between Double/Float and simple-integerIan Lynagh2008-06-141-0/+2
|
* when linking, ignore unknown .reloc section that appeared in gcc 3.4.5(?)dias@eecs.harvard.edu2008-05-281-0/+2
|
* Add some more generic (en|de)code(Double|Float) codeIan Lynagh2008-04-171-0/+3
|
* FIX BUILD (bootstrap with -fvia-C): prototype fixesSimon Marlow2008-04-091-4/+4
|
* Import libffi-3.0.4, and use it to provide FFI support in GHCiSimon Marlow2008-04-081-0/+18
| | | | | | | | | | | | | | | | | | | | This replaces the hand-rolled architecture-specific FFI support in GHCi with the standard libffi as used in GCJ, Python and other projects. I've bundled the complete libffi-3.0.4 tarball in the source tree in the same way as we do for GMP, the difference being that we always build and install our own libffi regardless of whether there's one on the system (it's small, and we don't want dependency/versioning headaches). In particular this means that unregisterised builds will now have a fully working GHCi including FFI out of the box, provided libffi supports the platform. There is also code in the RTS to use libffi in place of rts/Adjustor.c, but it is currently not enabled if we already have support in Adjustor.c for the current platform. We need to assess the performance impact before using libffi here too (in GHCi we don't care too much about performance).
* Do not #include external header files when compiling via CSimon Marlow2008-04-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | This has several advantages: - -fvia-C is consistent with -fasm with respect to FFI declarations: both bind to the ABI, not the API. - foreign calls can now be inlined freely across module boundaries, since a header file is not required when compiling the call. - bootstrapping via C will be more reliable, because this difference in behavour between the two backends has been removed. There is one disadvantage: - we get no checking by the C compiler that the FFI declaration is correct. So now, the c-includes field in a .cabal file is always ignored by GHC, as are header files specified in an FFI declaration. This was previously the case only for -fasm compilations, now it is also the case for -fvia-C too.
* Link libgmp.a statically into libHSrts.dll on WindowsClemens Fruhwirth2008-01-011-6/+18
|
* Move file locking into the RTS, fixing #629, #1109Simon Marlow2007-11-201-0/+2
| | | | | | | | | | | | | | | File locking (of the Haskell 98 variety) was previously done using a static table with linear search, which had two problems: the array had a fixed size and was sometimes too small (#1109), and performance of lockFile/unlockFile was suboptimal due to the linear search. Also the algorithm failed to count readers as required by Haskell 98 (#629). Now it's done using a hash table (provided by the RTS). Furthermore I avoided the extra fstat() for every open file by passing the dev_t and ino_t into lockFile. This and the improvements to the locking algorithm result in a healthy 20% or so performance increase for opening/closing files (see openFile008 test).
* add PIC relocations for x86_64, and use a simpler hack in place of ↵Simon Marlow2007-10-181-89/+79
| | | | | | | | | | | | x86_64_high_symbol() This is Wolfgang Thaller's patch sent to cvs-ghc recently, with extra commentary by me. It turns out that this patch is not just a cleanup, it is also necessary for GHCi to work on x86_64 with shared libraries, because previously lookupSymbol() was creating jump-table entries for all symbols looked up that resolved outside 2Gb, whereas Wolfgang's version only generates jump-table entries for 32-bit symbol references in object code that we load.
* FIX #1784: EM_AMD64 and EM_X86_64 might both be defined to the same valueSimon Marlow2007-10-191-2/+1
|
* Add a proper write barrier for MVarsSimon Marlow2007-10-111-1/+2
| | | | | | | | | | | | Previously MVars were always on the mutable list of the old generation, which meant every MVar was visited during every minor GC. With lots of MVars hanging around, this gets expensive. We addressed this problem for MUT_VARs (aka IORefs) a while ago, the solution is to use a traditional GC write-barrier when the object is modified. This patch does the same thing for MVars. TVars are still done the old way, they could probably benefit from the same treatment too.
* export n_capabilities, see #1733Simon Marlow2007-10-091-0/+1
|
* FIX validate for PPC Mac OS X - Linker.cThorkil Naur2007-10-051-1/+1
|
* FIX BUILD addDLL returns const char*jochemberndsen@dse.nl2007-09-271-2/+2
| | | | | addDLL returns const char*, not just a char*. Fix compiler warning
* add support for EM_AMD64 elf machine type, openbsd/amd64 ghci worksDon Stewart2007-09-161-1/+5
|
* patch Linker.c for amd64/openbsdDon Stewart2007-09-161-5/+14
|
* export stopTimer(), we need this in the unix packageSimon Marlow2007-09-121-0/+1
|
* Use dlsym on OS X if availableRoman Leshchinskiy2007-09-051-0/+15
| | | | | | | | | | | On OS X 10.4 and newer, we have to use dlsym because the old NS* interface has been deprecated. The patch checks for HAVE_DLFCN_H instead of switching on the OS version. There is one additional quirk: although OS X prefixes global symbols with an underscore, dlsym expects its argument NOT to have a leading underscore. As a hack, we simply strip it off in lookupSymbol. Something a bit more elaborate might be cleaner.
* FIX #1648: rts_mkWord64 was missingSimon Marlow2007-09-031-2/+8
| | | | Also noticed a few others from RtsAPI were missing, so I added them all
* FIX #1626: needed to export hs_hpc_rootModuleSimon Marlow2007-08-231-0/+1
|
* Add R_X86_64_PC64 relocation support to the LinkerClemens Fruhwirth2007-08-081-5/+15
|
* Build RTS as dynamic libraryClemens Fruhwirth2007-08-081-6/+2
|
* Introduce new class for external symbols in Linker.c that use __imp__<sym> ↵Clemens Fruhwirth2007-08-061-6/+18
| | | | instead of &<sym>
* Implement the RTS side of GHC.Environment.getFullArgsIan Lynagh2007-07-171-0/+1
|
* FIX: loading package ghc in GHCi (added a couple of missing symbols)Simon Marlow2007-05-311-0/+2
|
* later mingw runtimes have gettimeofday, it seemsSimon Marlow2007-05-161-0/+7
|
* GHCi debugger: new flag -fbreak-on-exceptionSimon Marlow2007-05-151-2/+1
| | | | | | | | | | When -fbreak-on-exception is set, an exception will cause GHCi to suspend the current computation and return to the prompt, where the history of the current evaluation can be inspected (if we are in :trace). This isn't on by default, because the behaviour could be confusing: for example, ^C will cause a breakpoint. It can be very useful for finding the cause of a "head []" or a "fromJust Nothing", though.
* FIX BUILD: revert accidentally-committed patchSimon Marlow2007-05-111-1/+0
|
* FIX: loading the ghc package under GHCiSimon Marlow2007-05-101-0/+3
|
* Re-working of the breakpoint supportSimon Marlow2007-04-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the result of Bernie Pope's internship work at MSR Cambridge, with some subsequent improvements by me. The main plan was to (a) Reduce the overhead for breakpoints, so we could enable the feature by default without incurrent a significant penalty (b) Scatter more breakpoint sites throughout the code Currently we can set a breakpoint on almost any subexpression, and the overhead is around 1.5x slower than normal GHCi. I hope to be able to get this down further and/or allow breakpoints to be turned off. This patch also fixes up :print following the recent changes to constructor info tables. (most of the :print tests now pass) We now support single-stepping, which just enables all breakpoints. :step <expr> executes <expr> with single-stepping turned on :step single-steps from the current breakpoint The mechanism is quite different to the previous implementation. We share code with the HPC (haskell program coverage) implementation now. The coverage pass annotates source code with "tick" locations which are tracked by the coverage tool. In GHCi, each "tick" becomes a potential breakpoint location. Previously breakpoints were compiled into code that magically invoked a nested instance of GHCi. Now, a breakpoint causes the current thread to block and control is returned to GHCi. See the wiki page for more details and the current ToDo list: http://hackage.haskell.org/trac/ghc/wiki/NewGhciDebugger
* Darwin/x86_64 linker supportwolfgang.thaller@gmx.net2007-04-121-52/+234
| | | | Initial support for loading x86_64 Mach-O files
* Darwin Linker: Do not add local symbols to lochashwolfgang.thaller@gmx.net2007-04-121-9/+0
| | | | | | ... so that GHCi doesn't complain about duplicate symbols when two C modules define the same static variable. MERGE TO STABLE.
* Handle Weak Definitions in the Darwin Linkerwolfgang.thaller@gmx.net2007-04-121-6/+11
| | | | | | | The __i686.get_pc_thunk symbols generated by gcc's PIC code generator are weak definitions that appear in every object file, so we need to deal with them. MERGE TO STABLE.
* add noDuplicatezh_fast to symbol tableSimon Marlow2007-03-081-0/+1
|
* Remove vectored returns.Simon Marlow2007-02-281-9/+0
| | | | | We recently discovered that they aren't a win any more, and just cost code size.
* Constructor names in info tablesbjpop@csse.unimelb.edu.au2007-02-201-51/+0
| | | | | | | This patch adds data constructor names into their info tables. This is useful in the ghci debugger. It replaces the old scheme which was based on tracking data con names in the linker.
* Fix typo causing the PowerPC OS X build to failIan Lynagh2007-01-311-1/+1
|
* Fix GHCi on PowerPC OS XIan Lynagh2007-01-281-0/+1
| | | | | | David Kirkman and Peter Tanski noticed that a line had been removed during a patch merge which meant that oc->image pointed to the wrong place and ultimately caused an error from realloc.
* Toggle whether the RTS gets build with debugger support for ghciPepe Iborra2006-12-111-6/+4
| | | | | | Specifically, this disables the special support in the RTS for looking up the datacon name corresponding to an address. Correspondingly, the debugging commads in GHCi will not be available, and neither will the '-fdebugging' flag