OAv2 merge: translate GNU properties to Object Attributes v2 (and vice versa)

Some input objects may contain inconsistencies, i.e. they might include
GNU properties but lack the corresponding object attributes, or inversely.
The later case is never produced by Gas, but the former can occur with
older Gas versions that do not support object attributes.

To keep consistency during the merge process, each input object's GNU
properties are translated into their object attributes equivalents (if
they exists). Also, after object attributes have been merged at the file
scope, they are translated back to GNU properties to keep the GNU
properties merge process consistent. This final translation occurs before
merging the input with the global merge accumulator (a.k.a. REF) and the
global configuration (a.k.a FROZEN).

Note: the first parameter of translate_obj_attrs_to_gnu_props(), bfd *,
should be 'const', but this implies that _bfd_elf_get_property() should
also be constified, and this is out of scope.
3 files changed