-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
stage2: Hello, Silicon!\n #7231
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
Merged
Merged
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
72310db
stage2 MachO: add min OS version load cmd
kubkon 1bec531
stage2 MachO: add source version load cmd
kubkon 7dd5ce2
stage2 macOS: make exe flagged as pie
kubkon b3fdfe5
stage2 MachO: clean up segment protection flags
kubkon 6ac7e99
Write local symbols when flushing
kubkon 7a40724
stage2 MachO: remove discontinuities between segments
kubkon 4a3d757
stage2 MachO: reduce size of __TEXT segment
kubkon 8450e6f
stage2 macho: pages need to be 16kb aligned!
kubkon 4e3520a
stage2 macho: make page size target cpu arch dependent
kubkon 2972f63
stage2 macho: start reverting some tweaks
kubkon e8dd62a
stage2 macho: fix incorrect rebase
kubkon be0d557
stage2 macho: revert required alignment always at 4
kubkon e1b65ff
stage2 macho: cleanup minimum version command
kubkon a2e0e33
stage2 macho: bring back incremental symbol commits
kubkon bbc4ee3
stage2 macho: refactor
kubkon 403dc50
stage2 macho: preallocate empty code sig space
kubkon 2bd963a
stage2 macho: don't pad out holes between sections
kubkon 3ac8046
stage2 macho: write out constants in CS
kubkon d14cd59
stage2 macho: move code signature logic into struct
kubkon 79381dc
stage2 macho: add empty CodeDirectory blob
kubkon 9dcf7ee
stage2 macho: add info about __TEXT segment
kubkon a6e93da
stage2 macho: generate a code sig (not valid yet)
kubkon cd79c6d
stage2 macho: fix issues with codesigning
kubkon e7db372
stage2 macho: cleanup logs
kubkon 59fe3d4
stage2 macho: make file structure compatible with codesign tool
kubkon 80b1041
stage2 macho: use RIP-relative for memory-set regs x86_64
kubkon ef5132c
stage2 macho: first, rough draft at trampolining
kubkon 2cd84b1
stage2 macho: refactor PIE generation on x86_64
kubkon 10942e3
stage2 macho: Hello, Silicon!
kubkon c749b78
stage2 macho: add orr and orn instructions
kubkon 64eae8f
stage2 macho: move PIE fixups to link file; fix tests
kubkon 7e8f7da
stage2 macho: rename inodes to prevent SIGKILL
kubkon f125c4f
stage2 macho: enable end-to-end incremental linking tests on aarch64
kubkon a8f8d82
stage2 macho: use Dir.copyFile instead of manual create+copy
kubkon ebb2f20
stage2 macho: Dir.copyFile does the rename for us!
kubkon 02baaac
Update src/codegen.zig
kubkon 5ed7626
stage2 macho: apply more review comments
kubkon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The doc comments for the
memory
tag of theMCValue
enum says:I don't think it makes sense to put the logic here - instead of making it work differently for PIE targets and violating the doc comments for this enum tag, the
MCValue
should be populated with a different tag other thanmemory
when doing PIE, at the location that sets the value. You can introduce a newMCValue
tag with a special meaning if you need to.I'd be ok with making this review comment a follow-up issue.
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 totally agree with you that this should really be a different tag, I just didn't wanna change too many things at once before we get something working on the Silicon. I'll be more than happy to work on this in a subsequent PR(s), as I'd love to generalise and clean it up!