Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amiga/stand/bootblock/elf2bb Don't crash when repor...



details:   https://anonhg.NetBSD.org/src/rev/94070e8dc1f2
branches:  trunk
changeset: 361608:94070e8dc1f2
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Fri Feb 18 06:42:59 2022 +0000

description:
Don't crash when reporting an undefined symbol.

diffstat:

 sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 11b3dd5b918e -r 94070e8dc1f2 sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c
--- a/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c    Thu Feb 17 16:28:29 2022 +0000
+++ b/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c    Fri Feb 18 06:42:59 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elf2bb.c,v 1.20 2021/05/18 20:34:20 dholland Exp $     */
+/*     $NetBSD: elf2bb.c,v 1.21 2022/02/18 06:42:59 mlelstv Exp $      */
 
 /*-
  * Copyright (c) 1996,2006 The NetBSD Foundation, Inc.
@@ -325,7 +325,7 @@
                        s = &symtab[ELF32_R_SYM(htobe32(ra->r_info))];
                        if (s->st_shndx == ELF_SYM_UNDEFINED) {
                                fprintf(stderr, "Undefined symbol: %s\n",
-                                   strtab + s->st_name);
+                                   strtab + htobe32(s->st_name));
                                ++undefsyms;
                        }
                        value = htobe32(ra->r_addend) + eval(s, sect_offset);



Home | Main Index | Thread Index | Old Index