From owner-freebsd-ports Tue Oct 13 22:30:06 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA12326 for freebsd-ports-outgoing; Tue, 13 Oct 1998 22:30:06 -0700 (PDT) (envelope-from owner-freebsd-ports@FreeBSD.ORG) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA12314 for ; Tue, 13 Oct 1998 22:30:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.8/8.8.5) id WAA12715; Tue, 13 Oct 1998 22:30:01 -0700 (PDT) Received: (from nobody@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA11995; Tue, 13 Oct 1998 22:28:27 -0700 (PDT) (envelope-from nobody) Message-Id: <199810140528.WAA11995@hub.freebsd.org> Date: Tue, 13 Oct 1998 22:28:27 -0700 (PDT) From: taoka@infonets.hiroshima-u.ac.jp To: freebsd-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: www-1.0 Subject: ports/8314: xemacs-19 (addtional ELF patch) Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 8314 >Category: ports >Synopsis: xemacs-19 (addtional ELF patch) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Oct 13 22:30:01 PDT 1998 >Last-Modified: >Originator: Satoshi Taoka >Organization: Hiroshima Univ. in Japan >Release: FreeBSD 3.0-19980928-BETA >Environment: >Description: xemacs-19 (addtional ELF patch) Now editors/xemacs is marked with BROKEN_ELF. Please try installing xemacs-19 after the new patch-ah replace the current patch-ah. Note that unexelf.c after doing is equal to one of xemacs-20.3. >How-To-Repeat: >Fix: [the new patch-ah] diff -ru orig/s/freebsd.h src/s/freebsd.h --- orig/s/freebsd.h Mon Oct 13 07:05:45 1997 +++ src/s/freebsd.h Wed Sep 30 12:08:58 1998 @@ -53,10 +53,27 @@ /* freebsd has POSIX-style pgrp behavior. */ #define GETPGRP_NO_ARG +#ifdef __ELF__ /* since from 3.0-CURRENT(maybe 19980831 or later) */ +#ifndef NOT_C_CODE +#include +#endif +#define LD_SWITCH_SYSTEM +#define START_FILES pre-crt0.o /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o +#define UNEXEC unexelf.o +#define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o /usr/lib/crtn.o +#undef LIB_GCC +#define LIB_GCC + +#else /* not __ELF__ */ + #ifndef NO_SHARED_LIBS #define LD_SWITCH_SYSTEM -e start -dc -dp #define HAVE_TEXT_START /* No need to define `start_of_text'. */ +#if __FreeBSD_version >= 300002 +#define START_FILES pre-crt0.o /usr/lib/aout/crt0.o +#else /* __FreeBSD_version < 300002 */ #define START_FILES pre-crt0.o /usr/lib/crt0.o +#endif /* __FreeBSD_version < 300002 */ #define UNEXEC unexfreebsd.o #define RUN_TIME_REMAP @@ -73,6 +90,8 @@ #define A_TEXT_SEEK(hdr) (N_TXTOFF(hdr) + A_TEXT_OFFSET(hdr)) #endif /* __FreeBSD__ */ #endif /* NO_SHARED_LIBS */ + +#endif /* not __ELF__ */ #define HAVE_GETLOADAVG #define NO_TERMIO diff -ru orig/unexelf.c src/unexelf.c --- src/unexelf.c.orig Wed Dec 18 12:38:00 1996 +++ src/unexelf.c Wed Oct 14 11:37:33 1998 @@ -680,7 +680,7 @@ 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_bss_addr - NEW_PROGRAM_H (n).p_vaddr; 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 +845,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)); } >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message