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

Remove options.RelaxELFRelocations #8147

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

MaskRay
Copy link
Contributor

@MaskRay MaskRay commented Mar 8, 2024

This TargetOption controls whether LLVM should enable
R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX relocations, which are
supported by GNU ld >= 2.26, which is considered a very old release now.
Setting the option to false is no longer necessary.

@MaskRay MaskRay mentioned this pull request Mar 8, 2024
This `TargetOption` controls whether LLVM should enable
R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX relocations,
which are supported by GNU ld versions newer than 2015.
Setting the option to false is no longer necessary.
@abadams
Copy link
Member

abadams commented Mar 8, 2024

Do you know what the gnu ld version is that introduced support? Keeping a few lines of code in to keep working with whatever ancient ld someone is using in some obscure toolchain seems worthwhile to me. Unless there's some performance benefit to relaxing relocations? I'm not sure what that even means.

@MaskRay
Copy link
Contributor Author

MaskRay commented Mar 8, 2024

binutils 2.26, released in Jan 2016.

In 2020, I changed clang cmake option ENABLE_X86_RELAX_RELOCATIONS to default to on:
llvm/llvm-project@c41a18c

Setting the option to false makes less sense after 3.5 years...

@abadams
Copy link
Member

abadams commented Mar 8, 2024

It's a bit different. You wouldn't expect to build LLVM itself, or link to LLVM on some weird old crufty embedded system from 10 years ago with a bespoke toolchain. But you may well want to produce object files with an AOT usage of libHalide that work with such an ancient toolchain. libHalide isn't compiled and run on embedded platforms, but the object files we produce absolutely are. Hell, we even still support x86-32 on linux.

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.

None yet

2 participants