gas/ELF: re-work SHF_GNU_* handling

Indicate to obj_elf_parse_section_letters() whether to recognize GNU-
specific flags by conditionally passing NULL in place of a pointer to
the GNU attributes. This way wrong use of d and R can be diagnosed just
like any other use of unrecognized letters.

Furthermore adjust the md_elf_section_letter() interface: Have targets
merely return the extra letters they support. There's no point having
them customize the entire diagnostic. Even more so that additions in
common code would then reflecting in every target's diagnostic as well,
which - as can be seen - wasn't always properly done.

There's also no reason for wrong letters to be a fatal error; switch to
as_bad() while making other adjustments there.

While making the target specific adjustments, also drop IA-64's dead
handling of 'o' (SHF_LINK_ORDER), which has been covered by common code
for a long time.

Also re-arrange the switch() in obj_elf_parse_section_letters() to be
alphabetically sorted again.
7 files changed