On 02/22/2013 05:05 AM, Eli Zaretskii wrote: > Could you please explain more about what this is intended to > accomplish? Mostly, it's simplification. There's a lot of cruft in there, about linking Emacs specially and so forth, that was needed way back when we made pure space read-only but is now no longer needed. > are we removing the data-start thing on all platforms where GCPRO is > a no-op, i.e. those which support USE_LSB_TAG? USE_LSB_TAG is a different thing. The patch omits data_start on hosts that use the system malloc, since data_start is now needed only on hosts where GNU Emacs supplies malloc. USE_LSB_TAG is more closely related to DATA_SEG_BITS, but that is not changed by this patch. > Should platforms that HAVE_DATA_START initialize data_start to some > value? Should _all_ platforms do that? If not, which ones should? No, data_start's contents are irrelevant. Only its address matters. On GNU hosts the linker supplies the address automatically; on non-GNU hosts we approximate it by declaring a variable whose contents don't matter. >> - extern POINTER (*real_morecore) (ptrdiff_t); >> + extern void *(*real_morecore) (ptrdiff_t); > > This needs corresponding changes in ralloc.c, I think, at least for > consistency if nothing else. Done in trunk bzr 111859, which simplifies the attached patch. Revised patch attached, relative to trunk bzr 111859. >> - data_start = (int) start_of_data (); >> + data_start = (int) get_data_start (); >... > This part is wrong: unexcoff.c is used only by the MSDOS build Thanks for catching that. I'll fix that as follows; this fix is contained in the attached patch. --- src/unexcoff.c 2013-02-22 08:11:05 +0000 +++ src/unexcoff.c 2013-02-22 19:39:27 +0000 @@ -99,7 +99,7 @@ #include -extern unsigned char *get_data_start (void); +extern int etext[]; static long block_copy_start; /* Old executable start point */ static struct filehdr f_hdr; /* File header */ @@ -168,7 +168,7 @@ pagemask = getpagesize () - 1; /* Adjust text/data boundary. */ - data_start = (int) get_data_start (); + data_start = (int) (etext + 1); data_start = ADDR_CORRECT (data_start); data_start = data_start & ~pagemask; /* (Down) to page boundary. */