GNU bug report logs - #8395
Compile error with Xcode 4.1 in unexec

Previous Next

Packages: ns, emacs;

Reported by: "William R. Otte" <wotte <at> dre.vanderbilt.edu>

Date: Thu, 31 Mar 2011 16:49:01 UTC

Severity: important

Done: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>

Bug is archived. No further changes may be made.

Full log


Message #13 received at 8395 <at> debbugs.gnu.org (full text, mbox):

From: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
To: Bob Halley <halley <at> play-bow.org>
Cc: 8395 <at> debbugs.gnu.org, "William R. Otte" <wotte <at> dre.vanderbilt.edu>
Subject: Re: bug#8395: ASLR Issue?
Date: Wed, 06 Jul 2011 16:41:48 +0900
>>>>> On Tue, 5 Jul 2011 15:45:49 +0100, Bob Halley <halley <at> play-bow.org> said:

> I too see this problem trying to build Aquamacs' emacs-24-based
> branch on Lion GM with Xcode 4.1 preview 7.  The problem is *not* an
> unknown section name.  I added some debugging printfs, and this is
> what I see.  Basically things seem to be going OK until we try to
> write __data, where we get EFAULT when we try to write() it.  I
> don't know why sectp->addr is giving EFAULT; perhaps ASLR?  If I
> discover more, I will add to the ticket.

Could you try the patch below?  (I can't test it myself.)

As far as I tested, gcc -fno-pie *.o does not give an error on older
versions (though gcc -fno-pie *.c does in cc1).  So we can go without
additional configure-time checks if this modification works on Xcode
4.1 and/or Lion.

				     YAMAMOTO Mitsuharu
				mituharu <at> math.s.chiba-u.ac.jp

For trunk:
=== modified file 'configure.in'
*** configure.in	2011-07-05 08:21:38 +0000
--- configure.in	2011-07-06 06:13:33 +0000
***************
*** 3349,3355 ****
       libs_nsgui=
       headerpad_extra=690
     fi
!    LD_SWITCH_SYSTEM_TEMACS="-prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
  
     ## This is here because src/Makefile.in did some extra fiddling around
     ## with LD_SWITCH_SYSTEM.  The cpp logic was:
--- 3349,3355 ----
       libs_nsgui=
       headerpad_extra=690
     fi
!    LD_SWITCH_SYSTEM_TEMACS="-fno-pie -prebind $libs_nsgui -Xlinker -headerpad -Xlinker $headerpad_extra"
  
     ## This is here because src/Makefile.in did some extra fiddling around
     ## with LD_SWITCH_SYSTEM.  The cpp logic was:


For emacs-23 branch:
=== modified file 'src/s/darwin.h'
*** src/s/darwin.h	2011-01-02 23:50:46 +0000
--- src/s/darwin.h	2011-07-06 06:07:50 +0000
***************
*** 181,187 ****
     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.  */
! #define LD_SWITCH_SYSTEM_TEMACS -prebind LIBS_NSGUI -Xlinker -headerpad -Xlinker HEADERPAD_EXTRA
  
  #define C_SWITCH_SYSTEM_TEMACS -Dtemacs
  
--- 181,187 ----
     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.  */
! #define LD_SWITCH_SYSTEM_TEMACS -fno-pie -prebind LIBS_NSGUI -Xlinker -headerpad -Xlinker HEADERPAD_EXTRA
  
  #define C_SWITCH_SYSTEM_TEMACS -Dtemacs
  





This bug report was last modified 13 years and 323 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.