From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Samuel Bronson Newsgroups: gmane.emacs.bugs Subject: bug#9927: 24.0.90; unexec/unexmacosx fails with GCC 4.6.1 Date: Sat, 30 Jun 2012 12:47:59 -0400 Message-ID: References: <6A5F6D17-397A-48F7-87E9-D77C09B60EC6@Freenet.DE> NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1341094245 15922 80.91.229.3 (30 Jun 2012 22:10:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 30 Jun 2012 22:10:45 +0000 (UTC) To: 9927@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 01 00:10:44 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sl5sI-0001Uj-DW for geb-bug-gnu-emacs@m.gmane.org; Sun, 01 Jul 2012 00:10:42 +0200 Original-Received: from localhost ([::1]:36142 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sl5sI-0007xP-7w for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Jun 2012 18:10:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sl5sF-0007x2-3F for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2012 18:10:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sl5sD-0003Av-3G for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2012 18:10:38 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sl5sC-0003Ap-W5 for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2012 18:10:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Sl5wU-0004Lg-1D for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2012 18:15:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <6A5F6D17-397A-48F7-87E9-D77C09B60EC6@Freenet.DE> Resent-From: Samuel Bronson Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Jun 2012 22:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9927 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.134109448116678 (code B ref -1); Sat, 30 Jun 2012 22:15:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 30 Jun 2012 22:14:41 +0000 Original-Received: from localhost ([127.0.0.1]:39571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sl5w8-0004Kx-Ha for submit@debbugs.gnu.org; Sat, 30 Jun 2012 18:14:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56894) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sl5w6-0004Kq-Bn for submit@debbugs.gnu.org; Sat, 30 Jun 2012 18:14:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sl5rm-0002pO-VS for submit@debbugs.gnu.org; Sat, 30 Jun 2012 18:10:12 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:45707) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sl5rm-0002pK-SF for submit@debbugs.gnu.org; Sat, 30 Jun 2012 18:10:10 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sl5rk-0007ui-Vy for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2012 18:10:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sl5ri-0002oC-W3 for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2012 18:10:08 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:42115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sl5ri-0002mQ-PU for bug-gnu-emacs@gnu.org; Sat, 30 Jun 2012 18:10:06 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Sl5rg-0000yn-2g for bug-gnu-emacs@gnu.org; Sun, 01 Jul 2012 00:10:04 +0200 Original-Received: from 207-172-123-137.c3-0.upd-ubr1.trpr-upd.pa.cable.rcn.com ([207.172.123.137]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 01 Jul 2012 00:10:04 +0200 Original-Received: from naesten by 207-172-123-137.c3-0.upd-ubr1.trpr-upd.pa.cable.rcn.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 01 Jul 2012 00:10:04 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 34 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 207-172-123-137.c3-0.upd-ubr1.trpr-upd.pa.cable.rcn.com User-Agent: MT-NewsWatcher/3.5.2 (PPC Mac OS X) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:61449 Archived-At: Samuel Bronson wrote: > I suppose, though, that if we could be sure that we aren't linking in > any static libraries with these *new* BSS sections which will have > trouble because of Emacs' dumping them, we could just skip that part; > then all we'd need to do is make sure that my_endbss_static refers to > an address in __DATA.__bss, not __DATA.__bss1 or __DATA.bss2 like it > would naturally end up at on GCC 4.6 or 4.7 (respectively). (And make > unexmacosx.c dump these new BSS sections, of course.) Well, after my GCC 4.7 build finished, I had a go at building Emacs with it and (after getting distracted for a bit playing with the --enable-gcc-warnings flag) I got temacs to build and link. (There was some awkwardness involving the -fobjc-exceptions flag that we'll need to straighten out...) I decided I might as well try the simplest thing that could possibly work: just dump __DATA.__static_data in the usual way, and dump these new BSS sections like __DATA.__bss, only in their entirety rather than messing about with markers. When my first try ended in SIGSEGV, I ran "gobjdump --all" on temacs and didn't see any evidence of staticly-linked libraries besides libgcc and gnulib; then I noticed that I hadn't looked closely enough at the code I'd copied and pasted into my new "else if" clause and rewrote it to ACTUALLY work like that for __DATA.__bss without the marker stuff, and then I actually got an Emacs.app that worked! You can see my changes at: http://bazaar.launchpad.net/~naesten/emacs/nextstep-stuff/revision/108754 Be warned that the line numbers will probably be way off of emacs trunk right now, since an earlier commit on my branch deletes largish swathes of code that wasn't really doing anything useful.