Assembler now prepares for linker relaxation by default.

Have the assembler prepare for linker relaxation by default.  This
ensures that assembler output can safely be used for linker relaxation
without corrupting the debug information (for example).

A few tests needed to be updated as a result of this change.

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 SEG_NORMAL sections containing
	allocatable code are relaxable.
	* config/tc-avr.h (TC_LINKRELAX_FIXUP): Define.
	* testsuite/gas/all/gas.exp: Test will not pass on AVR due to
	linker relaxation.
	* testsuite/gas/avr/noreloc_withoutrelax.d: Extra flag is needed
	to turn off linker relaxation support.
Add string representation of ELF e_flags for AVR.

binutils/ChangeLog:

	* readelf.c (decode_AVR_machine_flags): New function.
	(get_machine_flags): Add EM_AVR case.
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.
AVR/ld: Propagate link-relax elf header flag correctly.

The AVR target has an elf header flag to indicate if an object was
assembler ready for linker relaxation.  If a partial link is performed
then it is important that the link-relax flag in the output object is
set correctly, otherwise, during the final link, we might try to perform
linker relaxation on code that was not assembled suitably.

As the link-relax elf header covers the entire object file we must be
conservative when setting the flag in the output object, so, for a
partial link, any input object that does not have the link-relax flag
set will cause the output object to also not have the link-relax flag
set.

This conservative approach could be softened in future, we only need to
disable the link relax flag if an input file is not marked link-relax
ready, and the input file contains a relaxable section.  However, I've
left this optimisation for a later day.

For the final link I've overloaded the use of the link-relax elf header
flag, in a final executable, the flag now indicates if the executable
was built with linker relaxation on or not.

ld/ChangeLog:

	* emultempl/avrelf.em: Add include of elf/avr.h.
	(avr_finish): New function.
	(LDEMUL_FINISH): Added.

ld/testsuite/ChangeLog:

	* ld-avr/relax-elf-flags-01.d: New file.
	* ld-avr/relax-elf-flags-02.d: New file.
	* ld-avr/relax-elf-flags-03.d: New file.
	* ld-avr/relax-elf-flags-04.d: New file.
	* ld-avr/relax-elf-flags-05.d: New file.
	* ld-avr/relax-elf-flags-06.d: New file.
	* ld-avr/relax-elf-flags-07.d: New file.
	* ld-avr/relax-elf-flags-08.d: New file.
	* ld-avr/relax-elf-flags-a.s: New file.
	* ld-avr/relax-elf-flags-b.s: New file.
gas: Initial support for .org / .align with linker relaxation.

This is a prototype for supporting .org and .align for AVR with linker
relaxation.  The first step is collecting information in the assembler
and packaging it up to pass to the linker.

This patch tries to do this collection of information, and writes out
the data into a support section ready for the linker to consume.

This work is not complete, and requires more development, cleanup, and
testing.
objdump: Add support for printing out .avr.prop.

This adds a hook for dumping the contents of .avr.prop in a structured
way.
First stage of using directive data.

Reads the data in an associates it with the section to which the data
applies.  Still no use is currently made of the data.

Make use of directive data.

This uses the .org and .align directive data to ensure that these
directives are left in place.
This is the simplest use of this data to achieve a correct result.  We
can do better in the case of alignment, but in order to achieve this
we'll need to gather all the deletions together and execute them in one
go.  This will require further reworking.

Add support for .align directives.

Now support for moving .align directives backwards if we've deleted
enough bytes before the directive that the alignment requirement can
still be maintained.

merge with c17fce3b8832cec9a33c1861e78cd6f7730aa93a

merge with c17fce3b8832cec9a33c1861e78cd6f7730aa93a