-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Use ptrdiff_t sized offsets for gvars_offsets to allow large sysimages #57366
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
base: master
Are you sure you want to change the base?
Conversation
Can you test that this is working before merging? |
test/compileall.jl
Outdated
@test success(`$(Base.julia_cmd()) -J $(dir)/sys.so -e 'Base.scrub_repl_backtrace(nothing); exit()'`) | ||
|
||
|
||
if !Sys.iswindows() #Windows doesn't support large images |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work on 32-bit systems? Edit: ah, you skip the test below? Isn't it simpler to just exclude 32-bit systems together with Windows here?
8fa9985
to
4170a4a
Compare
x86_64 Darwin tests are systematically failing on this PR despite multiple retries. |
This keeps failing: https://buildkite.com/julialang/julia-master/builds/45061#01952ab6-a051-466e-aa0a-49ff9c521962/758-1238
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are relying on the .ldata
section existing to be allowed to use large images like this, but that is an ELF-only feature. Since we use the Small or Medium CodeModels, individual object file relocations will only be able to reference a shared object smaller than about 2GB
I guess we need to detect large images and switch to the large code model. (Maybe printing an info that the image is very large and will have lower performance. I think aarch64 is fine here because there the code model allows for 4GB relocations |
Hopefully this fixes JuliaLang/PackageCompiler.jl#1019. This does mean a very slight size increase (each offset is twice as large but shouldn't make too much difference (it's an extra 32bit per gvar))