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

cmd/link: does not set section type of .init_array correctly #50295

Closed
ianlancetaylor opened this issue Dec 21, 2021 · 5 comments
Closed

cmd/link: does not set section type of .init_array correctly #50295

ianlancetaylor opened this issue Dec 21, 2021 · 5 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Milestone

Comments

@ianlancetaylor
Copy link
Contributor

On an ELF system the section type of the .init_array section should be SHT_INIT_ARRAY. Currently the linker creates the section as SHT_PROGBITS. This is not correct, and it breaks when using newer versions of lld.

@ianlancetaylor ianlancetaylor added NeedsFix The path to resolution is known, but the work has not been done. release-blocker labels Dec 21, 2021
@ianlancetaylor ianlancetaylor added this to the Go1.18 milestone Dec 21, 2021
@ianlancetaylor ianlancetaylor self-assigned this Dec 21, 2021
@ianlancetaylor
Copy link
Contributor Author

@gopherbot Please open backport issues

We need to fix this for -buildmode=c-archive to work with new versions of lld.

@gopherbot
Copy link

Backport issue(s) opened: #50296 (for 1.16), #50297 (for 1.17).

Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases.

@gopherbot
Copy link

Change https://golang.org/cl/373734 mentions this issue: cmd/link: use SHT_INIT_ARRAY for .init_array section

@gopherbot
Copy link

Change https://golang.org/cl/374194 mentions this issue: [release-branch.go1.17] cmd/link: use SHT_INIT_ARRAY for .init_array section

@gopherbot
Copy link

Change https://golang.org/cl/374234 mentions this issue: [release-branch.go1.16] cmd/link: use SHT_INIT_ARRAY for .init_array section

gopherbot pushed a commit that referenced this issue Jan 5, 2022
…section

For #50295
Fixes #50297

Change-Id: If55ebcd5f2af724da7c9c744458a56d21a7ddde7
Reviewed-on: https://go-review.googlesource.com/c/go/+/373734
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
(cherry picked from commit cfb0cc3)
Reviewed-on: https://go-review.googlesource.com/c/go/+/374194
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
gopherbot pushed a commit that referenced this issue Jan 5, 2022
…section

For #50295
Fixes #50296

Change-Id: If55ebcd5f2af724da7c9c744458a56d21a7ddde7
Reviewed-on: https://go-review.googlesource.com/c/go/+/373734
Trust: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
(cherry picked from commit cfb0cc3)
Reviewed-on: https://go-review.googlesource.com/c/go/+/374234
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
@golang golang locked and limited conversation to collaborators Jun 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. release-blocker
Projects
None yet
Development

No branches or pull requests

2 participants