Also fix a place where %lld was wrongly used to print a dwarf_vma.
* configure.ac: Check for long long and sizes of long long and long.
* elfcomm.h (HOST_WIDEST_INT): Test HAVE_LONG_LONG in place of
__STDC_VERSION__ and __GNUC__.
* strings.c (print_strings): Likewise.
* dwarf.c (DWARF_VMA_FMT, DWARF_VMA_FMT_LONG): Likewise.
(read_debug_line_header): Use dwarf_vmatoa to print warning.
* configure: Regenerate.
* config.in: Regenerate.
PR binutils/17531
* dwarf.c (process_cu_tu_index): Check for an out of range row
index.
* elfcomm.c (adjust_relative_path): Change name_len parameter to
an unsigned long. Check for path length overflow.
(process_archive_index_and_symbols): Check for invalid header
size.
(setup_archive): Add checks for invalid archives.
(get_archive_member_name): Add range checks.
* elfcomm.h (adjust_relative_path): Update prototyoe.
* readelf.c (process_archive): Add range checks.
scanning code into...
(process_archive_index_and_symbols): ... this function and add
support for 64-bit index tables.
* elfcomm.h (struct archive_info): Change type of index_num and
index_array to elf_vma.
Add 'uses_64bit_indicies' field.
* readelf.c (process_archive): Fix support for 64-bit indicies.
(read_and_display_attr_value): Print 8-byte forms as single hex
numbers.
(process_debug_info): Print type signatures as single hex numbers.
* elfcomm.c (byte_get_64): New function.
* elfcomm.h (byte_get_64): New function.