From: Paul Eggert <eggert@cs.ucla.edu>
To: Peter Dyballa <Peter_Dyballa@Freenet.DE>
Cc: 9927-done@debbugs.gnu.org
Subject: bug#9927: 24.1.50; unexec/unexmacosx doesn't grok GCC 4.6+ sections
Date: Sat, 04 Oct 2014 10:19:29 -0700 [thread overview]
Message-ID: <54302C21.7000801@cs.ucla.edu> (raw)
In-Reply-To: <FD3BAAF7-46A1-45A6-B0E4-94BE13E71C6D@Freenet.DE>
[-- Attachment #1: Type: text/plain, Size: 388 bytes --]
Peter Dyballa wrote:
> I think it is not fixed trunk, because GNU Emacs pretest 24.3.94 does not have it.
If I understand you correctly, you're saying that GNU Emacs 24.3.94 has the bug,
and that the bug went away when you applied the patch (attached), and that we
should therefore backport this patch to the emacs-24 branch. Is that what you
meant? If so, Stefan, OK if I do that?
[-- Attachment #2: osx.patch --]
[-- Type: text/plain, Size: 2219 bytes --]
=== modified file 'src/ChangeLog'
--- src/ChangeLog 2014-09-17 18:27:36 +0000
+++ src/ChangeLog 2014-09-17 19:58:31 +0000
@@ -1,3 +1,7 @@
+2014-09-17 Samuel Bronson <naesten@gmail.com>
+
+ * unexmacosx.c (copy_data_segment): Port to GCC 4.6+ (Bug#9927).
+
2014-09-17 Paul Eggert <eggert@cs.ucla.edu>
Fix minor problems found by static checking.
=== modified file 'src/unexmacosx.c'
--- src/unexmacosx.c 2014-09-01 02:37:22 +0000
+++ src/unexmacosx.c 2014-09-17 19:58:31 +0000
@@ -879,6 +879,27 @@
if (!unexec_write (header_offset, sectp, sizeof (struct section)))
unexec_error ("cannot write section %.16s's header", sectp->sectname);
}
+ else if (strncmp (sectp->sectname, "__bss", 5) == 0
+ || strncmp (sectp->sectname, "__pu_bss", 8) == 0)
+ {
+ sectp->flags = S_REGULAR;
+
+ /* These sections are produced by GCC 4.6+.
+
+ FIXME: We possibly ought to clear uninitialized local
+ variables in statically linked libraries like for
+ SECT_BSS (__bss) above, but setting up the markers we
+ need in lastfile.c would be rather messy. See
+ darwin_output_aligned_bss () in gcc/config/darwin.c for
+ the root of the problem, keeping in mind that the
+ sections are numbered by their alignment in GCC 4.6, but
+ by log2(alignment) in GCC 4.7. */
+
+ if (!unexec_write (sectp->offset, (void *) sectp->addr, sectp->size))
+ unexec_error ("cannot copy section %.16s", sectp->sectname);
+ if (!unexec_write (header_offset, sectp, sizeof (struct section)))
+ unexec_error ("cannot write section %.16s's header", sectp->sectname);
+ }
else if (strncmp (sectp->sectname, "__la_symbol_ptr", 16) == 0
|| strncmp (sectp->sectname, "__nl_symbol_ptr", 16) == 0
|| strncmp (sectp->sectname, "__got", 16) == 0
@@ -890,6 +911,7 @@
|| strncmp (sectp->sectname, "__program_vars", 16) == 0
|| strncmp (sectp->sectname, "__mod_init_func", 16) == 0
|| strncmp (sectp->sectname, "__mod_term_func", 16) == 0
+ || strncmp (sectp->sectname, "__static_data", 16) == 0
|| strncmp (sectp->sectname, "__objc_", 7) == 0)
{
if (!unexec_copy (sectp->offset, old_file_offset, sectp->size))
next prev parent reply other threads:[~2014-10-04 17:19 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-01 0:24 bug#9927: 24.0.90; unexec/unexmacosx fails with GCC 4.6.1 on intel Mac OS X 10.6.8 Peter Dyballa
[not found] ` <handler.9927.B.132010738317348.ack@debbugs.gnu.org>
2012-04-17 9:17 ` bug#9927: Acknowledgement (24.0.90; unexec/unexmacosx fails with GCC 4.6.1 on intel Mac OS X 10.6.8) Peter Dyballa
2012-06-29 17:03 ` bug#9927: 24.0.90; unexec/unexmacosx fails with GCC 4.6.1 Samuel Bronson
2012-06-29 19:19 ` Peter Dyballa
2012-06-30 16:47 ` Samuel Bronson
2013-07-25 19:37 ` Glenn Morris
2014-08-09 17:05 ` bug#9927: 24.1.50; unexec/unexmacosx doesn't grok GCC 4.6+ sections Stefan Monnier
2014-08-11 1:20 ` Glenn Morris
2014-08-11 1:40 ` Samuel Bronson
2014-08-11 1:56 ` Glenn Morris
2014-09-17 18:39 ` Paul Eggert
2014-09-17 19:48 ` Glenn Morris
2014-09-17 19:59 ` Paul Eggert
2014-09-17 21:00 ` Peter Dyballa
2014-09-17 21:10 ` Paul Eggert
2014-09-18 2:37 ` Stefan Monnier
2014-09-18 5:27 ` Paul Eggert
2014-09-18 13:05 ` Stefan Monnier
2014-10-04 9:02 ` Peter Dyballa
2014-10-04 17:19 ` Paul Eggert [this message]
2014-10-04 18:18 ` Glenn Morris
2014-10-04 19:43 ` Paul Eggert
2014-10-05 18:36 ` Peter Dyballa
2014-10-05 23:19 ` Paul Eggert
2014-10-06 1:29 ` Stefan Monnier
2014-10-06 2:47 ` Paul Eggert
2014-10-06 13:15 ` Stefan Monnier
2014-10-06 16:16 ` Peter Dyballa
2014-09-17 22:20 ` Peter Dyballa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54302C21.7000801@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=9927-done@debbugs.gnu.org \
--cc=Peter_Dyballa@Freenet.DE \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.