diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2014-10-27 10:51:17 +0000 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2014-12-24 21:27:43 +0000 |
commit | edc9e9a62fddb2745093c1edafd0a2310e79a579 (patch) | |
tree | 81a642dfe874d9cd45231e926081ecabed3cbfc5 /ld/testsuite | |
parent | This patch fixes a snafu where the -D and -U short versions of the (diff) | |
download | binutils-gdb-edc9e9a62fddb2745093c1edafd0a2310e79a579.tar.gz binutils-gdb-edc9e9a62fddb2745093c1edafd0a2310e79a579.tar.bz2 binutils-gdb-edc9e9a62fddb2745093c1edafd0a2310e79a579.zip |
AVR: Assembler now prepares for linker relaxation by default.
Have the assembler prepare for linker relaxation by default. This
means that users will be able to make use of linker relaxation without
having to adjust the assembler flags, this can make life easier when
compiling libraries.
Having this on by default in the assembler should make no difference to
the assembler code produced, however, some of the debug information will
be slightly less compressed.
A few tests needed to be updated as a result of this change as they
relied on linker relaxation support being off by default.
I've tightened up the definition of which sections can be relaxed on AVR
as part of this commit, the assembler used to think that all
non-debugging sections could be relaxed, when in reality only code
sections can be relaxed for AVR. The previous definition was not
dangerous, just over cautious. The new tighter definition allows an
extra test (gas/testsuite/gas/all/forward.d) to continue to pass.
gas/ChangeLog:
* config/tc-avr.c (struct avr_opt_s): Change link_relax to
no_link_relax, extend comment.
(enum options): Add new OPTION_NO_LINK_RELAX.
(md_longopts): Add entry for -mno-link-relax.
(md_parse_option): Handle OPTION_NO_LINK_RELAX, and update
OPTION_LINK_RELAX.
(md_begin): Initialise linkrelax from no_link_relax.
(md_show_usage): Include -mno-link-relax option.
(relaxable_section): Only allocatable code sections can be
relaxed.
* config/tc-avr.h (TC_LINKRELAX_FIXUP): Define.
gas/testsuite/ChangeLog:
* gas/all/gas.exp: Test will not pass on AVR due to linker
relaxation support.
* gas/avr/noreloc_withoutrelax.d: Add -mno-link-relax option.
* gas/avr/link-relax-elf-flag-clear.d: Likewise.
ld/testsuite/ChangeLog:
* ld/testsuite/ld-avr/relax-elf-flags-02.d: Add -mno-link-relax
option.
* ld/testsuite/ld-avr/relax-elf-flags-03.d: Likewise.
* ld/testsuite/ld-avr/relax-elf-flags-04.d: Likewise.
* ld/testsuite/ld-avr/relax-elf-flags-05.d: Likewise.
* ld/testsuite/ld-avr/relax-elf-flags-06.d: Likewise.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | ld/testsuite/ld-avr/relax-elf-flags-02.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-avr/relax-elf-flags-03.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-avr/relax-elf-flags-04.d | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-avr/relax-elf-flags-05.d | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-avr/relax-elf-flags-06.d | 2 |
6 files changed, 16 insertions, 7 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 628c9068dbb..d987267775c 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2014-12-24 Andrew Burgess <andrew.burgess@embecosm.com> + + * ld/testsuite/ld-avr/relax-elf-flags-02.d: Add -mno-link-relax + option. + * ld/testsuite/ld-avr/relax-elf-flags-03.d: Likewise. + * ld/testsuite/ld-avr/relax-elf-flags-04.d: Likewise. + * ld/testsuite/ld-avr/relax-elf-flags-05.d: Likewise. + * ld/testsuite/ld-avr/relax-elf-flags-06.d: Likewise. + 2014-12-24 Alan Modra <amodra@gmail.com> * ld-scripts/defined6.s, diff --git a/ld/testsuite/ld-avr/relax-elf-flags-02.d b/ld/testsuite/ld-avr/relax-elf-flags-02.d index 6a008bd8e61..c4d76605b17 100644 --- a/ld/testsuite/ld-avr/relax-elf-flags-02.d +++ b/ld/testsuite/ld-avr/relax-elf-flags-02.d @@ -1,7 +1,7 @@ #name: AVR, check link-relax flag is clear on partial link (first file) #as: -mmcu=avrxmega2 #ld: -r -mavrxmega2 -#source: relax-elf-flags-a.s +#source: relax-elf-flags-a.s -mno-link-relax #source: relax-elf-flags-b.s -mlink-relax #readelf: -h #target: avr-*-* diff --git a/ld/testsuite/ld-avr/relax-elf-flags-03.d b/ld/testsuite/ld-avr/relax-elf-flags-03.d index 3d2a70df212..c75c1dfd499 100644 --- a/ld/testsuite/ld-avr/relax-elf-flags-03.d +++ b/ld/testsuite/ld-avr/relax-elf-flags-03.d @@ -2,7 +2,7 @@ #as: -mmcu=avrxmega2 #ld: -r -mavrxmega2 #source: relax-elf-flags-a.s -mlink-relax -#source: relax-elf-flags-b.s +#source: relax-elf-flags-b.s -mno-link-relax #readelf: -h #target: avr-*-* diff --git a/ld/testsuite/ld-avr/relax-elf-flags-04.d b/ld/testsuite/ld-avr/relax-elf-flags-04.d index e2a9bb6fdf2..8fa45742011 100644 --- a/ld/testsuite/ld-avr/relax-elf-flags-04.d +++ b/ld/testsuite/ld-avr/relax-elf-flags-04.d @@ -1,8 +1,8 @@ #name: AVR, check link-relax flag is clear on partial link (both files) #as: -mmcu=avrxmega2 #ld: -r -mavrxmega2 -#source: relax-elf-flags-a.s -#source: relax-elf-flags-b.s +#source: relax-elf-flags-a.s -mno-link-relax +#source: relax-elf-flags-b.s -mno-link-relax #readelf: -h #target: avr-*-* diff --git a/ld/testsuite/ld-avr/relax-elf-flags-05.d b/ld/testsuite/ld-avr/relax-elf-flags-05.d index 8c41e8d6230..de62bbbd432 100644 --- a/ld/testsuite/ld-avr/relax-elf-flags-05.d +++ b/ld/testsuite/ld-avr/relax-elf-flags-05.d @@ -1,8 +1,8 @@ #name: AVR, check link-relax flag is set final link (no inputs relaxable) #as: -mmcu=avrxmega2 #ld: -relax -mavrxmega2 -#source: relax-elf-flags-a.s -#source: relax-elf-flags-b.s +#source: relax-elf-flags-a.s -mno-link-relax +#source: relax-elf-flags-b.s -mno-link-relax #readelf: -h #target: avr-*-* diff --git a/ld/testsuite/ld-avr/relax-elf-flags-06.d b/ld/testsuite/ld-avr/relax-elf-flags-06.d index 5d8e3c11831..5a8e8107e22 100644 --- a/ld/testsuite/ld-avr/relax-elf-flags-06.d +++ b/ld/testsuite/ld-avr/relax-elf-flags-06.d @@ -2,7 +2,7 @@ #as: -mmcu=avrxmega2 #ld: -relax -mavrxmega2 #source: relax-elf-flags-a.s -mlink-relax -#source: relax-elf-flags-b.s +#source: relax-elf-flags-b.s -mno-link-relax #readelf: -h #target: avr-*-* |