Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relocate fix for aie2p-none-unknown-elf arch #259

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
relocate fix for aie2p-none-unknown-elf arch
This solves "Unknown AIE version in EFLAGS"
error when test application is build for the
triplet aie2p-none-unknown-elf target.
For this target the EFLAGS is 3.

fixes: #258

Signed-off-by: Mika Laitio <[email protected]>
lamikr committed Jan 13, 2025
commit 17612ca05e06f017013bf84cb6d06b9b4a31fad6
1 change: 1 addition & 0 deletions lld/ELF/Arch/AIE.cpp
Original file line number Diff line number Diff line change
@@ -370,6 +370,7 @@ void AIE::relocate(uint8_t *Loc, const Relocation &rel, uint64_t Val) const {
relocateAIE1(Loc, rel, Val);
break;
case 2:
case 3:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks dangerous. It is not guaranteed that relocations are the same between the two versions. Perhaps we are lucky though.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We have a complete fix for this in a private repository. We will expedite merging that.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Great to see external PRs coming in though. Thanks!

relocateAIE2(Loc, rel, Val);
break;
default: