| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Emit the linker identification in the LLD style, "Linker: [<vendor> ]ELD <version> [(<revision>)]", instead of "[<vendor>] Linker <version> (<revision>)", so that images linked by ELD are easy to recognize with readelf -p .comment. The revision is formatted with getELDRepositoryVersion(), as --repository-version already does, so no empty "()" is emitted when the build has no revision information. Fixes qualcomm#2038 Signed-off-by: Ricardo Alves de Souza <ricardoasouz@hotmail.com>
| VersionString += ELDRepositoryVersion; | ||
| } | ||
| if (m_Module.needLTOToBeInvoked() || config().options().hasLTO()) | ||
| VersionString += " LTO Enabled "; |
There was a problem hiding this comment.
We can remove the LTO enabled from the version output.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Update the .comment linker identification to follow the LLD-style format and make binaries linked by ELD easy to recognize.
Before:
After:
When a vendor is configured, it is emitted before ELD:
The revision information is formatted with getELDRepositoryVersion(), consistent with --repository-version. This also avoids emitting an empty () when revision information is unavailable.
Tests
Updated the existing .comment checks to verify the ELD identity in both normal and LTO outputs.
RevisionInfoUpdateOnBuild is currently marked unsupported because it rebuilds ld.eld and can race with other tests. Its updated FileCheck pattern was therefore validated directly against the .comment output from the patched linker.
Validation performed:
The generated ELF .comment section was also manually verified to contain:
Fixes #2038