]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gas/config/tc-avr.h
AVR: Only set link-relax elf flag when appropriate.
authorAndrew Burgess <andrew.burgess@embecosm.com>
Sat, 22 Nov 2014 23:19:31 +0000 (23:19 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 23 Dec 2014 15:45:11 +0000 (15:45 +0000)
commiteac7440d805bec68f583db395aa42c38615daf14
treee93db6bdf6f377b7edb83726e1228a73d1ea960e
parentc01feb367543270196672dedf9a8365a2d8d3cff
AVR: Only set link-relax elf flag when appropriate.

The AVR target uses a bit in the elf header flags to indicate if the
object was assembled ready for linker relaxation.  Previously this flag
was always set, even when the object was not assembled ready for linker
relaxation.

This patch moves setting of the flag into the assembler, and sets it
only when the assembler is preparing the file for linker relaxation.

bfd/ChangeLog:

* elf32-avr.c (bfd_elf_avr_final_write_processing): Don't set
EF_AVR_LINKRELAX_PREPARED unconditionally.

gas/ChangeLog:

* config/tc-avr.c: Add include for elf/avr.h.
(avr_elf_final_processing): New function.
* config/tc-avr.h (elf_tc_final_processing): Define.
(avr_elf_final_processing): Declare

gas/testsuite/ChangeLog:

* gas/avr/link-relax-elf-flag-clear.d: New file.
* gas/avr/link-relax-elf-flag-set.d: New file.
* gas/avr/link-relax-elf-flag.s: New file.
bfd/ChangeLog
bfd/elf32-avr.c
gas/ChangeLog
gas/config/tc-avr.c
gas/config/tc-avr.h
gas/testsuite/ChangeLog
gas/testsuite/gas/avr/link-relax-elf-flag-clear.d [new file with mode: 0644]
gas/testsuite/gas/avr/link-relax-elf-flag-set.d [new file with mode: 0644]
gas/testsuite/gas/avr/link-relax-elf-flag.s [new file with mode: 0644]