]> git.eshelyaron.com Git - emacs.git/commitdiff
* configure.ac: Increase headerpad_extra to 1000, update the comment
authorDavid Caldwell <david@porkrind.org>
Sun, 21 Sep 2014 20:35:22 +0000 (22:35 +0200)
committerJan Djärv <jan.h.d@swipnet.se>
Sun, 21 Sep 2014 20:35:22 +0000 (22:35 +0200)
about load commands.

* src/unexmacosx.c (dump_it): Improve error message.

Fixes: debbugs:18505
ChangeLog
configure.ac
src/ChangeLog
src/unexmacosx.c

index b1951aa6c71c763de32c5943538f72f4d4a13fd9..bffcbbab4459a10ef5295794441f382c1461b51c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-21  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * configure.ac: Increase headerpad_extra to 1000, update the comment
+       about load commands (Bug#18505).
+
 2014-09-13  Eli Zaretskii  <eliz@gnu.org>
 
        * configure.ac (HAVE_SOUND): Check for mmsystem.h header that
index f05c14a319cb4f762cade0ac8fd66bc12044832e..0102551ece5b60074c0bf0f256adf1ee17f9de89 100644 (file)
@@ -4859,17 +4859,19 @@ case "$opsys" in
   darwin)
    ## The -headerpad option tells ld (see man page) to leave room at the
    ## end of the header for adding load commands.  Needed for dumping.
-   ## 0x690 is the total size of 30 segment load commands (at 56
-   ## each); under Cocoa 31 commands are required.
+   ## 0x1000 is enough for roughly 52 load commands on the x86_64
+   ## architecture (where they are 78 bytes each). The actual number of
+   ## load commands added is not consistent but normally ranges from
+   ## about 14 to about 34. Setting it high gets us plenty of slop and
+   ## only costs about 1.5K of wasted binary space.
+   headerpad_extra=1000
    if test "$HAVE_NS" = "yes"; then
      libs_nsgui="-framework AppKit"
      if test "$NS_IMPL_COCOA" = "yes"; then
         libs_nsgui="$libs_nsgui -framework IOKit"
      fi
-     headerpad_extra=6C8
    else
      libs_nsgui=
-     headerpad_extra=690
    fi
    LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
 
index ea4dde398a7e24ca4166095534297c3c13e44e68..684de4985225eeb8f2dfe4827e7e9ebcb850655e 100644 (file)
@@ -1,3 +1,7 @@
+2014-09-21  David Caldwell <david@porkrind.org> (tiny change)
+
+       * unexmacosx.c (dump_it): Improve error message.
+
 2014-09-18  Juri Linkov  <juri@jurta.org>
 
        * image.c (imagemagick_load_image): Add delay to imagemagick metadata.
index 8cd80a7a544a416a5d9cd66c144a630391334042..7d4762fdab2fe3ccc7e5358d86228381491566bd 100644 (file)
@@ -1302,7 +1302,9 @@ dump_it (void)
       }
 
   if (curr_header_offset > text_seg_lowest_offset)
-    unexec_error ("not enough room for load commands for new __DATA segments");
+    unexec_error ("not enough room for load commands for new __DATA segments"
+                 " (increase headerpad_extra in configure.in to at least %lX)",
+                 num_unexec_regions * sizeof (struct segment_command));
 
   printf ("%ld unused bytes follow Mach-O header\n",
          text_seg_lowest_offset - curr_header_offset);