FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[ELD] Identify ELD in .comment section by ricardoasouz · Pull Request #2062 · qualcomm/eld · GitHub

/ eld Public

[ELD] Identify ELD in .comment section - #2062

Open
Ricardo Alves de Souza (ricardoasouz) wants to merge 1 commit into
qualcomm:mainfrom
ricardoasouz:fix/2038-linker-comment
Open

Ricardo Alves de Souza (ricardoasouz) wants to merge 1 commit into
qualcomm:mainfrom
ricardoasouz:fix/2038-linker-comment

Conversation

Copy link
Copy Markdown
Contributor

Summary

Update the .comment linker identification to follow the LLD-style format and make binaries linked by ELD easy to recognize.

Before:

Linker 24.0 (<revision>)

After:

Linker: ELD 24.0 (<revision>)

When a vendor is configured, it is emitted before ELD:

Linker: <vendor> ELD <version> (<revision>)

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:

check-eld-extended: PASS

Unit tests:
89/89 PASS

Regression suites:
ARM, AArch64, RISCV, RISCV64, Hexagon and X86
- default: PASS
- --use-old-rule-matching: PASS

X86_32:
- default: 4/4 PASS
- --use-old-rule-matching: 4/4 PASS

The generated ELF .comment section was also manually verified to contain:

Linker: ELD 24.0 (<revision>)

Fixes #2038

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 ";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We can remove the LTO enabled from the version output.

This branch has not been deployed

No deployments
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make better inspecting linker used to build

2 participants


Back | FazBrowse Home | New Git URL