Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
93242d74
Commit
93242d74
authored
Aug 19, 2001
by
sof
Browse files
[project @ 2001-08-19 20:14:22 by sof]
Nuke uses of LEADING_UNDERSCORE; use Config.cLeadingUnderscore instead.
parent
9a6f4dd7
Changes
3
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/ghci/Linker.lhs
View file @
93242d74
...
...
@@ -6,9 +6,6 @@
\begin{code}
{-# OPTIONS -#include "Linker.h" #-}
-- so that we can see defn of LEADING_UNDERSCORE
#include "../includes/config.h"
module Linker (
initLinker, -- :: IO ()
loadObj, -- :: String -> IO ()
...
...
@@ -23,17 +20,14 @@ import Foreign ( Ptr, nullPtr )
import PrelByteArr
import PrelPack (packString)
import Panic ( panic )
import DriverUtil ( prefixUnderscore )
-- ---------------------------------------------------------------------------
-- RTS Linker Interface
-- ---------------------------------------------------------------------------
lookupSymbol str_in = do
# ifdef LEADING_UNDERSCORE
let str = '_':str_in
# else
let str = str_in
# endif
let str = prefixUnderscore str_in
addr <- c_lookupSymbol (packString str)
if addr == nullPtr
then return Nothing
...
...
ghc/compiler/main/DriverPipeline.hs
View file @
93242d74
...
...
@@ -868,13 +868,8 @@ doLink o_files = do
++
pkg_extra_ld_opts
++
extra_ld_opts
++
if
static
&&
not
no_hs_main
then
#
ifdef
LEADING_UNDERSCORE
[
"-u"
,
"_PrelMain_mainIO_closure"
,
"-u"
,
"___init_PrelMain"
]
#
else
[
"-u"
,
prefixUnderscore
"PrelMain_mainIO_closure"
,
"-u"
,
prefixUnderscore
"__init_PrelMain"
]
#
endif
else
[]
))
-- parallel only: move binary to another dir -- HWL
...
...
ghc/compiler/nativeGen/MachMisc.lhs
View file @
93242d74
...
...
@@ -55,17 +55,13 @@ import Panic ( panic )
import GlaExts ( word2Int#, int2Word#, shiftRL#, and#, (/=#) )
import Outputable ( pprPanic, ppr )
import IOExts ( trace )
import Config ( cLeadingUnderscore )
import FastTypes
\end{code}
\begin{code}
underscorePrefix :: Bool -- leading underscore on assembler labels?
#ifdef LEADING_UNDERSCORE
underscorePrefix = True
#else
underscorePrefix = False
#endif
underscorePrefix = (cLeadingUnderscore == "YES")
---------------------------
fmtAsmLbl :: String -> String -- for formatting labels
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment