
#7790: Add dummy undefined symbols to indicate ways -----------------------------+---------------------------------------------- Reporter: ezyang | Owner: ezyang Type: task | Status: new Priority: normal | Component: Compiler Version: | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- Currently, "way" information is not recorded into object files; it is only recorded into 'hi' files. This means if you are using, say, rts/Linker.c (say, if you're GHCi or a dynamic plugins package), if you mess up and load an object file compiled the wrong way, you will be very sad. I think a cute trick we could play is to define a bunch of dummy symbols per-way, and add them as undefined symbols to objects, to indicate what way they were compiled, e.g. with the `-u` linker flag. Various RTS's export the symbols of ways they support, and attempting to link an object with an incompatible RTS results in a link error. Are there any problems with this scheme? If not, I'll go ahead and implement it. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7790 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler