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
jberryman
GHC
Commits
106f0434
Commit
106f0434
authored
Aug 20, 2012
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add X86_64_GOTTPOFF relocation for errno
Submitted by: Markus Pfeiffer <markus.pfeiffer@morphism.de> on cvs-ghc
parent
cec899d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
rts/Linker.c
rts/Linker.c
+25
-0
No files found.
rts/Linker.c
View file @
106f0434
...
...
@@ -133,6 +133,10 @@
#define ALWAYS_PIC
#endif
#if defined(dragonfly_HOST_OS)
#include <sys/tls.h>
#endif
/* Hash table mapping symbol names to Symbol */
static
/*Str*/
HashTable
*
symhash
;
...
...
@@ -5207,6 +5211,27 @@ do_Elf_Rela_relocations ( ObjectCode* oc, char* ehdrC,
*
(
Elf64_Word
*
)
P
=
(
Elf64_Word
)
off
;
break
;
}
#if defined(dragonfly_HOST_OS)
case
R_X86_64_GOTTPOFF
:
{
#if defined(ALWAYS_PIC)
barf
(
"R_X86_64_GOTTPOFF relocation, but ALWAYS_PIC."
);
#else
/* determine the offset of S to the current thread's tls
area
XXX: Move this to the beginning of function */
struct
tls_info
ti
;
get_tls_area
(
0
,
&
ti
,
sizeof
(
ti
));
/* make entry in GOT that contains said offset */
StgInt64
gotEntry
=
(
StgInt64
)
&
makeSymbolExtra
(
oc
,
ELF_R_SYM
(
info
),
(
S
-
(
Elf64_Addr
)(
ti
.
base
)))
->
addr
;
*
(
Elf64_Word
*
)
P
=
gotEntry
+
A
-
P
;
#endif
break
;
}
#endif
case
R_X86_64_PLT32
:
{
...
...
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