-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
[AVR] Disable passing of he '--eh-frame-hdr' argument to the linker #74625
[AVR] Disable passing of he '--eh-frame-hdr' argument to the linker #74625
Conversation
In general, the GNU AVR linker that is distributed does not support this flag. On Arch Linux, the most recently distributed version of avr-ld corresponds to binutils 2.34, which is the most recent version of binutils as of today (2020-07-22), however - it still does not list this argument in its --help list compared to the host LD, which does. As AVR has no exception handling support, the exception handling frame header argument is redundant. This patch disables passing of the '--eh-frame-hdr' argument to avr-ld, similar to the existing exclusions (i.e. Windows, Solaris, UEFI).
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
I'm not sure how to test this one without invoking the GNU AVR linker directly in a test whose purpose is simply to go through the whole processed and be linked correctly. It doesn't feel right to assume the presence of an esoteric GNU linker in the Rust compile suite. This change is fairly small and low risk so it may be fine to go through without an explicit test. Advice and thoughts appreciated. |
Ok, it's not the first |
Superseded by #74631. |
rustc_target: Add a target spec option for disabling `--eh-frame-hdr` Disable `--eh-frame-hdr` for targets that use an `ld`-like linker, but don't support that option. Do it through a target spec option rather than through hard-coding in `linker.rs`. The option is still enabled by default though. cc rust-lang#73564 Fixes rust-lang#73564 (comment) Fixes rust-lang#74625 Fixes rust-embedded/msp430-rt#12
rustc_target: Add a target spec option for disabling `--eh-frame-hdr` Disable `--eh-frame-hdr` for targets that use an `ld`-like linker, but don't support that option. Do it through a target spec option rather than through hard-coding in `linker.rs`. The option is still enabled by default though. cc rust-lang#73564 Fixes rust-lang#73564 (comment) Fixes rust-lang#74625 Fixes rust-embedded/msp430-rt#12
rustc_target: Add a target spec option for disabling `--eh-frame-hdr` Disable `--eh-frame-hdr` for targets that use an `ld`-like linker, but don't support that option. Do it through a target spec option rather than through hard-coding in `linker.rs`. The option is still enabled by default though. cc rust-lang#73564 Fixes rust-lang#73564 (comment) Fixes rust-lang#74625 Fixes rust-embedded/msp430-rt#12
rustc_target: Add a target spec option for disabling `--eh-frame-hdr` Disable `--eh-frame-hdr` for targets that use an `ld`-like linker, but don't support that option. Do it through a target spec option rather than through hard-coding in `linker.rs`. The option is still enabled by default though. cc rust-lang#73564 Fixes rust-lang#73564 (comment) Fixes rust-lang#74625 Fixes rust-embedded/msp430-rt#12
rustc_target: Add a target spec option for disabling `--eh-frame-hdr` Disable `--eh-frame-hdr` for targets that use an `ld`-like linker, but don't support that option. Do it through a target spec option rather than through hard-coding in `linker.rs`. The option is still enabled by default though. cc rust-lang#73564 Fixes rust-lang#73564 (comment) Fixes rust-lang#74625 Fixes rust-embedded/msp430-rt#12
In general, the GNU AVR linker that is distributed does not support this flag.
On Arch Linux, the most recently distributed version of avr-ld
corresponds to binutils 2.34, which is the most recent version of
binutils as of today (2020-07-22), however - it still does not list
this argument in its --help list compared to the host LD, which does.
As AVR has no exception handling support, the exception handling frame header
argument is redundant. This patch disables passing of the '--eh-frame-hdr' argument
to avr-ld, similar to the existing exclusions (i.e. Windows, Solaris,
UEFI).