Start mass upgrade
[dragora.git] / patches / binutils / 2.35 / binutils-gas-auto-dwarf-5.patch
blob526b44f61428c781a8b4e8569eb2400dd67b9107
1 --- binutils.orig/gas/dwarf2dbg.c 2021-01-18 15:02:20.322260068 +0000
2 +++ binutils-2.35.1/gas/dwarf2dbg.c 2021-01-18 15:04:20.078481127 +0000
3 @@ -537,7 +537,11 @@ dwarf2_gen_line_info (addressT ofs, stru
4 if (loc->line == 0)
5 return;
6 if (loc->filenum == 0 && DWARF2_LINE_VERSION < 5)
7 - return;
8 + {
9 + dwarf_level = 5;
10 + if (DWARF2_LINE_VERSION < 5)
11 + return;
12 + }
14 /* Don't emit sequences of line symbols for the same line when the
15 symbols apply to assembler code. It is necessary to emit
16 @@ -1030,9 +1034,13 @@ dwarf2_directive_filename (void)
18 if ((offsetT) num < 1 && DWARF2_LINE_VERSION < 5)
20 - as_bad (_("file number less than one"));
21 - ignore_rest_of_line ();
22 - return NULL;
23 + dwarf_level = 5;
24 + if (DWARF2_LINE_VERSION < 5)
25 + {
26 + as_bad (_("file number less than one"));
27 + ignore_rest_of_line ();
28 + return NULL;
29 + }
32 /* FIXME: Should we allow ".file <N>\n" as an expression meaning
33 @@ -1129,8 +1137,12 @@ dwarf2_directive_loc (int dummy ATTRIBUT
35 if (filenum != 0 || DWARF2_LINE_VERSION < 5)
37 - as_bad (_("file number less than one"));
38 - return;
39 + dwarf_level = 5;
40 + if (DWARF2_LINE_VERSION < 5)
41 + {
42 + as_bad (_("file number less than one"));
43 + return;
44 + }