Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 02 Oct 1998 18:37:24 +0900
From:      TAOKA Satoshi <taoka@infonets.hiroshima-u.ac.jp>
To:        freebsd-ports@FreeBSD.ORG
Subject:   Re: ports/8090: ELF patch for editors/emacs (emacs-19.34b)
Message-ID:  <19981002183724E.taoka@infonets.hiroshima-u.ac.jp>
In-Reply-To: Your message of "Wed, 30 Sep 1998 01:10:01 -0700 (PDT)" <199809300810.BAA14805@freefall.freebsd.org>
References:  <199809300810.BAA14805@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

From: TAOKA Satoshi <taoka@infonets.hiroshima-u.ac.jp>
Subject: Re: ports/8090: ELF patch for editors/emacs (emacs-19.34b)
Date: Wed, 30 Sep 1998 01:10:01 -0700 (PDT)
Message-ID: <199809300810.BAA14805@freefall.freebsd.org>

> The following reply was made to PR ports/8090; it has been noted by GNATS.
> 
> From: TAOKA Satoshi <taoka@infonets.hiroshima-u.ac.jp>
> To: freebsd-gnats-submit@freebsd.org
> Cc:  Subject: Re: ports/8090: ELF patch for editors/emacs (emacs-19.34b)
> Date: Wed, 30 Sep 1998 17:09:22 +0900


On FreeBSD 3.0-19980921-BETA, there is no problem for emacs applyed
patch-ac and patch-ae in the previous two PR's. On the other hand, the 
emacs has the following problems under FreeBSD 3.0-19980928-BETA.

% strip emacs
BFD: stZ17208: warning: allocated section `.data' not in segment
BFD: stZ17208: warning: allocated section `.bss' not in segment
% emacs
segmentation fault (core dumped)

So here is new patch-ae to solve these.

--- src/unexelf.c.orig	Fri Oct  2 12:55:43 1998
+++ src/unexelf.c	Fri Oct  2 13:02:05 1998
@@ -678,7 +678,8 @@
   if (n < 0)
     fatal ("Couldn't find segment next to .bss in %s\n", old_name, 0);
 
-  NEW_PROGRAM_H (n).p_filesz += new_data2_size;
+/*  NEW_PROGRAM_H (n).p_filesz += new_data2_size; */
+  NEW_PROGRAM_H (n).p_filesz = new_bss_addr - NEW_PROGRAM_H (n).p_vaddr; /* From emacs 20.3 */
   NEW_PROGRAM_H (n).p_memsz = NEW_PROGRAM_H (n).p_filesz;
 
 #if 0 /* Maybe allow section after data2 - does this ever happen? */
@@ -845,7 +846,9 @@
 
       for (; symp < symendp; symp ++)
 	if (strcmp ((char *) (symnames + symp->st_name), "_end") == 0
-	    || strcmp ((char *) (symnames + symp->st_name), "_edata") == 0)
+	    || strcmp ((char *) (symnames + symp->st_name), "end") == 0
+	    || strcmp ((char *) (symnames + symp->st_name), "_edata") == 0
+	    || strcmp ((char *) (symnames + symp->st_name), "edata") == 0)
 	  memcpy (&symp->st_value, &new_bss_addr, sizeof (new_bss_addr));
     }
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981002183724E.taoka>