[AVR] Disable passing of he '--eh-frame-hdr' argument to the linker#74625
Closed
dylanmckay wants to merge 1 commit intorust-lang:masterfrom
Closed
[AVR] Disable passing of he '--eh-frame-hdr' argument to the linker#74625dylanmckay wants to merge 1 commit intorust-lang:masterfrom
dylanmckay wants to merge 1 commit intorust-lang:masterfrom
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).
Contributor
|
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
Contributor
Author
|
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. |
Contributor
|
Ok, it's not the first |
Contributor
|
Superseded by #74631. |
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Jul 22, 2020
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
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Jul 22, 2020
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
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Jul 22, 2020
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
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Jul 22, 2020
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
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Jul 22, 2020
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).