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

Allow LLVM_FAULTMAPS section to be put after the DWARF section. #77107

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

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.

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 mc Machine (object) code label Jan 5, 2024
@llvmbot
Copy link
Collaborator

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

@danilaml

@shamithoke
Copy link
Contributor Author

@espindola

@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
mc Machine (object) code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants