[DWARFLinker] Move __debug_str to the last section #163603
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context: MachO defined section offset to be a 32-bit integer, meaning that each section must start within 4GB of the segment.
llvm-project/llvm/include/llvm/BinaryFormat/MachO.h
Lines 580 to 593 in c4d7c42
Problem: With larger and larger dSYM we are running out of space. In our internal builds, __debug_str and __debug_line are the two biggest section each having more than 1GB, combined they pushed the last few sections out of the 4GB range.
This diff tries to mitigate that by moving one of the biggest sections to the last, buying our time to find a more permeant solutions