Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1f5c288b
Commit
1f5c288b
authored
Dec 07, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Put the delay import thunk in a separate section.
To work around a binutils bug, cf.
https://sourceware.org/bugzilla/show_bug.cgi?id=14339
parent
4b59142f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
import.c
tools/winebuild/import.c
+4
-0
No files found.
tools/winebuild/import.c
View file @
1f5c288b
...
@@ -1851,6 +1851,7 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc
...
@@ -1851,6 +1851,7 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc
output
(
"
\t
jmp *%s
\n
"
,
asm_name
(
imp_name
)
);
output
(
"
\t
jmp *%s
\n
"
,
asm_name
(
imp_name
)
);
if
(
is_delay
)
if
(
is_delay
)
{
{
output
(
"
\n\t
.section .text$1
\n
"
);
output
(
".L__wine_delay_import:
\n
"
);
output
(
".L__wine_delay_import:
\n
"
);
output
(
"
\t
mov $%s,%%eax
\n
"
,
asm_name
(
imp_name
)
);
output
(
"
\t
mov $%s,%%eax
\n
"
,
asm_name
(
imp_name
)
);
output
(
"
\t
jmp %s
\n
"
,
asm_name
(
delay_load
)
);
output
(
"
\t
jmp %s
\n
"
,
asm_name
(
delay_load
)
);
...
@@ -1860,6 +1861,7 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc
...
@@ -1860,6 +1861,7 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc
output
(
"
\t
jmp *%s(%%rip)
\n
"
,
asm_name
(
imp_name
)
);
output
(
"
\t
jmp *%s(%%rip)
\n
"
,
asm_name
(
imp_name
)
);
if
(
is_delay
)
if
(
is_delay
)
{
{
output
(
"
\n\t
.section .text$1
\n
"
);
output
(
".L__wine_delay_import:
\n
"
);
output
(
".L__wine_delay_import:
\n
"
);
output
(
"
\t
lea %s(%%rip),%%rax
\n
"
,
asm_name
(
imp_name
)
);
output
(
"
\t
lea %s(%%rip),%%rax
\n
"
,
asm_name
(
imp_name
)
);
output
(
"
\t
jmp %s
\n
"
,
asm_name
(
delay_load
)
);
output
(
"
\t
jmp %s
\n
"
,
asm_name
(
delay_load
)
);
...
@@ -1870,6 +1872,7 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc
...
@@ -1870,6 +1872,7 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc
output
(
"
\t
ldr PC, [IP]
\n
"
);
output
(
"
\t
ldr PC, [IP]
\n
"
);
if
(
is_delay
)
if
(
is_delay
)
{
{
output
(
"
\n\t
.section .text$1
\n
"
);
output
(
".L__wine_delay_import:
\n
"
);
output
(
".L__wine_delay_import:
\n
"
);
output
(
"
\t
ldr IP, 1f
\n
"
);
output
(
"
\t
ldr IP, 1f
\n
"
);
output
(
"
\t
ldr IP, [IP]
\n
"
);
output
(
"
\t
ldr IP, [IP]
\n
"
);
...
@@ -1883,6 +1886,7 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc
...
@@ -1883,6 +1886,7 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc
output
(
"
\t
br x16
\n
"
);
output
(
"
\t
br x16
\n
"
);
if
(
is_delay
)
if
(
is_delay
)
{
{
output
(
"
\n\t
.section .text$1
\n
"
);
output
(
".L__wine_delay_import:
\n
"
);
output
(
".L__wine_delay_import:
\n
"
);
output
(
"
\t
adrp x16, %s
\n
"
,
arm64_page
(
asm_name
(
imp_name
)
)
);
output
(
"
\t
adrp x16, %s
\n
"
,
arm64_page
(
asm_name
(
imp_name
)
)
);
output
(
"
\t
add x16, x16, #%s
\n
"
,
arm64_pageoff
(
asm_name
(
imp_name
)
)
);
output
(
"
\t
add x16, x16, #%s
\n
"
,
arm64_pageoff
(
asm_name
(
imp_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