Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
6b64c60b
Unverified
Commit
6b64c60b
authored
Jan 16, 2020
by
Rémi Verschelde
Committed by
GitHub
Jan 16, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #35209 from RandomShaper/fix_pck_embed_linux
Fix error exporting to X11 with embedded PCK
parents
f2aa99a8
4eeae592
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
5 deletions
+21
-5
detect.py
platform/x11/detect.py
+9
-3
pck_embed.ld
platform/x11/pck_embed.ld
+2
-2
pck_embed.legacy.ld
platform/x11/pck_embed.legacy.ld
+10
-0
No files found.
platform/x11/detect.py
View file @
6b64c60b
...
...
@@ -171,7 +171,7 @@ def configure(env):
else
:
env
.
Append
(
CCFLAGS
=
[
'-flto'
])
env
.
Append
(
LINKFLAGS
=
[
'-flto'
])
if
not
env
[
'use_llvm'
]:
env
[
'RANLIB'
]
=
'gcc-ranlib'
env
[
'AR'
]
=
'gcc-ar'
...
...
@@ -329,9 +329,15 @@ def configure(env):
if
env
[
"execinfo"
]:
env
.
Append
(
LIBS
=
[
'execinfo'
])
if
not
env
[
'tools'
]:
env
.
Append
(
LINKFLAGS
=
[
'-T'
,
'platform/x11/pck_embed.ld'
])
import
subprocess
import
re
binutils_version
=
re
.
search
(
'
\
s(
\
d+
\
.
\
d+)'
,
str
(
subprocess
.
check_output
([
'ld'
,
'-v'
])))
.
group
(
1
)
if
float
(
binutils_version
)
>=
2.30
:
env
.
Append
(
LINKFLAGS
=
[
'-T'
,
'platform/x11/pck_embed.ld'
])
else
:
env
.
Append
(
LINKFLAGS
=
[
'-T'
,
'platform/x11/pck_embed.legacy.ld'
])
## Cross-compilation
...
...
platform/x11/pck_embed.ld
View file @
6b64c60b
SECTIONS
{
/* Add a zero-sized section; the exporter will patch it to enclose the data appended to the executable (embedded PCK) */
pck 0 (
NOLOAD
) :
pck 0 (
INFO
) :
{
/*
Just some content to avoid the linker discarding
the section */
/*
binutils >= 2.30 allow it being zero-sized, but needs something between the braces to keep
the section */
. = ALIGN(8);
}
}
...
...
platform/x11/pck_embed.legacy.ld
0 → 100644
View file @
6b64c60b
SECTIONS
{
/* The exporter will patch this section to enclose the data appended to the executable (embedded PCK) */
pck 0 (INFO) : AT ( ADDR (.rodata) + SIZEOF (.rodata) )
{
/* binutils < 2.30 need some actual content for the linker not to discard the section */
BYTE(0);
}
}
INSERT AFTER .rodata;
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