Add --redefine-sym to objcopy.
[binutils-gdb.git] / binutils / readelf.c
index 2e4fdc7fee9b0e324b1a0b1fdadb76a9dad84718..050ef9c386eed68c978af2e6e11a253ee148d2e4 100644 (file)
@@ -23,6 +23,7 @@
 \f
 
 #include <assert.h>
+#include <sys/types.h>
 #include <sys/stat.h>
 #include <stdio.h>
 #include <time.h>
@@ -68,6 +69,7 @@
 #include "elf/mcore.h"
 #include "elf/i960.h"
 #include "elf/pj.h"
+#include "elf/avr.h"
 
 #include "bucomm.h"
 #include "getopt.h"
@@ -805,6 +807,10 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
          rtype = elf_i960_reloc_type (type);
          break;
 
+       case EM_AVR:
+         rtype = elf_avr_reloc_type (type);
+         break;
+
        case EM_OLD_SPARCV9:
        case EM_SPARC32PLUS:
        case EM_SPARCV9:
@@ -1694,7 +1700,7 @@ usage ()
   fprintf (stdout, _("  -I or --histogram         Display histogram of bucket list lengths\n"));
   fprintf (stdout, _("  -v or --version           Display the version number of readelf\n"));
   fprintf (stdout, _("  -H or --help              Display this information\n"));
-  fprintf (stdout, _("Report bugs to bug-gnu-utils@gnu.org\n"));
+  fprintf (stdout, _("Report bugs to %s\n"), REPORT_BUGS_TO);
 
   exit (0);
 }
@@ -3777,8 +3783,8 @@ process_version_sections (file)
                            {
                              Elf_External_Verneed   evn;
                              Elf_External_Vernaux   evna;
-                             Elf_Internal_Vernaux     ivna;
-                             unsigned long            vna_off;
+                             Elf_Internal_Vernaux   ivna;
+                             unsigned long          vna_off;
 
                              GET_DATA (offset, evn, "version need");
 
@@ -3876,10 +3882,10 @@ process_version_sections (file)
 
                          do
                            {
-                             Elf_Internal_Vernaux     ivna;
+                             Elf_Internal_Vernaux   ivna;
                              Elf_External_Verneed   evn;
                              Elf_External_Vernaux   evna;
-                             unsigned long            a_off;
+                             unsigned long          a_off;
 
                              GET_DATA (offset, evn, "version need");
 
@@ -4304,15 +4310,15 @@ process_symbol_table (file)
                          offset = version_info
                            [DT_VERSIONTAGIDX (DT_VERNEED)] - loadaddr;
 
-                         GET_DATA (offset, evn, "version need");
-
-                         ivn.vn_aux  = BYTE_GET (evn.vn_aux);
-                         ivn.vn_next = BYTE_GET (evn.vn_next);
-
                          do
                            {
                              unsigned long  vna_off;
 
+                             GET_DATA (offset, evn, "version need");
+
+                             ivn.vn_aux  = BYTE_GET (evn.vn_aux);
+                             ivn.vn_next = BYTE_GET (evn.vn_next);
+
                              vna_off = offset + ivn.vn_aux;
 
                              do