Skip to content

Support emulation options when invoking ld.eld directly.#1250

Open
Kali (EagleEye-0101) wants to merge 1 commit into
qualcomm:mainfrom
EagleEye-0101:issue-21-ld-eld-emulation
Open

Support emulation options when invoking ld.eld directly.#1250
Kali (EagleEye-0101) wants to merge 1 commit into
qualcomm:mainfrom
EagleEye-0101:issue-21-ld-eld-emulation

Conversation

@EagleEye-0101

Copy link
Copy Markdown

Summary

  • Extend ld.eld driver selection to honor -march variants, -mtriple, and -mcpu without requiring target-specific symlink names (arm-link, riscv-link, etc.)
  • Detect and reject conflicting target options across emulation flags
  • Tighten ARM -m emulation validation to match supported emulation strings
  • Add LIT coverage for ld.eld-only invocation paths and re-enable Hexagon invalid-emulation checks

Closes #21. Builds on prior work in #22/#23 and #54/#55.

Test plan

  • qualcomm CI (ci.yml) passes — ninja check-eld
  • Clang format check passes
  • QC preflight checks pass
  • New tests under test/Common/standalone/EmulationOptions/ and test/*/standalone/EmulationOptions/
  • Re-enabled test/Hexagon/standalone/InvalidEmulation/InvalidEmulation.test

@EagleEye-0101

Copy link
Copy Markdown
Author

Hi, I'm working on #21 by extending ld.eld driver selection for -march/-mtriple/-mcpu
(without needing arm-link etc.), I added some LIT tests as well.

Happy to make any changes based on your feedback.
Please review and approve, hoping to hear soon.

@quic-seaswara

Copy link
Copy Markdown
Contributor

added a comment in the issue

@EagleEye-0101

Copy link
Copy Markdown
Author

Hi Shankar Easwaran (@quic-seaswara), thanks for the comment on issue #21, I read it and pushed an update.

I removed using -march and -mtriple for ld.eld driver selection, since those aren't standard for the generic linker name. The PR now focuses on -m emulation (including tighter ARM validation and Template support from main), -mcpu where it helps pick the driver (e.g. Hexagon), and rejecting conflicting target options.

Please let me know if -mcpu should be removed from ld.eld driver selection as well, or if anything else should change. Happy to adjust.

Extend ld.eld driver selection for -m emulation (including Template
support), -mcpu where it helps pick the driver (e.g. Hexagon), and
reject conflicting target options. Tighten ARM -m emulation validation.

Closes qualcomm#21

Signed-off-by: EagleEye-0101 <kaliking2k20@gmail.com>
@EagleEye-0101 Kali (EagleEye-0101) force-pushed the issue-21-ld-eld-emulation branch from e0acff2 to a0a9244 Compare June 9, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Emulation options does not work when using the non-target linker names

2 participants