Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex D
GHC
Commits
2b33f6e8
Commit
2b33f6e8
authored
Feb 04, 2014
by
awson
Committed by
Austin Seipp
Feb 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Final fix to #7134 (and #8717 as well.)
Signed-off-by:
Austin Seipp
<
austin@well-typed.com
>
parent
dba9bf67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
rts/Linker.c
rts/Linker.c
+4
-12
No files found.
rts/Linker.c
View file @
2b33f6e8
...
...
@@ -3491,8 +3491,8 @@ allocateImageAndTrampolines (
/* For 32-bit case we don't need this, hence we use macro PEi386_IMAGE_OFFSET,
which equals to 4 for 64-bit case and 0 for 32-bit case. */
/* We allocate trampolines area for all symbols right behind
image data, aligned on
16
. */
size
=
((
PEi386_IMAGE_OFFSET
+
size
+
0x
f
)
&
~
0xf
)
image data, aligned on
8
. */
size
=
((
PEi386_IMAGE_OFFSET
+
size
+
0x
7
)
&
~
0x7
)
+
hdr
.
NumberOfSymbols
*
sizeof
(
SymbolExtra
);
#endif
image
=
VirtualAlloc
(
NULL
,
size
,
...
...
@@ -4147,7 +4147,7 @@ static int
ocAllocateSymbolExtras_PEi386
(
ObjectCode
*
oc
)
{
oc
->
symbol_extras
=
(
SymbolExtra
*
)(
oc
->
image
-
PEi386_IMAGE_OFFSET
+
((
PEi386_IMAGE_OFFSET
+
oc
->
fileSize
+
0x
f
)
&
~
0xf
));
+
((
PEi386_IMAGE_OFFSET
+
oc
->
fileSize
+
0x
7
)
&
~
0x7
));
oc
->
first_symbol_extra
=
0
;
oc
->
n_symbol_extras
=
((
COFF_header
*
)
oc
->
image
)
->
NumberOfSymbols
;
...
...
@@ -4161,7 +4161,7 @@ makeSymbolExtra_PEi386( ObjectCode* oc, size_t s, char* symbol )
SymbolExtra
*
extra
;
curr_thunk
=
oc
->
first_symbol_extra
;
if
(
curr_thunk
>
oc
->
n_symbol_extras
)
{
if
(
curr_thunk
>
=
oc
->
n_symbol_extras
)
{
barf
(
"Can't allocate thunk for %s"
,
symbol
);
}
...
...
@@ -4172,14 +4172,6 @@ makeSymbolExtra_PEi386( ObjectCode* oc, size_t s, char* symbol )
extra
->
addr
=
(
uint64_t
)
s
;
memcpy
(
extra
->
jumpIsland
,
jmp
,
6
);
/* DLL-imported symbols are inserted here.
Others are inserted in ocGetNames_PEi386.
*/
if
(
lookupStrHashTable
(
symhash
,
symbol
)
==
NULL
)
{
ghciInsertSymbolTable
(
oc
->
fileName
,
symhash
,
symbol
,
extra
->
jumpIsland
,
HS_BOOL_FALSE
,
oc
);
}
oc
->
first_symbol_extra
++
;
return
(
size_t
)
extra
->
jumpIsland
;
...
...
Write
Preview
Markdown
is supported
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