From owner-freebsd-bugs@freebsd.org Thu Feb 8 21:18:55 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 24A90F05A5C for ; Thu, 8 Feb 2018 21:18:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B87867E8CC for ; Thu, 8 Feb 2018 21:18:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id EA09813A1B for ; Thu, 8 Feb 2018 21:18:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w18LIr5h067760 for ; Thu, 8 Feb 2018 21:18:53 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w18LIrZB067748 for freebsd-bugs@FreeBSD.org; Thu, 8 Feb 2018 21:18:53 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 225775] btxld does not handle input with other than 2 PT_LOAD segments Date: Thu, 08 Feb 2018 21:18:53 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Feb 2018 21:18:55 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225775 Bug ID: 225775 Summary: btxld does not handle input with other than 2 PT_LOAD segments Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: emaste@freebsd.org Linking e.g. zfsloader reports (whitespace added for clarity): cc -O2 -pipe -I/usr/home/emaste/src/freebsd-wip/stand/i386/btx/lib -nostdinc -I/usr/obj/usr/home/emaste/src/freebsd-wip/amd64.amd64/stand/libsa32 -I/usr/home/emaste/src/freebsd-wip/stand/libsa -D_STANDALONE -I/usr/home/emaste/src/freebsd-wip/sys -DLOADER_GELI_SUPPORT -I/usr/home/emaste/src/freebsd-wip/stand/geli -DLOADER_DISK_SUPPORT -m32 -mcpu=3Di386 -ffreestanding -mno-mmx -mno-sse -mno-avx -mno-avx2 -msoft-flo= at -march=3Di386 -I. -I/usr/home/emaste/src/freebsd-wip/stand/common -I/usr/home/emaste/src/freebsd-wip/stand/ficl -I/usr/home/emaste/src/freebsd-wip/stand/ficl/i386 -I/usr/home/emaste/src/freebsd-wip/stand/common -DBF_DICTSIZE=3D15000 -DLOADER_UFS_SUPPORT -DLOADER_GZIP_SUPPORT -DLOADER_BZIP2_SUPPORT -DLOADER_NET_SUPPORT -DLOADER_NFS_SUPPORT -DLOADER_TFTP_SUPPORT -DLOADER_GPT_SUPPORT -DLOADER_MBR_SUPPORT -DLOADER_ZFS_SUPPORT -I/usr/home/emaste/src/freebsd-wip/stand/zfs -I/usr/home/emaste/src/freebsd-wip/sys/cddl/boot/zfs -Wall -I/usr/home/emaste/src/freebsd-wip/stand/i386 -DLOADER_PREFER_AMD64 -std=3D= gnu99 -Wsystem-headers -Werror -Wno-pointer-sign -Wno-empty-body -Wno-string-plus= -int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -Qunused-arguments -nostdlib -Wl,-z,norelro -static -Ttext 0x0 -Wl,-z,nore= lro -o zfsloader.sym /usr/obj/usr/home/emaste/src/freebsd-wip/amd64.amd64/stand/i386/btx/lib/crt= 0.o main.o conf.o vers.o chain.o boot.o commands.o console.o devopen.o interp.o interp_backslash.o interp_parse.o ls.o misc.o module.o load_elf32.o load_elf32_obj.o reloc_elf32.o load_elf64.o load_elf64_obj.o reloc_elf64.o disk.o part.o dev_net.o bcache.o isapnp.o pnp.o interp_forth.o=20 /usr/obj/usr/home/emaste/src/freebsd-wip/amd64.amd64/stand/ficl32/libficl.a= =20 /usr/obj/usr/home/emaste/src/freebsd-wip/amd64.amd64/stand/zfs32/libzfsboot= .a /usr/obj/usr/home/emaste/src/freebsd-wip/amd64.amd64/stand/i386/libi386/lib= i386.a /usr/obj/usr/home/emaste/src/freebsd-wip/amd64.amd64/stand/geli/libgeliboot= .a /usr/obj/usr/home/emaste/src/freebsd-wip/amd64.amd64/stand/libsa32/libsa32.a strip -R .comment -R .note -o zfsloader.bin zfsloader.sym btxld -v -f aout -e 0x200000 -o zfsloader -l /usr/obj/usr/home/emaste/src/freebsd-wip/amd64.amd64/stand/i386/btx/btxldr/= btxldr -b /usr/obj/usr/home/emaste/src/freebsd-wip/amd64.amd64/stand/i386/btx/btx= /btx zfsloader.bin btxld: zfsloader.bin: Warning: Ignoring extra elf PT_LOAD segments kernel: ver=3D1.02 size=3D690 load=3D9000 entry=3D9010 map=3D16M pgctl=3D0:= 59 client: fmt=3Delf size=3D6bcd0 text=3D58834 data=3Dafec bss=3D0 entry=3D0 output: fmt=3Daout size=3D6f000 text=3D1000 data=3D6d000 org=3D200000 entry= =3D200000 btxld has: case 2: Warn(fname, "Ignoring extra %s PT_LOAD segments", fmtlist[fmt]); i.e., it expects two PT_LOADs with a specific format, and just ignores the third or later ones. --=20 You are receiving this mail because: You are the assignee for the bug.=