Skip to content

Workaround invalid reloc 315 on aarch64 Linux #9339

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

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

bnbarham
Copy link

gold fails to link libswiftDispatch.so on aarch64 Linux due to:

/usr/bin/ld.gold: error: Invalid/unrecognized reloc reloc 315.
/usr/bin/ld.gold: internal error in global, at ../../gold/aarch64.cc:6398
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Attempt to workaround this via disabling
SupportIndirectSymViaGOTPCRel.

rdar://135050296

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

Can we expose this as a flag instead? I don't think that we should be making this change. We are also hitting this on Android and are "working around" it by using the just built lld.

@bnbarham
Copy link
Author

Can we expose this as a flag instead? I don't think that we should be making this change. We are also hitting this on Android and are "working around" it by using the just built lld.

I'd prefer to get this change in to unblock rebranch, then see what the outcome of llvm#78003 (comment) ends up being (and either cherry-picking that, or using the flag if it's added). Is that reasonable to you?

@bnbarham
Copy link
Author

@swift-ci please test llvm

`gold` fails to link `libswiftDispatch.so` on aarch64 Linux due to:
```
/usr/bin/ld.gold: error: Invalid/unrecognized reloc reloc 315.
/usr/bin/ld.gold: internal error in global, at ../../gold/aarch64.cc:6398
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
```

Attempt to workaround this via disabling
`SupportIndirectSymViaGOTPCRel`.

rdar://135050296
@bnbarham
Copy link
Author

bnbarham commented Oct 8, 2024

@swift-ci please test

@bnbarham
Copy link
Author

bnbarham commented Oct 8, 2024

Can we expose this as a flag instead? I don't think that we should be making this change. We are also hitting this on Android and are "working around" it by using the just built lld.

I'd like to get this in ASAP as we have no idea if there's downstream aarch64 failures - I should have merged this last week really 😅. I agree passing a flag through probably makes more sense, so we can look at that separately.

@bnbarham
Copy link
Author

bnbarham commented Oct 9, 2024

Failure is unrelated - it just started failing on tip.

@bnbarham
Copy link
Author

bnbarham commented Oct 9, 2024

@swift-ci please test llvm

@bnbarham bnbarham merged commit 2edb151 into swiftlang:stable/20240723 Oct 9, 2024
3 of 5 checks passed
@bnbarham bnbarham deleted the more-crel-revert branch October 9, 2024 03:47
ahmedbougacha added a commit to ahmedbougacha/llvm-project that referenced this pull request Nov 20, 2024
In swiftlang#9339/0614ff994a the behavior was partially reverted.
ahmedbougacha added a commit that referenced this pull request Dec 2, 2024
In #9339/0614ff994a the behavior was partially reverted.
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.

2 participants