]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - binutils/patches/binutils-2.24-DW_FORM_ref_addr.patch0
binutils: Update to 2.24
[people/ms/ipfire-3.x.git] / binutils / patches / binutils-2.24-DW_FORM_ref_addr.patch0
1 *** ../binutils-2.24.orig/bfd/dwarf2.c 2014-01-28 11:58:02.072737296 +0000
2 --- bfd/dwarf2.c 2014-01-28 11:59:38.575739971 +0000
3 *************** find_abstract_instance_name (struct comp
4 *** 2126,2131 ****
5 --- 2126,2153 ----
6 abort ();
7
8 info_ptr = unit->sec_info_ptr + die_ref;
9 +
10 + /* Now find the CU containing this pointer. */
11 + if (info_ptr >= unit->info_ptr_unit && info_ptr < unit->end_ptr)
12 + ;
13 + else
14 + {
15 + /* Check other CUs to see if they contain the abbrev. */
16 + struct comp_unit * u;
17 +
18 + for (u = unit->prev_unit; u != NULL; u = u->prev_unit)
19 + if (info_ptr >= u->info_ptr_unit && info_ptr < u->end_ptr)
20 + break;
21 +
22 + if (u == NULL)
23 + for (u = unit->next_unit; u != NULL; u = u->next_unit)
24 + if (info_ptr >= u->info_ptr_unit && info_ptr < u->end_ptr)
25 + break;
26 +
27 + if (u)
28 + unit = u;
29 + /* else FIXME: What do we do now ? */
30 + }
31 }
32 else if (attr_ptr->form == DW_FORM_GNU_ref_alt)
33 {
34 *************** find_abstract_instance_name (struct comp
35 *** 2137,2142 ****
36 --- 2159,2166 ----
37 bfd_set_error (bfd_error_bad_value);
38 return name;
39 }
40 + /* FIXME: Do we need to locate the correct CU, in a similar
41 + fashion to the code in the DW_FORM_ref_addr case above ? */
42 }
43 else
44 info_ptr = unit->info_ptr_unit + die_ref;