]> git.pld-linux.org Git - packages/binutils.git/blob - binutils-robustify2.patch
This commit was manufactured by cvs2git to create branch 'AC-branch'.
[packages/binutils.git] / binutils-robustify2.patch
1 2005-06-09  Jakub Jelinek  <jakub@redhat.com>
2
3         * objdump.c (disassemble_bytes): Don't crash if q->howto == NULL.
4         If q->howto->name == NULL, print q->howto->type as number instead.
5         (dump_reloc_set): Likewise.
6
7 --- binutils/objdump.c.jj       2005-05-13 23:44:24.000000000 +0200
8 +++ binutils/objdump.c  2005-06-06 14:20:48.000000000 +0200
9 @@ -1570,7 +1570,12 @@ disassemble_bytes (struct disassemble_in
10               objdump_print_value (section->vma - rel_offset + q->address,
11                                    info, TRUE);
12  
13 -             printf (": %s\t", q->howto->name);
14 +             if (q->howto == NULL)
15 +               printf (": *unknown*\t");
16 +             else if (q->howto->name)
17 +               printf (": %s\t", q->howto->name);
18 +             else
19 +               printf (": %d\t", q->howto->type);
20  
21               if (q->sym_ptr_ptr == NULL || *q->sym_ptr_ptr == NULL)
22                 printf ("*unknown*");
23 @@ -2465,23 +2470,20 @@ dump_reloc_set (bfd *abfd, asection *sec
24           section_name = NULL;
25         }
26  
27 +      bfd_printf_vma (abfd, q->address);
28 +      if (q->howto == NULL)
29 +       printf (" *unknown*         ");
30 +      else if (q->howto->name)
31 +       printf (" %-16s  ", q->howto->name);
32 +      else
33 +       printf (" %-16d  ", q->howto->type);
34        if (sym_name)
35 -       {
36 -         bfd_printf_vma (abfd, q->address);
37 -         if (q->howto->name)
38 -           printf (" %-16s  ", q->howto->name);
39 -         else
40 -           printf (" %-16d  ", q->howto->type);
41 -         objdump_print_symname (abfd, NULL, *q->sym_ptr_ptr);
42 -       }
43 +       objdump_print_symname (abfd, NULL, *q->sym_ptr_ptr);
44        else
45         {
46           if (section_name == NULL)
47             section_name = "*unknown*";
48 -         bfd_printf_vma (abfd, q->address);
49 -         printf (" %-16s  [%s]",
50 -                 q->howto->name,
51 -                 section_name);
52 +         printf ("[%s]", section_name);
53         }
54  
55        if (q->addend)
This page took 0.265738 seconds and 3 git commands to generate.