Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Linux] Add support for PCK embedding section with non GNU-ld linkers. #87464

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Jan 22, 2024

Fixes #87438

Replaces linker scripts with section data definition in the code (same as used on Windows), this seems to work with mold and lld (including LTO builds).

@bruvzg bruvzg added this to the 4.x milestone Jan 22, 2024
@bruvzg bruvzg marked this pull request as ready for review January 24, 2024 07:43
@bruvzg bruvzg requested a review from a team as a code owner January 24, 2024 07:43
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@akien-mga akien-mga modified the milestones: 4.x, 4.3 Jan 24, 2024
Copy link
Contributor

@Riteo Riteo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have much experience with linking so TIWAGOS but this looks like a win overall.

FTR, mold has some reasoning behind the absence of linker script support:

Mold supports a very limited set of linker script features, which is just sufficient to read /usr/lib/x86_64-linux-gnu/libc.so on Linux systems (on Linux, that file is contrary to its name not a shared library but an ASCII linker script that loads a real libc.so file.)

Beyond that, we have no plan to support any additional linker script features. The linker script is an ad-hoc, over-designed, complex language which we believe needs to be replaced by a simpler mechanism. We have a plan to add a replacement for the linker script to mold instead.

@bruvzg bruvzg requested a review from a team as a code owner January 24, 2024 10:10
@akien-mga akien-mga merged commit 11964fb into godotengine:master Feb 8, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@akien-mga akien-mga added the cherrypick:3.x Considered for cherry-picking into a future 3.x release label May 11, 2024
@akien-mga
Copy link
Member

Cherry-picked for 3.6.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PCK section missing from self compiled templates (Linux, linking with LLD)
4 participants