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

Set alignment=1 for ELF debug sections #103867

Merged
merged 2 commits into from
Jun 24, 2024
Merged

Conversation

am11
Copy link
Member

@am11 am11 commented Jun 23, 2024

Fix #103862

@am11 am11 requested a review from filipnavara June 23, 2024 15:00
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jun 23, 2024
Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

…r/ElfObjectWriter.cs

Co-authored-by: Filip Navara <filip.navara@gmail.com>
Copy link
Member

@filipnavara filipnavara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if the tests pass

@agocke
Copy link
Member

agocke commented Jun 23, 2024

We have a smoke test on dwarfdump. Could we also add some validation for this in the same place?

@jkotas
Copy link
Member

jkotas commented Jun 24, 2024

We have a smoke test on dwarfdump. Could we also add some validation for this in the same place?

dwarfdump does not complain about this detail. We would have to dump the dwarf file, parse the dump and verify that the alignment of debug sections is non-zero. It sounds too complicated to be worth it.

It would be better to add validation that linking with LinkerFlavor=gold produces working binary without any warnings. It would catch this and all other potential gold linker specific issues.

@am11
Copy link
Member Author

am11 commented Jun 24, 2024

I agree that a basic app validation would be nice with all four linkers. Since we don't have gold linker installed in the CI, it can be added later. Besides section headers are rarely changed.

Copy link
Member

@MichalStrehovsky MichalStrehovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing with all sorts of linkers is a known gap unfortunately and this would be covered if we start doing that.

@MichalStrehovsky MichalStrehovsky merged commit bb63e36 into dotnet:main Jun 24, 2024
87 checks passed
@am11 am11 deleted the patch-3 branch June 24, 2024 08:22
@github-actions github-actions bot locked and limited conversation to collaborators Jul 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-NativeAOT-coreclr community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alignment of debug_* sections in ELF
5 participants