Date: Mon, 27 Jul 2020 14:09:38 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r363601 - stable/11/contrib/elftoolchain/libdwarf Message-ID: <202007271409.06RE9cq3063208@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Mon Jul 27 14:09:37 2020 New Revision: 363601 URL: https://svnweb.freebsd.org/changeset/base/363601 Log: MFC r363375: libdwarf: Hide SHT_NOBITS sections. PR: 239516 Modified: stable/11/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c ============================================================================== --- stable/11/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c Mon Jul 27 14:08:29 2020 (r363600) +++ stable/11/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c Mon Jul 27 14:09:37 2020 (r363601) @@ -260,6 +260,9 @@ _dwarf_elf_init(Dwarf_Debug dbg, Elf *elf, Dwarf_Error goto fail_cleanup; } + if (sh.sh_type == SHT_NOBITS) + continue; + if ((name = elf_strptr(elf, e->eo_strndx, sh.sh_name)) == NULL) { DWARF_SET_ELF_ERROR(dbg, error); @@ -312,6 +315,9 @@ _dwarf_elf_init(Dwarf_Debug dbg, Elf *elf, Dwarf_Error ret = DW_DLE_ELF; goto fail_cleanup; } + + if (sh.sh_type == SHT_NOBITS) + continue; memcpy(&e->eo_shdr[j], &sh, sizeof(sh));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007271409.06RE9cq3063208>