all messages for Emacs-related lists mirrored at yhetil.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

* Re: [PATCH] fix for unexec bootstrap fail on darwin
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Mattie @ 2008-04-30 18:28 UTC (permalink / raw)
  To: emacs-devel

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

On Wed, 30 Apr 2008 10:42:53 -0700
Mike Mattie <codermattie@mac.com> wrote:

> 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.
> 


I found a message about unused Mach-O header. It appears that room for 33
extra commands should suffice.

the minimal value of the Mach-O padding is then 0x738.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [PATCH] fix for unexec bootstrap fail on darwin
  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
  1 sibling, 0 replies; 3+ messages in thread
From: YAMAMOTO Mitsuharu @ 2008-04-30 23:56 UTC (permalink / raw)
  To: Mike Mattie; +Cc: Emacs Devel

>>>>> On Wed, 30 Apr 2008 10:42:53 -0700, Mike Mattie <codermattie@mac.com> said:

> 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.

Alternatively, you can bootstrap by keeping term/x-win.el from being
preloaded in loadup.el during the bootstrap stage.  I think this will
decrease the optimal size of STATIC_HEAP_SIZE in sheap.c for Cygwin.

I still don't understand why term/*-win.el are changed to be preloaded
at the multi-tty merger.  If it was necessary for multi-tty, it might
cause some problems on CANNOT_DUMP platforms.  If not, then it was
really a bad idea (at least unfair) to slip such changes into the
unrelated event, i.e., the multi-tty merger.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp




^ 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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.