feat: Support --pack-dynamic-relocs=relr#1804
Merged
mati865 merged 1 commit intowild-linker:mainfrom Apr 4, 2026
Merged
Conversation
davidlattimore
approved these changes
Apr 4, 2026
--pack-dynamic-relocs=relr--pack-dynamic-relocs=relr
|
+1. I think the older and more complicated packed relocations format is unlikely to ever be used again, and there would be no value in adding support. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Initially I thought
--pack-dynamic-relocs=relrwould be handled the same way as-z pack-relative-relocs, but this is not how LLD implemented that.As shown by the tests, disabling one of them doesn't have any effect on the other option, and when either is enabled RELR will be used.
LLD also supports
androidandandroid+relr. They enable packing (IMO this is more a compression) ofrela.dynentries (both absolute and relative) as described in https://android.googlesource.com/platform/bionic/+/f5e0ba94d911ef2622ecfd3f7fabc4432a4806d3/tools/relocation_packer/README.TXT. I believe implementing them is not worth additional complexity, at least for now.