all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Gilles Pion <gilles.pion@gmail.com>
Cc: 13650@debbugs.gnu.org
Subject: bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2
Date: Mon, 11 Feb 2013 13:18:10 -0800	[thread overview]
Message-ID: <51196012.8010708@cs.ucla.edu> (raw)
In-Reply-To: <CAN8zRaC3HCrMcoemp+XPsPUR57y1RvH_8pFh9nNeP-yYTG+=5g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

On 02/10/13 23:51, Gilles Pion wrote:

> unexec: data_start (0x2ff22000) can't be greater than bss_start (0x20a62000)

Thanks, that's progress, since Emacs at least builds now.
So I committed that into emacs-24.

Can you please try the attached patch as well?  That is,
please apply it in addition to the earlier patch.


[-- Attachment #2: aixpatch.txt --]
[-- Type: text/plain, Size: 3476 bytes --]

=== modified file 'src/pre-crt0.c'
--- src/pre-crt0.c	2011-01-15 23:16:57 +0000
+++ src/pre-crt0.c	2013-02-11 21:07:33 +0000
@@ -4,7 +4,7 @@
    that make environ an initialized variable.  However, we do
    need to make sure the label data_start exists anyway.  */
 
-/* Create a label to appear at the beginning of data space.  */
-
-int data_start = 0;
-
+/* Create a label to appear at the beginning of data space.
+   Its value is nonzero so that it cannot be put into bss.  */
+
+int data_start = 1;

=== modified file 'src/unexaix.c'
--- src/unexaix.c	2013-02-11 20:32:54 +0000
+++ src/unexaix.c	2013-02-11 21:03:46 +0000
@@ -61,10 +61,8 @@
 
 #include "mem-limits.h"
 
-char *start_of_text (void);		        /* Start of text */
-
-extern int _data;
-extern int _text;
+extern char _data[];
+extern char _text[];
 
 #include <filehdr.h>
 #include <aouthdr.h>
@@ -73,15 +71,15 @@
 
 static struct filehdr f_hdr;		/* File header */
 static struct aouthdr f_ohdr;		/* Optional file header (a.out) */
-static long bias;			/* Bias to add for growth */
-static long lnnoptr;			/* Pointer to line-number info within file */
+static off_t bias;			/* Bias to add for growth */
+static off_t lnnoptr;			/* Pointer to line-number info within file */
 
-static long text_scnptr;
-static long data_scnptr;
+static off_t text_scnptr;
+static off_t data_scnptr;
 #define ALIGN(val, pwr) (((val) + ((1L<<(pwr))-1)) & ~((1L<<(pwr))-1))
-static long load_scnptr;
-static long orig_load_scnptr;
-static long orig_data_scnptr;
+static off_t load_scnptr;
+static off_t orig_load_scnptr;
+static off_t orig_data_scnptr;
 static int unrelocate_symbols (int, int, const char *, const char *);
 
 #ifndef MAX_SECTIONS
@@ -188,7 +186,7 @@
   pagemask = getpagesize () - 1;
 
   /* Adjust text/data boundary. */
-  data_start = (uintptr_t) start_of_data ();
+  data_start = (uintptr_t) _data;
 
   data_start = data_start & ~pagemask; /* (Down) to page boundary. */
 
@@ -288,7 +286,7 @@
 
   /* fix scnptr's */
   {
-    ulong ptr = section[0].s_scnptr;
+    off_t ptr = section[0].s_scnptr;
 
     bias = -1;
     for (scns = 0; scns < f_hdr.f_nscns; scns++)
@@ -384,12 +382,12 @@
   char *end;
   char *ptr;
 
-  lseek (new, (long) text_scnptr, SEEK_SET);
-  ptr = start_of_text () + text_scnptr;
+  lseek (new, text_scnptr, SEEK_SET);
+  ptr = _text + text_scnptr;
   end = ptr + f_ohdr.tsize;
   write_segment (new, ptr, end);
 
-  lseek (new, (long) data_scnptr, SEEK_SET);
+  lseek (new, data_scnptr, SEEK_SET);
   ptr = (char *) f_ohdr.data_start;
   end = ptr + f_ohdr.dsize;
   write_segment (new, ptr, end);
@@ -549,13 +547,13 @@
   int i;
   LDHDR ldhdr;
   LDREL ldrel;
-  ulong t_reloc = (ulong) &_text - f_ohdr.text_start;
+  off_t t_reloc = (intptr_t) _text - f_ohdr.text_start;
 #ifndef ALIGN_DATA_RELOC
-  ulong d_reloc = (ulong) &_data - f_ohdr.data_start;
+  off_t d_reloc = (intptr_t) _data - f_ohdr.data_start;
 #else
   /* This worked (and was needed) before AIX 4.2.
      I have no idea why. -- Mike */
-  ulong d_reloc = (ulong) &_data - ALIGN (f_ohdr.data_start, 2);
+  off_t d_reloc = (intptr_t) _data - ALIGN (f_ohdr.data_start, 2);
 #endif
   int * p;
 
@@ -640,16 +638,3 @@
     }
   return 0;
 }
-
-/*
- *	Return the address of the start of the text segment prior to
- *	doing an unexec.  After unexec the return value is undefined.
- *	See crt0.c for further explanation and _start.
- *
- */
-
-char *
-start_of_text (void)
-{
-  return ((char *) 0x10000000);
-}


  reply	other threads:[~2013-02-11 21:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-07  9:49 bug#13650: Emacs pretest 24.2.93 - compilation error on AIX 5.3 using gcc 4.7-2 Gilles Pion
2013-02-07 10:57 ` Gilles Pion
2013-02-07 17:47   ` Glenn Morris
2013-02-07 21:17     ` Paul Eggert
2013-02-07 21:42       ` Glenn Morris
2013-02-08  7:09       ` Gilles Pion
2013-02-11  7:51       ` Gilles Pion
2013-02-11 21:18         ` Paul Eggert [this message]
2013-02-12  8:06           ` Gilles Pion
2013-02-12 19:03             ` Paul Eggert
2013-02-13 11:27               ` Gilles Pion
2013-02-13 18:37                 ` Glenn Morris
2013-02-13 23:13                   ` Paul Eggert
2013-02-13 23:33                     ` Glenn Morris
2013-02-14  2:49                       ` Paul Eggert
2013-02-14  7:28                         ` Gilles Pion
2013-02-14  7:32                           ` Paul Eggert
2013-02-14  7:43                             ` Gilles Pion
2013-02-14  7:56                               ` Paul Eggert
2013-02-14  8:09                                 ` Gilles Pion
2013-02-14 14:57                               ` Paul Eggert
2013-02-14 15:11                                 ` Gilles Pion
2013-02-14 15:46                                   ` Stefan Monnier
2013-02-14 22:23                                     ` Paul Eggert
2013-02-14 23:51                                       ` Glenn Morris

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=51196012.8010708@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=13650@debbugs.gnu.org \
    --cc=gilles.pion@gmail.com \
    /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.