Date: Thu, 27 Mar 2014 20:20:21 +0000 (UTC) From: Christian Brueffer <brueffer@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263836 - stable/9/usr.sbin/btxld Message-ID: <201403272020.s2RKKLwR060985@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brueffer Date: Thu Mar 27 20:20:20 2014 New Revision: 263836 URL: http://svnweb.freebsd.org/changeset/base/263836 Log: MFC: r262484 In puthdr(), start the ELF .data section on a new page, as this is what btxldr expects (.set MEM_DATA,start+0x1000 in btxldr.S). This makes resulting ELF binaries bootable with grub, gptboot and boot2. PR: 153801 Submitted by: Gleb Kurtsou <gleb.kurtsou at gmail.com> Tested by: Ruben Kerkhof <ruben at rubenkerkhof.com> Glanced at by: jhb, peter Modified: stable/9/usr.sbin/btxld/btxld.c Directory Properties: stable/9/usr.sbin/btxld/ (props changed) Modified: stable/9/usr.sbin/btxld/btxld.c ============================================================================== --- stable/9/usr.sbin/btxld/btxld.c Thu Mar 27 20:19:11 2014 (r263835) +++ stable/9/usr.sbin/btxld/btxld.c Thu Mar 27 20:20:20 2014 (r263836) @@ -426,7 +426,7 @@ puthdr(int fd, struct hdr *hdr) le32toh(eh.p[0].p_filesz)); eh.p[1].p_vaddr = eh.p[1].p_paddr = htole32(align(le32toh(eh.p[0].p_paddr) + le32toh(eh.p[0].p_memsz), - 4)); + 4096)); eh.p[1].p_filesz = eh.p[1].p_memsz = htole32(hdr->data); eh.sh[2].sh_addr = eh.p[0].p_vaddr; eh.sh[2].sh_offset = eh.p[0].p_offset;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403272020.s2RKKLwR060985>