From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Mattie Newsgroups: gmane.emacs.devel Subject: [PATCH] fix for unexec bootstrap fail on darwin Date: Wed, 30 Apr 2008 10:42:53 -0700 Message-ID: <6D13D5A4-6F6D-4A8E-8B6F-B1B8A0EF676A@mac.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753) Content-Type: multipart/mixed; boundary=Apple-Mail-6--658060348 X-Trace: ger.gmane.org 1209577437 25103 80.91.229.12 (30 Apr 2008 17:43:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Apr 2008 17:43:57 +0000 (UTC) To: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 30 19:44:32 2008 connect(): Connection refused Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JrGLq-0002v7-Ld for ged-emacs-devel@m.gmane.org; Wed, 30 Apr 2008 19:44:18 +0200 Original-Received: from localhost ([127.0.0.1]:53928 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JrGL9-0006sa-O6 for ged-emacs-devel@m.gmane.org; Wed, 30 Apr 2008 13:43:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JrGL5-0006qs-Cl for emacs-devel@gnu.org; Wed, 30 Apr 2008 13:43:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JrGL3-0006oY-Mf for emacs-devel@gnu.org; Wed, 30 Apr 2008 13:43:30 -0400 Original-Received: from [199.232.76.173] (port=60829 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JrGL3-0006oL-Gp for emacs-devel@gnu.org; Wed, 30 Apr 2008 13:43:29 -0400 Original-Received: from smtpoutm.mac.com ([17.148.16.79]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JrGL3-0001F6-Ij for emacs-devel@gnu.org; Wed, 30 Apr 2008 13:43:29 -0400 Original-Received: from mac.com (asmtp007-s [10.150.69.70]) by smtpoutm.mac.com (Xserve/smtpout016/MantshX 4.0) with ESMTP id m3UHhMeQ027742 for ; Wed, 30 Apr 2008 10:43:22 -0700 (PDT) Original-Received: from [192.168.1.100] (71-217-206-83.spkn.qwest.net [71.217.206.83]) (authenticated bits=0) by mac.com (Xserve/asmtp007/MantshX 4.0) with ESMTP id m3UHh0vS015760 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 30 Apr 2008 10:43:21 -0700 (PDT) X-Mailer: Apple Mail (2.753) X-detected-kernel: by monty-python.gnu.org: FreeBSD 4.8-5.1 (or MacOS X 10.2-10.3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:96232 Archived-At: --Apple-Mail-6--658060348 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed hello, I ran into "not enough room for load commands for new __DATA segments" from unexecmacosx.c while bootstrapping yesterday. I increased the room for load commands from 30, to 40 and acheived a successful bootstrap. I did not know exactly how much room was required so increasing the padding by 10 commands is a guess. otool -l src/emacs shows 43 load commands after bootstrap completed. I have included a one-liner fix with my solution. --Apple-Mail-6--658060348 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=emacs-unexec-fix.diff Content-Disposition: attachment; filename=emacs-unexec-fix.diff ? lisp/nxml/char-name/subdirs.el Index: src/s/darwin.h =================================================================== RCS file: /sources/emacs/emacs/src/s/darwin.h,v retrieving revision 1.34 diff -u -r1.34 darwin.h --- src/s/darwin.h 8 Jan 2008 20:45:11 -0000 1.34 +++ src/s/darwin.h 30 Apr 2008 17:33:44 -0000 @@ -276,7 +276,7 @@ end of the header for adding load commands. Needed for dumping. 0x690 is the total size of 30 segment load commands (at 56 each). */ -#define LD_SWITCH_SYSTEM_TEMACS -prebind LIBS_CARBON -Xlinker -headerpad -Xlinker 690 +#define LD_SWITCH_SYSTEM_TEMACS -prebind LIBS_CARBON -Xlinker -headerpad -Xlinker 8c0 #define C_SWITCH_SYSTEM_TEMACS -Dtemacs --Apple-Mail-6--658060348 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed A complete patch requires modifying comments in darwin.h and unexecmacosx.c . I chose not to so that the patch would remain below the limit for legal paperwork. I have also ran into the "pure storage overflow" problem after my fix, I will address that subsequently if appropriate after some RTFM'ing. Cheers, Mike Mattie --Apple-Mail-6--658060348--