Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PoroCYon
smol
Commits
4b4d8107
Commit
4b4d8107
authored
May 05, 2019
by
PoroCYon
Committed by
PoroCYon
May 17, 2019
Browse files
add support for R_X86_64_REX_GOTPCRELX reloc (thanks Shiz)
parent
be3942ed
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/smolemit.py
View file @
4b4d8107
...
@@ -126,11 +126,12 @@ dynamic.end:
...
@@ -126,11 +126,12 @@ dynamic.end:
outf
.
write
(
'_symbols:
\n
'
)
outf
.
write
(
'_symbols:
\n
'
)
for
library
,
symrels
in
libraries
.
items
():
for
library
,
symrels
in
libraries
.
items
():
for
sym
,
reloc
in
symrels
:
for
sym
,
reloc
in
symrels
:
if
reloc
!=
'R_X86_64_PLT32'
and
reloc
!=
'R_X86_64_GOTPCRELX'
:
if
reloc
!=
'R_X86_64_PLT32'
and
reloc
!=
'R_X86_64_GOTPCRELX'
\
and
reloc
!=
'R_X86_64_REX_GOTPCRELX'
:
eprintf
(
'Relocation type '
+
reloc
+
' of symbol '
+
sym
+
' unsupported!'
)
eprintf
(
'Relocation type '
+
reloc
+
' of symbol '
+
sym
+
' unsupported!'
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
if
reloc
==
'R_X86_64_GOTPCRELX'
:
if
reloc
==
'R_X86_64_GOTPCRELX'
or
reloc
==
'R_X86_64_REX_GOTPCRELX'
:
outf
.
write
(
"""
outf
.
write
(
"""
global {name}
global {name}
{name}:
{name}:
...
...
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