Date: Tue, 6 Jan 2004 12:24:08 +0900 (JST) From: Kazuo ISHIDA <ishidakz@mug.biglobe.ne.jp> To: FreeBSD-gnats-submit@FreeBSD.org Subject: i386/60963: [PATCH] Win32 Applications abort on PECOFF Message-ID: <200401060324.i063O80H048238@hermes.hml.cl.nec.co.jp> Resent-Message-ID: <200401060330.i063UGLn067102@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 60963 >Category: i386 >Synopsis: [PATCH] Win32 Applications abort on PECOFF >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 05 19:30:15 PST 2004 >Closed-Date: >Last-Modified: >Originator: Kazuo ISHIDA >Release: FreeBSD 5.1-CURRENT i386 >Organization: NEC Corp. >Environment: System: FreeBSD *** 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Mon Oct 27 18:27:39 JST 2003 ishidakz@:/usr/src/sys/GENERIC i386 >Description: Win32 Applications compiled by mingw32-gcc could not be loaded. Because pecoff_load_section() fails when EXE has both BSS(?) and TEXT section. >How-To-Repeat: Compile by ports/devel/mingw32-gcc and execute the following program (pecoff.ko is needed). ------------------------------ main() { printf("Hello\n"); } ------------------------------ >Fix: The following patch fixes this problem: ---------------------------------------------------------------------- diff -ru OLD/src/sys/compat/pecoff/imgact_pecoff.c ./sys/compat/pecoff/imgact_pecoff.c --- OLD/src/sys/compat/pecoff/imgact_pecoff.c Fri Jun 13 15:38:39 2003 +++ ./sys/compat/pecoff/imgact_pecoff.c Wed Oct 1 17:42:03 2003 @@ -511,7 +511,7 @@ text_addr = trunc_page(sh[i].s_vaddr); text_size = trunc_page(sh[i].s_size + sh[i].s_vaddr - text_addr); - } + } else if ((sh[i].s_flags & (COFF_STYP_DATA|COFF_STYP_BSS)) != 0) { if (pecoff_load_section( FIRST_THREAD_IN_PROC(imgp->proc), vmspace, ---------------------------------------------------------------------- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401060324.i063O80H048238>