-
Notifications
You must be signed in to change notification settings - Fork 18.7k
cmd/link: improve PE section handling #76943
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
This change improves how the PE linker handles sections: - Unify addSection and appendSection APIs following ELF pattern - Merge addDWARFSection into peshbits for consistent handling - Add peSectionAlign helper for section alignment - Add comprehensive unit tests for PE sections
|
This PR (HEAD: 22ce482) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/731740. Important tips:
|
|
Message from Ian Lance Taylor: Patch Set 1: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Go LUCI: Patch Set 1: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-12-20T22:29:50Z","revision":"c2c4986d874bc02ee33e1595bcec6c2c3ad8a919"} Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Ian Lance Taylor: Patch Set 1: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Go LUCI: Patch Set 1: This CL has failed the run. Reason: Tryjob golang/try/gotip-windows-386 has failed with summary (view all results):
To reproduce, try Additional links for debugging:
Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Go LUCI: Patch Set 1: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Zxilly Chou: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Zxilly Chou: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
This PR (HEAD: ce29298) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/731740. Important tips:
|
|
Message from Meng Zhuo: Patch Set 2: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Go LUCI: Patch Set 2: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-12-21T10:20:46Z","revision":"0224e4fd103e5b4a68102e7941e51f4356cb1fc4"} Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Meng Zhuo: Patch Set 2: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Go LUCI: Patch Set 2: This CL has failed the run. Reason: Failed Tryjobs:
To reproduce, try Additional links for debugging:
To reproduce, try Additional links for debugging: Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Go LUCI: Patch Set 2: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
This PR (HEAD: b4c33e7) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/731740. Important tips:
|
|
Message from xie cui: Patch Set 3: Run-TryBot+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Gopher Robot: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
This PR (HEAD: de8228c) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/731740. Important tips:
|
|
Message from Ian Lance Taylor: Patch Set 4: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Go LUCI: Patch Set 4: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-12-21T18:33:42Z","revision":"5502e9c6ccb3bd17e1427e27b026e5e927c64af5"} Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Ian Lance Taylor: Patch Set 4: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Go LUCI: Patch Set 4: This CL has passed the run Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Go LUCI: Patch Set 4: LUCI-TryBot-Result+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Ian Lance Taylor: Patch Set 4: (5 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
This PR (HEAD: 7302f96) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/731740. Important tips:
|
|
This PR (HEAD: ba62ab4) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/731740. Important tips:
|
|
Message from Zxilly Chou: Patch Set 4: (5 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Ian Lance Taylor: Patch Set 6: Code-Review+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
This PR (HEAD: a05a626) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/go/+/731740. Important tips:
|
|
Message from Zxilly Chou: Patch Set 7: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Zxilly Chou: Patch Set 7: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Ian Lance Taylor: Patch Set 7: Commit-Queue+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Go LUCI: Patch Set 7: Dry run: CV is trying the patch. Bot data: {"action":"start","triggered_at":"2025-12-23T23:47:44Z","revision":"1abfa5480da640af2d0c7bb562101f5415c8c25b"} Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Ian Lance Taylor: Patch Set 7: -Commit-Queue Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Go LUCI: Patch Set 7: This CL has failed the run. Reason: Tryjob golang/try/gotip-windows-386 has failed with summary (view all results):
To reproduce, try Additional links for debugging: Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
|
Message from Go LUCI: Patch Set 7: LUCI-TryBot-Result-1 Please don’t reply on this GitHub thread. Visit golang.org/cl/731740. |
This change improves how the PE linker handles sections, laying
groundwork for proper section separation on Windows.
The peshbits function now handles section creation for all segment
types, similar to how elfshbits works for ELF.
Updates #76864
Updates #76038