* elf64-sparc.c (sparc64_elf_merge_private_bfd_data):
New function. Avoid mixing US1 and HAL R1 code.
Set resulting memory ordering to the strongest one used.
(sparc64_elf_object_p): Set bfd_mach correctly.
(sparc64_elf_check_relocs): Handle them.
(sparc64_elf_relocate_section): Likewise. Before emitting a dyn reloc,
check alignment and transmute R_SPARC_x<->R_SPARC_UAx.
* elf-bfd.h (struct elf_backend_data): Add plt_alignment member.
* elflink.c (_bfd_elf_create_got_section): Set .got alignment based
on arch_size.
(_bfd_elf_create_dynamic_sections): Likewise for .rel* sections.
Set .plt alignment from new plt_alignment.
* elflink.h (elf_link_create_dynamic_sections): Set version section
alignment to LOG_FILE_ALIGN.
* elfxx-target.h (elf_backend_plt_alignment): Provide default.
(elfXX_bed): Init plt_alignment.
* elf64-sparc.c (sparc64_elf_check_relocs,
sparc64_elf_adjust_dynamic_symbol, sparc64_elf_size_dynamic_sections,
sparc64_elf_adjust_dynindx, sparc64_elf_finish_dynamic_symbol,
sparc64_elf_finish_dynamic_sections): New functions.
(sparc64_elf_howto_table): Fix a few name strings.
(ELF_DYNAMIC_INTERPRETER): New definition.
(sparc64_elf_relocate_section): Handle shared libraries.
* elf64-sparc.c (struct plt_template, plt_*_header, plt_*_entry,
sparc64_elf_build_plt_entry, sparc64_elf_finish_dynamic_symbol):
PLT definitions sparc64-linux originally choose. These will go
away soon in favour of the official abi definitions.
Deleted `thunk' structure, merged into tdata, duplicate data eliminated.
Rearranged functions, grouping by function.
Broke up many functions in elfcode.h, re-ordered many parts of file writing
to handle unpredictable state of section relocation table as provided by
various applications.
Still needs cleanup: Merge functions back together, split out data structure
with only data that is used only when writing out object file.
* elf.c (bfd_elf_generic_reloc): New function, taken from coff-mips.c.
* elf32-sparc.c (elf_sparc_howto_table): Use it, to work around
bfd_perform_relocation lossage.