unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] fix for unexec bootstrap fail on darwin
@ 2008-04-30 17:42 Mike Mattie
  2008-04-30 18:28 ` Mike Mattie
  2008-04-30 23:56 ` YAMAMOTO Mitsuharu
  0 siblings, 2 replies; 3+ messages in thread
From: Mike Mattie @ 2008-04-30 17:42 UTC (permalink / raw)
  To: Emacs Devel

[-- Attachment #1: Type: text/plain, Size: 454 bytes --]

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.


[-- Attachment #2: emacs-unexec-fix.diff --]
[-- Type: application/octet-stream, Size: 702 bytes --]

? 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
 

[-- Attachment #3: Type: text/plain, Size: 329 bytes --]



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 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-30 23:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-30 17:42 [PATCH] fix for unexec bootstrap fail on darwin Mike Mattie
2008-04-30 18:28 ` Mike Mattie
2008-04-30 23:56 ` YAMAMOTO Mitsuharu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).