factor out mmix config into a separate file
[rofl0r-mmix-cross.git] / patches / elfutils-no_error.patch
blobcb48a617146a3c9c9c22ff99c74578b6ce87fb3e
1 diff -Naur elfutils-0.152.orig/lib/xmalloc.c elfutils-0.152/lib/xmalloc.c
2 --- elfutils-0.152.orig/lib/xmalloc.c 2010-06-29 04:09:31.000000000 +0000
3 +++ elfutils-0.152/lib/xmalloc.c 2012-05-29 07:20:04.012448966 +0000
4 @@ -27,7 +27,7 @@
5 # include <config.h>
6 #endif
8 -#include <error.h>
9 +#include <err.h>
10 #include <libintl.h>
11 #include <stddef.h>
12 #include <stdlib.h>
13 @@ -48,7 +48,7 @@
15 p = malloc (n);
16 if (p == NULL)
17 - error (EXIT_FAILURE, 0, _("memory exhausted"));
18 + err (EXIT_FAILURE, _("memory exhausted"));
19 return p;
22 @@ -62,7 +62,7 @@
24 p = calloc (n, s);
25 if (p == NULL)
26 - error (EXIT_FAILURE, 0, _("memory exhausted"));
27 + err (EXIT_FAILURE, _("memory exhausted"));
28 return p;
31 @@ -76,6 +76,6 @@
33 p = realloc (p, n);
34 if (p == NULL)
35 - error (EXIT_FAILURE, 0, _("memory exhausted"));
36 + err (EXIT_FAILURE, _("memory exhausted"));
37 return p;
39 diff -Naur elfutils-0.152.orig/libcpu/i386_gendis.c elfutils-0.152/libcpu/i386_gendis.c
40 --- elfutils-0.152.orig/libcpu/i386_gendis.c 2010-06-29 04:09:31.000000000 +0000
41 +++ elfutils-0.152/libcpu/i386_gendis.c 2012-05-29 07:25:01.733156774 +0000
42 @@ -28,7 +28,7 @@
43 # include <config.h>
44 #endif
46 -#include <error.h>
47 +#include <err.h>
48 #include <errno.h>
49 #include <stdio.h>
50 #include <stdlib.h>
51 @@ -48,9 +48,12 @@
52 main (int argc, char *argv[argc])
54 outfile = stdout;
55 + int count = 0;
57 - if (argc == 1)
58 - error (EXIT_FAILURE, 0, "usage: %s <MNEDEFFILE>", argv[0]);
59 + if (argc == 1) {
60 + err (EXIT_FAILURE, "usage: %s <MNEDEFFILE>", argv[0]);
61 + count++;
62 + }
64 //i386_debug = 1;
65 infname = argv[1];
66 @@ -59,11 +62,13 @@
67 else
69 i386_in = fopen (infname, "r");
70 - if (i386_in == NULL)
71 - error (EXIT_FAILURE, errno, "cannot open %s", argv[1]);
72 + if (i386_in == NULL) {
73 + err (EXIT_FAILURE, "cannot open %s", argv[1]);
74 + count++;
75 + }
78 i386_parse ();
80 - return error_message_count != 0;
81 + return count != 0;
83 diff -Naur elfutils-0.152.orig/libcpu/i386_lex.c elfutils-0.152/libcpu/i386_lex.c
84 --- elfutils-0.152.orig/libcpu/i386_lex.c 2011-02-15 14:28:54.000000000 +0000
85 +++ elfutils-0.152/libcpu/i386_lex.c 2012-05-29 07:34:45.432057642 +0000
86 @@ -567,7 +567,7 @@
87 #endif
89 #include <ctype.h>
90 -#include <error.h>
91 +#include <err.h>
92 #include <libintl.h>
94 #include <system.h>
95 @@ -1999,7 +1999,7 @@
96 static void
97 invalid_char (int ch)
99 - error (0, 0, (isascii (ch)
100 + err (0, (isascii (ch)
101 ? gettext ("invalid character '%c' at line %d; ignored")
102 : gettext ("invalid character '\\%o' at line %d; ignored")),
103 ch, i386_lineno);
104 diff -Naur elfutils-0.152.orig/libcpu/i386_lex.l elfutils-0.152/libcpu/i386_lex.l
105 --- elfutils-0.152.orig/libcpu/i386_lex.l 2010-06-29 04:09:31.000000000 +0000
106 +++ elfutils-0.152/libcpu/i386_lex.l 2012-05-29 07:26:26.040059610 +0000
107 @@ -28,7 +28,7 @@
108 #endif
110 #include <ctype.h>
111 -#include <error.h>
112 +#include <err.h>
113 #include <libintl.h>
115 #include <system.h>
116 @@ -115,7 +115,7 @@
117 static void
118 invalid_char (int ch)
120 - error (0, 0, (isascii (ch)
121 + err (0, (isascii (ch)
122 ? gettext ("invalid character '%c' at line %d; ignored")
123 : gettext ("invalid character '\\%o' at line %d; ignored")),
124 ch, yylineno);
125 diff -Naur elfutils-0.152.orig/libcpu/i386_parse.c elfutils-0.152/libcpu/i386_parse.c
126 --- elfutils-0.152.orig/libcpu/i386_parse.c 2011-02-15 14:28:54.000000000 +0000
127 +++ elfutils-0.152/libcpu/i386_parse.c 2012-05-29 07:39:24.822057670 +0000
128 @@ -109,7 +109,7 @@
129 #include <assert.h>
130 #include <ctype.h>
131 #include <errno.h>
132 -#include <error.h>
133 +#include <err.h>
134 #include <inttypes.h>
135 #include <libintl.h>
136 #include <math.h>
137 @@ -1607,9 +1607,6 @@
138 /* Line 1464 of yacc.c */
139 #line 245 "i386_parse.y"
141 - if (error_message_count != 0)
142 - error (EXIT_FAILURE, 0,
143 - "terminated due to previous error");
145 instrtable_out ();
147 @@ -1645,11 +1642,11 @@
148 newp->from = (yyvsp[(2) - (3)].str);
149 newp->to = (yyvsp[(3) - (3)].str);
150 if (tfind (newp, &synonyms, compare_syn) != NULL)
151 - error (0, 0,
152 + err (0,
153 "%d: duplicate definition for synonym '%s'",
154 i386_lineno, (yyvsp[(2) - (3)].str));
155 else if (tsearch ( newp, &synonyms, compare_syn) == NULL)
156 - error (EXIT_FAILURE, 0, "tsearch");
157 + err (EXIT_FAILURE, "tsearch");
159 break;
161 @@ -1661,7 +1658,7 @@
162 if ((yyvsp[(3) - (6)].field) != NULL && strcmp ((yyvsp[(3) - (6)].field)->name, "RE") != 0
163 && strcmp ((yyvsp[(3) - (6)].field)->name, "R") != 0)
165 - error (0, 0, "%d: only 'R' and 'RE' prefix allowed",
166 + err (0, "%d: only 'R' and 'RE' prefix allowed",
167 i386_lineno - 1);
169 if (check_duplicates ((yyvsp[(1) - (6)].bit)) == 0
170 @@ -1686,7 +1683,7 @@
172 if (tsearch ((yyvsp[(4) - (6)].str), &mnemonics,
173 (comparison_fn_t) strcmp) == NULL)
174 - error (EXIT_FAILURE, errno, "tsearch");
175 + err (EXIT_FAILURE, "tsearch");
176 ++nmnemonics;
179 @@ -1707,7 +1704,7 @@
180 else if (strcmp ((yyvsp[(5) - (6)].field)->name, "D") == 0)
181 newp->suffix = suffix_D;
182 else
183 - error (EXIT_FAILURE, 0,
184 + err (EXIT_FAILURE,
185 "%s: %d: unknown suffix '%s'",
186 infname, i386_lineno - 1, (yyvsp[(5) - (6)].field)->name);
188 @@ -1720,7 +1717,7 @@
189 ns->idx = ++nsuffixes;
190 if (tsearch (ns, &suffixes, compare_suf)
191 == NULL)
192 - error (EXIT_FAILURE, errno, "tsearch");
193 + err (EXIT_FAILURE, "tsearch");
197 @@ -1752,7 +1749,7 @@
198 res = tfind (&search, &bitfields, bitfield_compare);
199 if (res == NULL)
201 - error (0, 0, "%d: unknown bitfield '%s'",
202 + err (0, "%d: unknown bitfield '%s'",
203 i386_lineno, search.name);
204 (yyval.field) = NULL;
206 @@ -1849,7 +1846,7 @@
207 res = tfind (&search, &bitfields, bitfield_compare);
208 if (res == NULL)
210 - error (0, 0, "%d: unknown bitfield '%s'",
211 + err (0, "%d: unknown bitfield '%s'",
212 i386_lineno, search.name);
213 (yyval.bit)->type = failure;
215 @@ -1949,7 +1946,7 @@
216 (yyval.name)->field = &bx_reg;
217 else
219 - error (0, 0, "%d: unknown bitfield '%s'",
220 + err (0, "%d: unknown bitfield '%s'",
221 i386_lineno, search.name);
222 (yyval.name)->field = NULL;
224 @@ -2220,7 +2217,7 @@
225 static void
226 yyerror (const char *s)
228 - error (0, 0, gettext ("while reading i386 CPU description: %s at line %d"),
229 + err (0, gettext ("while reading i386 CPU description: %s at line %d"),
230 gettext (s), i386_lineno);
233 @@ -2245,14 +2242,14 @@
235 if (tfind (newp, &bitfields, bitfield_compare) != NULL)
237 - error (0, 0, "%d: duplicated definition of bitfield '%s'",
238 + err (0, "%d: duplicated definition of bitfield '%s'",
239 i386_lineno, name);
240 free (name);
241 return;
244 if (tsearch (newp, &bitfields, bitfield_compare) == NULL)
245 - error (EXIT_FAILURE, errno, "%d: cannot insert new bitfield '%s'",
246 + err (EXIT_FAILURE, "%d: cannot insert new bitfield '%s'",
247 i386_lineno, name);
250 @@ -2292,7 +2289,7 @@
252 obstack_1grow (&os, '\0');
254 - error (0, 0, "%d: field '%s' not a multiple of 8 bits in size",
255 + err (0, "%d: field '%s' not a multiple of 8 bits in size",
256 i386_lineno, (char *) obstack_finish (&os));
258 obstack_free (&os, NULL);
259 @@ -2313,7 +2310,7 @@
261 if (val->field->tmp == testcnt)
263 - error (0, 0, "%d: bitfield '%s' used more than once",
264 + err (0, "%d: bitfield '%s' used more than once",
265 i386_lineno - 1, val->field->name);
266 result = 1;
268 @@ -2350,7 +2347,7 @@
270 if (runp == NULL)
272 - error (0, 0, "%d: unknown bitfield '%s' used in output format",
273 + err (0, "%d: unknown bitfield '%s' used in output format",
274 i386_lineno - 1, name->field->name);
275 result = 1;
277 @@ -2394,7 +2391,7 @@
278 #if 0
279 if (runp == NULL)
281 - error (0, 0, "%d: bitfield '%s' not used",
282 + err (0, "%d: bitfield '%s' not used",
283 i386_lineno - 1, bitval->field->name);
284 result = 1;
286 @@ -2457,7 +2454,7 @@
287 if (runp->type == string)
289 if (instr->operands[n].str != NULL)
290 - error (EXIT_FAILURE, 0,
291 + err (EXIT_FAILURE,
292 "%d: cannot have more than one string parameter",
293 i386_lineno - 1);
295 @@ -2511,7 +2508,7 @@
296 else if (instr->operands[n].off3 == 0)
297 instr->operands[n].off3 = bitoff;
298 else
299 - error (EXIT_FAILURE, 0,
300 + err (EXIT_FAILURE,
301 "%d: cannot have more than three fields in parameter",
302 i386_lineno - 1);
304 @@ -2587,7 +2584,7 @@
305 newp->str = runp->operands[i].fct;
306 newp->idx = 0;
307 if (tsearch (newp, &fct_names[i], compare_argstring) == NULL)
308 - error (EXIT_FAILURE, errno, "tsearch");
309 + err (EXIT_FAILURE, "tsearch");
310 ++nfct_names[i];
313 @@ -2600,7 +2597,7 @@
314 newp->str = runp->operands[i].str;
315 newp->idx = 0;
316 if (tsearch (newp, &strs[i], compare_argstring) == NULL)
317 - error (EXIT_FAILURE, errno, "tsearch");
318 + err (EXIT_FAILURE, "tsearch");
319 ++nstrs[i];
322 diff -Naur elfutils-0.152.orig/libcpu/i386_parse.y elfutils-0.152/libcpu/i386_parse.y
323 --- elfutils-0.152.orig/libcpu/i386_parse.y 2010-06-29 04:09:31.000000000 +0000
324 +++ elfutils-0.152/libcpu/i386_parse.y 2012-05-29 07:34:21.204144089 +0000
325 @@ -31,7 +31,7 @@
326 #include <assert.h>
327 #include <ctype.h>
328 #include <errno.h>
329 -#include <error.h>
330 +#include <err.h>
331 #include <inttypes.h>
332 #include <libintl.h>
333 #include <math.h>
334 @@ -243,10 +243,6 @@
336 spec: masks kPERCPERC '\n' instrs
338 - if (error_message_count != 0)
339 - error (EXIT_FAILURE, 0,
340 - "terminated due to previous error");
342 instrtable_out ();
345 @@ -267,11 +263,11 @@
346 newp->from = $2;
347 newp->to = $3;
348 if (tfind (newp, &synonyms, compare_syn) != NULL)
349 - error (0, 0,
350 + err (0, 0,
351 "%d: duplicate definition for synonym '%s'",
352 i386_lineno, $2);
353 else if (tsearch ( newp, &synonyms, compare_syn) == NULL)
354 - error (EXIT_FAILURE, 0, "tsearch");
355 + err (EXIT_FAILURE, "tsearch");
359 @@ -285,7 +281,7 @@
360 if ($3 != NULL && strcmp ($3->name, "RE") != 0
361 && strcmp ($3->name, "R") != 0)
363 - error (0, 0, "%d: only 'R' and 'RE' prefix allowed",
364 + err (0, "%d: only 'R' and 'RE' prefix allowed",
365 i386_lineno - 1);
367 if (check_duplicates ($1) == 0
368 @@ -310,7 +306,7 @@
370 if (tsearch ($4, &mnemonics,
371 (comparison_fn_t) strcmp) == NULL)
372 - error (EXIT_FAILURE, errno, "tsearch");
373 + err (EXIT_FAILURE, "tsearch");
374 ++nmnemonics;
377 @@ -331,7 +327,7 @@
378 else if (strcmp ($5->name, "D") == 0)
379 newp->suffix = suffix_D;
380 else
381 - error (EXIT_FAILURE, 0,
382 + err (EXIT_FAILURE,
383 "%s: %d: unknown suffix '%s'",
384 infname, i386_lineno - 1, $5->name);
386 @@ -344,7 +340,7 @@
387 ns->idx = ++nsuffixes;
388 if (tsearch (ns, &suffixes, compare_suf)
389 == NULL)
390 - error (EXIT_FAILURE, errno, "tsearch");
391 + err (EXIT_FAILURE, "tsearch");
395 @@ -374,7 +370,7 @@
396 res = tfind (&search, &bitfields, bitfield_compare);
397 if (res == NULL)
399 - error (0, 0, "%d: unknown bitfield '%s'",
400 + err (0, "%d: unknown bitfield '%s'",
401 i386_lineno, search.name);
402 $$ = NULL;
404 @@ -437,7 +433,7 @@
405 res = tfind (&search, &bitfields, bitfield_compare);
406 if (res == NULL)
408 - error (0, 0, "%d: unknown bitfield '%s'",
409 + err (0, "%d: unknown bitfield '%s'",
410 i386_lineno, search.name);
411 $$->type = failure;
413 @@ -509,7 +505,7 @@
414 $$->field = &bx_reg;
415 else
417 - error (0, 0, "%d: unknown bitfield '%s'",
418 + err (0, "%d: unknown bitfield '%s'",
419 i386_lineno, search.name);
420 $$->field = NULL;
422 @@ -549,7 +545,7 @@
423 static void
424 yyerror (const char *s)
426 - error (0, 0, gettext ("while reading i386 CPU description: %s at line %d"),
427 + err (0, gettext ("while reading i386 CPU description: %s at line %d"),
428 gettext (s), i386_lineno);
431 @@ -574,14 +570,14 @@
433 if (tfind (newp, &bitfields, bitfield_compare) != NULL)
435 - error (0, 0, "%d: duplicated definition of bitfield '%s'",
436 + err (0, "%d: duplicated definition of bitfield '%s'",
437 i386_lineno, name);
438 free (name);
439 return;
442 if (tsearch (newp, &bitfields, bitfield_compare) == NULL)
443 - error (EXIT_FAILURE, errno, "%d: cannot insert new bitfield '%s'",
444 + err (EXIT_FAILURE, "%d: cannot insert new bitfield '%s'",
445 i386_lineno, name);
448 @@ -621,7 +617,7 @@
450 obstack_1grow (&os, '\0');
452 - error (0, 0, "%d: field '%s' not a multiple of 8 bits in size",
453 + err (0, "%d: field '%s' not a multiple of 8 bits in size",
454 i386_lineno, (char *) obstack_finish (&os));
456 obstack_free (&os, NULL);
457 @@ -642,7 +638,7 @@
459 if (val->field->tmp == testcnt)
461 - error (0, 0, "%d: bitfield '%s' used more than once",
462 + err (0, "%d: bitfield '%s' used more than once",
463 i386_lineno - 1, val->field->name);
464 result = 1;
466 @@ -679,7 +675,7 @@
468 if (runp == NULL)
470 - error (0, 0, "%d: unknown bitfield '%s' used in output format",
471 + err (0, "%d: unknown bitfield '%s' used in output format",
472 i386_lineno - 1, name->field->name);
473 result = 1;
475 @@ -723,7 +719,7 @@
476 #if 0
477 if (runp == NULL)
479 - error (0, 0, "%d: bitfield '%s' not used",
480 + err (0, "%d: bitfield '%s' not used",
481 i386_lineno - 1, bitval->field->name);
482 result = 1;
484 @@ -786,7 +782,7 @@
485 if (runp->type == string)
487 if (instr->operands[n].str != NULL)
488 - error (EXIT_FAILURE, 0,
489 + err (EXIT_FAILURE,
490 "%d: cannot have more than one string parameter",
491 i386_lineno - 1);
493 @@ -840,7 +836,7 @@
494 else if (instr->operands[n].off3 == 0)
495 instr->operands[n].off3 = bitoff;
496 else
497 - error (EXIT_FAILURE, 0,
498 + err (EXIT_FAILURE,
499 "%d: cannot have more than three fields in parameter",
500 i386_lineno - 1);
502 @@ -916,7 +912,7 @@
503 newp->str = runp->operands[i].fct;
504 newp->idx = 0;
505 if (tsearch (newp, &fct_names[i], compare_argstring) == NULL)
506 - error (EXIT_FAILURE, errno, "tsearch");
507 + err (EXIT_FAILURE, "tsearch");
508 ++nfct_names[i];
511 @@ -929,7 +925,7 @@
512 newp->str = runp->operands[i].str;
513 newp->idx = 0;
514 if (tsearch (newp, &strs[i], compare_argstring) == NULL)
515 - error (EXIT_FAILURE, errno, "tsearch");
516 + err (EXIT_FAILURE, "tsearch");
517 ++nstrs[i];
520 diff -Naur elfutils-0.152.orig/libdw/libdw_alloc.c elfutils-0.152/libdw/libdw_alloc.c
521 --- elfutils-0.152.orig/libdw/libdw_alloc.c 2010-06-29 04:09:31.000000000 +0000
522 +++ elfutils-0.152/libdw/libdw_alloc.c 2012-05-29 07:20:04.013112718 +0000
523 @@ -52,7 +52,7 @@
524 # include <config.h>
525 #endif
527 -#include <error.h>
528 +#include <err.h>
529 #include <errno.h>
530 #include <stdlib.h>
531 #include <sys/param.h>
532 @@ -95,5 +95,5 @@
533 __libdw_oom (void)
535 while (1)
536 - error (EXIT_FAILURE, ENOMEM, "libdw");
537 + err (EXIT_FAILURE, "libdw");
539 diff -Naur elfutils-0.152.orig/libebl/eblopenbackend.c elfutils-0.152/libebl/eblopenbackend.c
540 --- elfutils-0.152.orig/libebl/eblopenbackend.c 2010-09-10 13:18:31.000000000 +0000
541 +++ elfutils-0.152/libebl/eblopenbackend.c 2012-05-29 07:20:04.013112718 +0000
542 @@ -53,7 +53,6 @@
544 #include <assert.h>
545 #include <dlfcn.h>
546 -#include <error.h>
547 #include <libelfP.h>
548 #include <dwarf.h>
549 #include <stdlib.h>
550 diff -Naur elfutils-0.152.orig/src/findtextrel.c elfutils-0.152/src/findtextrel.c
551 --- elfutils-0.152.orig/src/findtextrel.c 2010-11-23 03:02:58.000000000 +0000
552 +++ elfutils-0.152/src/findtextrel.c 2012-05-29 07:20:04.014110741 +0000
553 @@ -31,7 +31,7 @@
554 #include <argp.h>
555 #include <assert.h>
556 #include <errno.h>
557 -#include <error.h>
558 +#include <err.h>
559 #include <fcntl.h>
560 #include <gelf.h>
561 #include <libdw.h>
562 @@ -226,14 +226,14 @@
563 int fd = open64 (real_fname, O_RDONLY);
564 if (fd == -1)
566 - error (0, errno, gettext ("cannot open '%s'"), fname);
567 + err (0, gettext ("cannot open '%s'"), fname);
568 return 1;
571 Elf *elf = elf_begin (fd, ELF_C_READ_MMAP, NULL);
572 if (elf == NULL)
574 - error (0, 0, gettext ("cannot create ELF descriptor for '%s': %s"),
575 + err (0, gettext ("cannot create ELF descriptor for '%s': %s"),
576 fname, elf_errmsg (-1));
577 goto err_close;
579 @@ -243,7 +243,7 @@
580 GElf_Ehdr *ehdr = gelf_getehdr (elf, &ehdr_mem);
581 if (ehdr == NULL)
583 - error (0, 0, gettext ("cannot get ELF header '%s': %s"),
584 + err (0, gettext ("cannot get ELF header '%s': %s"),
585 fname, elf_errmsg (-1));
586 err_elf_close:
587 elf_end (elf);
588 @@ -254,7 +254,7 @@
590 if (ehdr->e_type != ET_DYN)
592 - error (0, 0, gettext ("'%s' is not a DSO or PIE"), fname);
593 + err (0, gettext ("'%s' is not a DSO or PIE"), fname);
594 goto err_elf_close;
597 @@ -273,7 +273,7 @@
599 if (shdr == NULL)
601 - error (0, 0,
602 + err (0,
603 gettext ("getting get section header of section %zu: %s"),
604 elf_ndxscn (scn), elf_errmsg (-1));
605 goto err_elf_close;
606 @@ -297,7 +297,7 @@
607 dyn = gelf_getdyn (data, cnt, &dynmem);
608 if (dyn == NULL)
610 - error (0, 0, gettext ("cannot read dynamic section: %s"),
611 + err (0, gettext ("cannot read dynamic section: %s"),
612 elf_errmsg (-1));
613 goto err_elf_close;
615 @@ -318,7 +318,7 @@
617 if (!have_textrel)
619 - error (0, 0, gettext ("no text relocations reported in '%s'"), fname);
620 + err (0, gettext ("no text relocations reported in '%s'"), fname);
621 return 1;
624 @@ -330,7 +330,7 @@
625 struct segments *segments
626 = (struct segments *) malloc (nsegments_max * sizeof (segments[0]));
627 if (segments == NULL)
628 - error (1, errno, gettext ("while reading ELF file"));
629 + err (1, gettext ("while reading ELF file"));
631 for (int i = 0; i < ehdr->e_phnum; ++i)
633 @@ -338,7 +338,7 @@
634 GElf_Phdr *phdr = gelf_getphdr (elf, i, &phdr_mem);
635 if (phdr == NULL)
637 - error (0, 0,
638 + err (0,
639 gettext ("cannot get program header index at offset %d: %s"),
640 i, elf_errmsg (-1));
641 result = 1;
642 @@ -356,7 +356,7 @@
643 * sizeof (segments[0]));
644 if (segments == NULL)
646 - error (0, 0, gettext ("\
647 + err (0, gettext ("\
648 cannot get program header index at offset %d: %s"),
649 i, elf_errmsg (-1));
650 result = 1;
651 @@ -407,7 +407,7 @@
653 if (shdr == NULL)
655 - error (0, 0,
656 + err (0,
657 gettext ("cannot get section header of section %Zu: %s"),
658 elf_ndxscn (scn), elf_errmsg (-1));
659 result = 1;
660 @@ -420,7 +420,7 @@
661 symscn = elf_getscn (elf, shdr->sh_link);
662 if (symscn == NULL)
664 - error (0, 0, gettext ("\
665 + err (0, gettext ("\
666 cannot get symbol table section %zu in '%s': %s"),
667 (size_t) shdr->sh_link, fname, elf_errmsg (-1));
668 result = 1;
669 @@ -440,7 +440,7 @@
670 GElf_Rel *rel = gelf_getrel (data, cnt, &rel_mem);
671 if (rel == NULL)
673 - error (0, 0, gettext ("\
674 + err (0, gettext ("\
675 cannot get relocation at index %d in section %zu in '%s': %s"),
676 cnt, elf_ndxscn (scn), fname, elf_errmsg (-1));
677 result = 1;
678 @@ -463,7 +463,7 @@
679 GElf_Rela *rela = gelf_getrela (data, cnt, &rela_mem);
680 if (rela == NULL)
682 - error (0, 0, gettext ("\
683 + err (0, gettext ("\
684 cannot get relocation at index %d in section %zu in '%s': %s"),
685 cnt, elf_ndxscn (scn), fname, elf_errmsg (-1));
686 result = 1;