Skip to content

Conversation

@shamithoke
Copy link
Contributor

@shamithoke shamithoke commented Jan 5, 2024

Presently, the DWARF section is expected to be the last section barring few sections as exceptions.
As I understand, the requirement to keep DWARF section at the end is to enforce that _text section should not go after the DWARF section.
Adding other sections such LLVM FAULTMAPS section after DWARF can be permitted.

@github-actions
Copy link

github-actions bot commented Jan 5, 2024

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be
notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write
permissions for the repository. In which case you can instead tag reviewers by
name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review
by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate
is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot llvmbot added the llvm:mc Machine (object) code label Jan 5, 2024
@llvmbot
Copy link
Member

llvmbot commented Jan 5, 2024

@llvm/pr-subscribers-mc

Author: None (shamithoke)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/77107.diff

1 Files Affected:

  • (modified) llvm/lib/MC/MCMachOStreamer.cpp (+4)
diff --git a/llvm/lib/MC/MCMachOStreamer.cpp b/llvm/lib/MC/MCMachOStreamer.cpp index d7d343f15eaa61..61ab944ae44fbb 100644 --- a/llvm/lib/MC/MCMachOStreamer.cpp +++ b/llvm/lib/MC/MCMachOStreamer.cpp @@ -160,6 +160,10 @@ static bool canGoAfterDWARF(const MCSectionMachO &MSec) { return true; if (SegName == "__LLVM" && SecName == "__cg_profile") return true; + + if (SegName == "__LLVM_FAULTMAPS" && SecName == "__llvm_faultmaps") + return true; + return false; } 
@shamithoke
Copy link
Contributor Author

@shamithoke
Copy link
Contributor Author

@espindola
Copy link
Contributor

espindola commented Jan 30, 2024 via email

@dwblaikie
Copy link
Collaborator

Could you provide more details (ideally details that will go into the commit message) on the motivation for this change (possible other folks on this review understand the implications of this change and the motivation is obvious, but I'm not as familiar - and seems like good details to include to make this more transparent)

@shamithoke shamithoke changed the title LLVM_FAULTMAPS section can be put after the DWARF section. Allow LLVM_FAULTMAPS section to be put after the DWARF section. Mar 7, 2024
@shamithoke
Copy link
Contributor Author

ping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

llvm:mc Machine (object) code

4 participants