cranelift-object: Make sections read only by default#5619
cranelift-object: Make sections read only by default#5619afonso360 merged 1 commit intobytecodealliance:mainfrom
Conversation
|
The diff itself looks fine here; I'll trust that this section type is what is needed :-) Regarding CI:
|
8f8a375 to
68ac43f
Compare
Did the best I could, we are now only duplicating the Also
👍, You also recently did a similar vet for |
|
@afonso360 would you be willing to update this with an exemption for the |
68ac43f to
9424805
Compare
|
I've rebased this and added the exception, but I think we still have the same issue with cargo vet of missing a few vet's similar to #5550. |
9424805 to
2207d2e
Compare
|
Rebased this on top of main, and that resolves pretty much all of our vet issues. With the exception of |
This audit is needed for bytecodealliance#5619. I'm going ahead and updating Cargo.toml and Cargo.lock at the same time because no source code changes are required for this update.
jameysharp
left a comment
There was a problem hiding this comment.
Once #5827 merges you should be able to rebase this without any cargo-vet complaints. At that point, go ahead and merge!
This changes the default section type to be `ReadOnlyDataWithRel` instead of `Data`. On COFF types the CRT initializers do not run unless their section is read only. The new SectionKind makes these sections read only for COFF and MachO, but leaves it as Writable as required by ELF.
2207d2e to
c52a173
Compare
|
Thanks for unblocking this! 🎉 |
|
The merge queue failure seems to have been sporadic, I retried the job and it passed. I'm going to retry the merge queue again. |
This changes the default section type to be
ReadOnlyDataWithRelinstead ofData.On COFF the CRT initializers do not run unless their section is read only. (See: https://github.com/bjorn3/rustc_codegen_cranelift/issues/1249#issuecomment-1382431789)
The new
SectionKindmakes these sections read only for COFF and MachO, but leaves it as Writable as required by ELF.cc: @bjorn3