SymX(log) \
SymX(sqrt) \
SymX(memcpy) \
- SymX(stg_InstallConsoleEvent) \
+ SymX(rts_InstallConsoleEvent) \
+ SymX(rts_ConsoleHandlerDone) \
Sym(mktime) \
Sym(_imp___timezone) \
Sym(_imp___tzname) \
# define MAIN_CAP_SYM
#endif
+#if !defined(mingw32_HOST_OS)
+#define RTS_USER_SIGNALS_SYMBOLS \
+ SymX(startSignalHandler) \
+ SymX(setIOManagerPipe)
+#else
+#define RTS_USER_SIGNALS_SYMBOLS /* nothing */
+#endif
+
#ifdef TABLES_NEXT_TO_CODE
#define RTS_RET_SYMBOLS /* nothing */
#else
SymX(run_queue_hd) \
SymX(__hscore_get_saved_termios) \
SymX(__hscore_set_saved_termios) \
- SymX(setIOManagerPipe) \
SymX(setProgArgv) \
- SymX(startSignalHandler) \
SymX(startupHaskell) \
SymX(shutdownHaskell) \
SymX(shutdownHaskellAndExit) \
SymX(word2Integerzh_fast) \
SymX(writeTVarzh_fast) \
SymX(xorIntegerzh_fast) \
- SymX(yieldzh_fast)
+ SymX(yieldzh_fast) \
+ RTS_USER_SIGNALS_SYMBOLS
#ifdef SUPPORT_LONG_LONGS
#define RTS_LONG_LONG_SYMS \
# endif
if (0==strcmp(".text",sectab_i->Name) ||
+ 0==strcmp(".rdata",sectab_i->Name)||
0==strcmp(".rodata",sectab_i->Name))
kind = SECTIONKIND_CODE_OR_RODATA;
if (0==strcmp(".data",sectab_i->Name) ||
information. */
&& 0 != strcmp(".stab", sectab_i->Name)
&& 0 != strcmp(".stabstr", sectab_i->Name)
+ /* ignore constructor section for now */
+ && 0 != strcmp(".ctors", sectab_i->Name)
) {
- errorBelch("Unknown PEi386 section name `%s'", sectab_i->Name);
+ errorBelch("Unknown PEi386 section name `%s' (while processing: %s)", sectab_i->Name, oc->fileName);
return 0;
}
/* Ignore sections called which contain stabs debugging
information. */
if (0 == strcmp(".stab", sectab_i->Name)
- || 0 == strcmp(".stabstr", sectab_i->Name))
+ || 0 == strcmp(".stabstr", sectab_i->Name)
+ || 0 == strcmp(".ctors", sectab_i->Name))
continue;
if ( sectab_i->Characteristics & MYIMAGE_SCN_LNK_NRELOC_OVFL ) {
-- hence the constant 4.
Also I don't know if A should be added, but so
far it has always been zero.
+
+ SOF 05/2005: 'A' (old contents of *pP) have been observed
+ to contain values other than zero (the 'wx' object file
+ that came with wxhaskell-0.9.4; dunno how it was compiled..).
+ So, add displacement to old value instead of asserting
+ A to be zero. Fixes wxhaskell-related crashes, and no other
+ ill effects have been observed.
+
+ Update: the reason why we're seeing these more elaborate
+ relocations is due to a switch in how the NCG compiles SRTs
+ and offsets to them from info tables. SRTs live in .(ro)data,
+ while info tables live in .text, causing GAS to emit REL32/DISP32
+ relocations with non-zero values. Adding the displacement is
+ the right thing to do.
*/
- ASSERT(A==0);
- *pP = S - ((UInt32)pP) - 4;
+ *pP = S - ((UInt32)pP) - 4 + A;
break;
default:
debugBelch("%s: unhandled PEi386 relocation type %d",