head 1.15; access; symbols pkgsrc-2013Q2:1.15.0.26 pkgsrc-2013Q2-base:1.15 pkgsrc-2012Q4:1.15.0.24 pkgsrc-2012Q4-base:1.15 pkgsrc-2011Q4:1.15.0.22 pkgsrc-2011Q4-base:1.15 pkgsrc-2011Q2:1.15.0.20 pkgsrc-2011Q2-base:1.15 pkgsrc-2009Q4:1.15.0.18 pkgsrc-2009Q4-base:1.15 pkgsrc-2008Q4:1.15.0.16 pkgsrc-2008Q4-base:1.15 pkgsrc-2008Q3:1.15.0.14 pkgsrc-2008Q3-base:1.15 cube-native-xorg:1.15.0.12 cube-native-xorg-base:1.15 pkgsrc-2008Q2:1.15.0.10 pkgsrc-2008Q2-base:1.15 pkgsrc-2008Q1:1.15.0.8 pkgsrc-2008Q1-base:1.15 pkgsrc-2007Q4:1.15.0.6 pkgsrc-2007Q4-base:1.15 pkgsrc-2007Q3:1.15.0.4 pkgsrc-2007Q3-base:1.15 pkgsrc-2007Q2:1.15.0.2 pkgsrc-2007Q2-base:1.15 pkgsrc-2007Q1:1.14.0.8 pkgsrc-2007Q1-base:1.14 pkgsrc-2006Q4:1.14.0.6 pkgsrc-2006Q4-base:1.14 pkgsrc-2006Q3:1.14.0.4 pkgsrc-2006Q3-base:1.14 pkgsrc-2006Q2:1.14.0.2 pkgsrc-2006Q2-base:1.14 pkgsrc-2006Q1:1.13.0.20 pkgsrc-2006Q1-base:1.13 pkgsrc-2005Q4:1.13.0.18 pkgsrc-2005Q4-base:1.13 pkgsrc-2005Q3:1.13.0.16 pkgsrc-2005Q3-base:1.13 pkgsrc-2005Q2:1.13.0.14 pkgsrc-2005Q2-base:1.13 pkgsrc-2005Q1:1.13.0.12 pkgsrc-2005Q1-base:1.13 pkgsrc-2004Q4:1.13.0.10 pkgsrc-2004Q4-base:1.13 pkgsrc-2004Q3:1.13.0.8 pkgsrc-2004Q3-base:1.13 pkgsrc-2004Q2:1.13.0.6 pkgsrc-2004Q2-base:1.13 pkgsrc-2004Q1:1.13.0.4 pkgsrc-2004Q1-base:1.13 pkgsrc-2003Q4:1.13.0.2 pkgsrc-2003Q4-base:1.13 netbsd-1-6-1:1.12.0.6 netbsd-1-6-1-base:1.12 netbsd-1-6:1.12.0.8 netbsd-1-6-RELEASE-base:1.12 pkgviews:1.12.0.4 pkgviews-base:1.12 buildlink2:1.12.0.2 buildlink2-base:1.12 netbsd-1-5-PATCH003:1.12 netbsd-1-5-PATCH001:1.12 netbsd-1-5-RELEASE:1.12 netbsd-1-4-PATCH003:1.12 netbsd-1-4-PATCH002:1.8 comdex-fall-1999:1.5 netbsd-1-4-PATCH001:1.4 netbsd-1-4-RELEASE:1.1; locks; strict; comment @# @; 1.15 date 2007.06.11.13.57.20; author markd; state dead; branches; next 1.14; 1.14 date 2006.04.05.22.22.16; author markd; state Exp; branches; next 1.13; 1.13 date 2003.04.11.00.50.57; author uebayasi; state dead; branches 1.13.20.1; next 1.12; 1.12 date 2000.09.26.21.42.35; author eeh; state Exp; branches; next 1.11; 1.11 date 2000.09.03.14.44.41; author wiz; state Exp; branches; next 1.10; 1.10 date 2000.08.23.16.20.18; author toshii; state Exp; branches; next 1.9; 1.9 date 2000.06.24.17.03.39; author minoura; state Exp; branches; next 1.8; 1.8 date 2000.02.18.23.57.54; author mycroft; state Exp; branches; next 1.7; 1.7 date 2000.02.18.23.55.15; author mycroft; state Exp; branches; next 1.6; 1.6 date 99.12.28.14.09.14; author tron; state Exp; branches; next 1.5; 1.5 date 99.11.05.11.04.28; author mrg; state Exp; branches; next 1.4; 1.4 date 99.06.12.22.39.27; author cgd; state Exp; branches; next 1.3; 1.3 date 99.06.04.04.15.44; author mycroft; state Exp; branches; next 1.2; 1.2 date 99.06.04.03.42.35; author mycroft; state Exp; branches; next 1.1; 1.1 date 99.02.04.14.54.25; author frueauf; state Exp; branches; next ; 1.13.20.1 date 2006.04.26.15.20.27; author salo; state Exp; branches; next ; desc @@ 1.15 log @Update emacs{,-nox11} to 22.1. update based in part on wip/emacs-current and wip/emacs22 packages. Many many changes since 21.4a. Read NEWS file for details. @ text @$NetBSD: patch-az,v 1.14 2006/04/05 22:22:16 markd Exp $ --- src/ralloc.c.orig 2001-02-20 01:19:40.000000000 +1300 +++ src/ralloc.c @@@@ -328,7 +328,7 @@@@ static void relinquish () { register heap_ptr h; - int excess = 0; + long excess = 0; /* Add the amount of space beyond break_value in all heaps which have extend beyond break_value at all. */ @ 1.14 log @Pass the correct sized argument to sbrk() when trying to reduce the break so that on 64bit systems it is actually a negative number, not a very large positive one. Should fix PR pkg/29351. Thanks to Martijn van Buul for giving me access to an amd64 box so I could track this down. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD$ @ 1.13 log @Remove old patches @ text @d1 1 a1 1 $NetBSD: patch-az,v 1.12 2000/09/26 21:42:35 eeh Exp $ d3 8 a10 12 --- src/unexelf.c.orig Mon May 15 01:14:02 2000 +++ src/unexelf.c Tue Sep 26 14:18:05 2000 @@@@ -470,7 +470,7 @@@@ /* * NetBSD does not have normal-looking user-land ELF support. */ -# ifdef __alpha__ +# if defined(__alpha__) || defined(__sparc_v9__) # define ELFSIZE 64 # else # define ELFSIZE 32 @@@@ -479,6 +479,7 @@@@ d12 2 a13 156 # ifndef PT_LOAD # define PT_LOAD Elf_pt_load +# define SHT_PROGBITS Elf_sht_progbits # define SHT_SYMTAB Elf_sht_symtab # define SHT_DYNSYM Elf_sht_dynsym # define SHT_NULL Elf_sht_null @@@@ -495,9 +496,14 @@@@ # include # define HDRR struct ecoff_symhdr # define pHDRR HDRR * -# endif +# endif /* __alpha__ */ #endif /* __NetBSD__ */ +# ifdef __mips__ +# define SHT_MIPS_DEBUG DT_MIPS_FLAGS +# define HDRR struct Elf_Shdr +# endif /* __mips__ */ + #ifdef __OpenBSD__ # include #endif @@@@ -512,7 +518,7 @@@@ # else # define ElfBitsW(bits, type) Elf/**/bits/**/_/**/type # endif -# ifdef _LP64 +# if defined (_LP64) || defined(__alpha__) # define ELFSIZE 64 # else # define ELFSIZE 32 @@@@ -522,6 +528,14 @@@@ # define ElfW(type) ElfExpandBitsW (ELFSIZE, type) #endif +#if defined ( __sony_news) && defined (_SYSTYPE_SYSV) +# define HAVE_MIPS_SBSS +#endif + +#if defined (__mips__) && (defined(__NetBSD__) || defined(__OpenBSD__)) +# define HAVE_MIPS_SBSS +#endif + #ifndef ELF_BSS_SECTION_NAME #define ELF_BSS_SECTION_NAME ".bss" #endif @@@@ -613,12 +627,53 @@@@ if (noerror) return -1; else - fatal ("Can't find %s in %s.\n", name, file_name, 0); + fatal ("Can't find %s in %s.\n", name, file_name); } return idx; } +#if defined(__alpha__) || (defined ( __sony_news) && defined (_SYSTYPE_SYSV)) +/* We are using ECOFF symbols embedded in ELF. */ + +void +relocate_ecoff_symhdr(symhdr, diff) + HDRR *symhdr; + ElfW(Word) diff; +{ + symhdr->cbLineOffset += diff; + symhdr->cbDnOffset += diff; + symhdr->cbPdOffset += diff; + symhdr->cbSymOffset += diff; + symhdr->cbOptOffset += diff; + symhdr->cbAuxOffset += diff; + symhdr->cbSsOffset += diff; + symhdr->cbSsExtOffset += diff; + symhdr->cbFdOffset += diff; + symhdr->cbRfdOffset += diff; + symhdr->cbExtOffset += diff; +} +#endif /* __alpha__ or __sony_news and systype_sysv */ + +#ifdef notyet +void +relocate_elf_proghdr(p, diff) + HDRR *symhdr; + Elfw(Word) diff; +{ + phdr->sh_name += diff; + phdr->sh_type += diff; + phdr->sh_flags += diff; + phdr->sh_addr += diff; + phdr->sh_offset += diff; + phdr->sh_size += diff; + phdr->sh_link += diff; + phdr->sh_info += diff; + phdr->sh_addralign += diff; + phdr->sh_entsize += diff; +}; +#endif /* notyet */ + /* **************************************************************** * unexec * @@@@ -1005,22 +1060,11 @@@@ == 0) { pHDRR symhdr = (pHDRR) (NEW_SECTION_H (nn).sh_offset + new_base); - - symhdr->cbLineOffset += new_data2_size; - symhdr->cbDnOffset += new_data2_size; - symhdr->cbPdOffset += new_data2_size; - symhdr->cbSymOffset += new_data2_size; - symhdr->cbOptOffset += new_data2_size; - symhdr->cbAuxOffset += new_data2_size; - symhdr->cbSsOffset += new_data2_size; - symhdr->cbSsExtOffset += new_data2_size; - symhdr->cbFdOffset += new_data2_size; - symhdr->cbRfdOffset += new_data2_size; - symhdr->cbExtOffset += new_data2_size; + relocate_ecoff_symhdr(symhdr, new_data2_size); } #endif /* __alpha__ */ -#if defined (__sony_news) && defined (_SYSTYPE_SYSV) +#ifdef HAVE_MIPS_SBSS if (NEW_SECTION_H (nn).sh_type == SHT_MIPS_DEBUG && old_mdebug_index != -1) { @@@@ -1030,20 +1074,17 @@@@ if (diff) { - phdr->cbLineOffset += diff; - phdr->cbDnOffset += diff; - phdr->cbPdOffset += diff; - phdr->cbSymOffset += diff; - phdr->cbOptOffset += diff; - phdr->cbAuxOffset += diff; - phdr->cbSsOffset += diff; - phdr->cbSsExtOffset += diff; - phdr->cbFdOffset += diff; - phdr->cbRfdOffset += diff; - phdr->cbExtOffset += diff; +#if defined ( __sony_news) && defined (_SYSTYPE_SYSV) + relocate_ecoff_symhdr(phdr, diff); +#else + /* xxxBSD with GNU binutils has .mdebug, but not ecoff(???) */ +#ifdef DEBUG + printf("Dont know how to relocate mdebug syms by %0x\n", diff); +#endif +#endif } } -#endif /* __sony_news && _SYSTYPE_SYSV */ +#endif /* HAVE_MIPS_SBSS */ #if __sgi /* Adjust the HDRR offsets in .mdebug and copy the @ 1.13.20.1 log @Pullup ticket 1452 - requested by markd portability fix for emacs Revisions pulled up: - pkgsrc/editors/emacs/Makefile 1.92 - pkgsrc/editors/emacs/distinfo 1.27 - pkgsrc/editors/emacs/patches/patch-az 1.14 - pkgsrc/editors/emacs-nox11/Makefile 1.21 Module Name: pkgsrc Committed By: markd Date: Wed Apr 5 22:22:16 UTC 2006 Modified Files: pkgsrc/editors/emacs: Makefile distinfo pkgsrc/editors/emacs-nox11: Makefile Added Files: pkgsrc/editors/emacs/patches: patch-az Log Message: Pass the correct sized argument to sbrk() when trying to reduce the break so that on 64bit systems it is actually a negative number, not a very large positive one. Should fix PR pkg/29351. Thanks to Martijn van Buul for giving me access to an amd64 box so I could track this down. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD: patch-az,v 1.14 2006/04/05 22:22:16 markd Exp $ d3 12 a14 8 --- src/ralloc.c.orig 2001-02-20 01:19:40.000000000 +1300 +++ src/ralloc.c @@@@ -328,7 +328,7 @@@@ static void relinquish () { register heap_ptr h; - int excess = 0; + long excess = 0; d16 156 a171 2 /* Add the amount of space beyond break_value in all heaps which have extend beyond break_value at all. */ @ 1.12 log @Add support for NetBSD/sparc64. @ text @d1 1 a1 1 $NetBSD$ @ 1.11 log @add RCS Id @ text @d2 12 a13 2 --- src/unexelf.c.orig Mon May 15 17:14:02 2000 +++ src/unexelf.c Wed Aug 23 21:25:31 2000 @ 1.10 log @fix build failure on alpha, and merge patch-ac into patch-az @ text @d1 1 @ 1.9 log @Updated to 20.7. Tests needed. @ text @a0 2 $NetBSD: patch-az,v 1.8 2000/02/18 23:57:54 mycroft Exp $ d2 10 a11 2 +++ src/unexelf.c Sun Jun 18 09:44:41 2000 @@@@ -495,9 +495,14 @@@@ d27 10 a36 1 @@@@ -522,6 +527,14 @@@@ d51 1 a51 1 @@@@ -613,12 +626,53 @@@@ d106 1 a106 1 @@@@ -1005,22 +1059,11 @@@@ d131 1 a131 1 @@@@ -1030,20 +1073,17 @@@@ @ 1.8 log @GC @ text @d1 1 a1 1 $NetBSD: patch-az,v 1.7 2000/02/18 23:55:15 mycroft Exp $ d3 3 a5 28 --- src/unexelf.c.orig Fri Dec 3 04:09:21 1999 +++ src/unexelf.c Fri Feb 18 18:56:56 2000 @@@@ -478,6 +478,13 @@@@ # endif # include +#include + +/* NetBSD 1.4M has sane */ + +#if !defined(__NetBSD_Version__) || __NetBSD_Version__ < 104130000 +# include + # define PT_LOAD Elf_pt_load # define SHT_SYMTAB Elf_sht_symtab # define SHT_DYNSYM Elf_sht_dynsym @@@@ -490,6 +497,10 @@@@ # define SHN_ABS Elf_eshn_absolute # define SHN_COMMON Elf_eshn_common +#else +# include +#endif + /* * The magic of picking the right size types is handled by the ELFSIZE * definition above. @@@@ -504,9 +515,14 @@@@ d21 2 a22 2 @@@@ -530,6 +546,14 @@@@ extern void fatal (char *, ...); d36 9 a44 2 @@@@ -588,6 +612,47 @@@@ return x - rem + y; d91 1 a91 1 @@@@ -983,22 +1048,11 @@@@ d113 2 a114 1 if (NEW_SECTION_H (nn).sh_type == SHT_MIPS_DEBUG && old_mdebug_index) d116 1 a116 2 int diff = NEW_SECTION_H(nn).sh_offset @@@@ -1007,20 +1061,17 @@@@ @ 1.7 log @Make this work on MIPS again. @ text @d1 1 a1 1 $NetBSD: patch-az,v 1.6 1999/12/28 14:09:14 tron Exp $ d4 1 a4 1 +++ src/unexelf.c Fri Feb 18 18:23:34 2000 d109 1 a109 41 @@@@ -829,6 +894,10 @@@@ if (n < 0) fatal ("Couldn't find segment next to .bss in %s\n", old_name, 0); +#ifdef HAVE_MIPS_SBSSxxx + bss_phdr_index = n; +#endif + /* Make sure that the size includes any padding before the old .bss section. */ NEW_PROGRAM_H (n).p_filesz = new_bss_addr - NEW_PROGRAM_H (n).p_vaddr; @@@@ -908,6 +977,28 @@@@ this section will be placed in exactly the same place. */ NEW_SECTION_H (nn).sh_addralign = OLD_SECTION_H (nn).sh_addralign; NEW_SECTION_H (nn).sh_size = 0; + +#ifdef HAVE_MIPS_SBSSxxx + /* On ELF mips, the new data section replaces both .sbss and .bss + (we have, after all, written to them.). Adding new_data2_size + to the sh_addr and sh_offset of sbss puts sbss at the end of + the new data section. setting the size to zero makes it empty. + But then, adding the new_data2_size to the bss address puts + its start beyond the end of the original bss. If the sbss size + was bigger than a page, the bss ends up not covered by the + program header. This breaks strip. Since both sbss and bss + are zero-sized, just use the same address and file offset for + both, guaranteeing other tools will assign them to the same + program section (asssuming no sections are loaded at higher + offsets.) */ + if (n == old_bss_index) { + int new_sbss_bss_padding = NEW_SECTION_H(nn).sh_addr - + NEW_SECTION_H(nn - 1).sh_addr; + printf("sbss to bss offset =0x%x\n", new_sbss_bss_padding); + NEW_SECTION_H(nn).sh_addr =NEW_SECTION_H(nn - 1).sh_addr; + NEW_SECTION_H(nn).sh_offset =NEW_SECTION_H(nn - 1).sh_offset; + } +#endif /* HAVE_MIPS_SBSS */ } else { @@@@ -983,22 +1074,11 @@@@ d134 1 a134 1 @@@@ -1007,20 +1087,17 @@@@ @ 1.6 log @Update "emacs" package to version 20.5a based on patches supplied by Minoura Makoto in PR pkg/9014. This version fixes several bugs discovered since version 20.3 and support a precompiled user startup file (".emacs.el" and ".emacs.elc"). @ text @d1 1 a1 1 $NetBSD: patch-az,v 1.5 1999/11/05 11:04:28 mrg Exp $ d3 2 a4 2 --- src/unexelf.c.orig Fri Dec 17 15:48:53 1999 +++ src/unexelf.c Fri Dec 17 15:55:21 1999 d113 1 a113 1 +#ifdef HAVE_MIPS_SBSS d125 1 a125 1 +#ifdef HAVE_MIPS_SBSS @ 1.5 log @make this work with NetBSD @ text @d1 1 a1 1 $NetBSD: patch-az,v 1.4 1999/06/12 22:39:27 cgd Exp $ d3 3 a5 5 --- src/unexelf.c.orig Mon Aug 10 12:33:12 1998 +++ src/unexelf.c Fri Nov 5 21:35:39 1999 @@@@ -473,6 +473,12 @@@@ # else # define ELFSIZE 32 d7 2 a8 1 + d14 2 a15 2 # include d17 3 a19 1 @@@@ -487,6 +493,10 @@@@ d30 1 a30 1 @@@@ -501,9 +511,16 @@@@ d35 3 a37 2 +# endif /* __alpha__*/ + a42 3 #endif /* __NetBSD__ */ + d46 1 a46 1 @@@@ -527,6 +544,14 @@@@ d54 1 a54 1 +#if (defined (__mips__) || defined (__powerpc__)) && (defined(__NetBSD__) || defined(__OpenBSD__)) d61 1 a61 1 @@@@ -585,6 +610,47 @@@@ d91 1 a91 1 + ElfW(Word) diff; d109 1 a109 66 @@@@ -620,9 +686,10 @@@@ ElfW(Addr) new_data2_addr; int n, nn, old_bss_index, old_data_index, new_data2_index; -#if defined ( __sony_news) && defined (_SYSTYPE_SYSV) +#ifdef HAVE_MIPS_SBSS int old_sbss_index, old_mdebug_index; -#endif /* __sony_news && _SYSTYPE_SYSV */ + int bss_phdr_index; +#endif /* HAVE_MIPS_SBSS */ struct stat stat_buf; /* Open the old file & map it into the address space. */ @@@@ -672,7 +739,7 @@@@ if (old_bss_index == old_file_h->e_shnum) fatal ("Can't find .bss in %s.\n", old_name, 0); -#if defined (__sony_news) && defined (_SYSTYPE_SYSV) +#ifdef HAVE_MIPS_SBSS for (old_sbss_index = 1; old_sbss_index < (int) old_file_h->e_shnum; old_sbss_index++) { @@@@ -713,10 +780,10 @@@@ } if (old_mdebug_index == old_file_h->e_shnum) old_mdebug_index = 0; -#else /* not (__sony_news && _SYSTYPE_SYSV) */ +#else /* not HAVE_MIPS_SBSS */ old_bss_addr = OLD_SECTION_H (old_bss_index).sh_addr; old_bss_size = OLD_SECTION_H (old_bss_index).sh_size; -#endif /* not (__sony_news && _SYSTYPE_SYSV) */ +#endif /* not HAVE_MIPS_SBSS */ #if defined (emacs) || !defined (DEBUG) new_bss_addr = (ElfW(Addr)) sbrk (0); #else @@@@ -724,9 +791,9 @@@@ #endif new_data2_addr = old_bss_addr; new_data2_size = new_bss_addr - old_bss_addr; -#if !defined (__sony_news) || !defined (_SYSTYPE_SYSV) +#ifndef HAVE_MIPS_SBSS new_data2_offset = OLD_SECTION_H (old_bss_index).sh_offset; -#endif /* not (__sony_news && _SYSTYPE_SYSV) */ +#endif /* not HAVE_MIPS_SBSS */ #ifdef DEBUG fprintf (stderr, "old_bss_index %d\n", old_bss_index); @@@@ -811,14 +878,14 @@@@ if ((OLD_SECTION_H (old_bss_index)).sh_addralign > alignment) alignment = OLD_SECTION_H (old_bss_index).sh_addralign; -#if defined (__sony_news) && defined (_SYSTYPE_SYSV) +#ifdef HAVE_MIPS_SBSS if (NEW_PROGRAM_H (n).p_vaddr + NEW_PROGRAM_H (n).p_filesz > round_up (old_bss_addr, alignment)) fatal ("Program segment above .bss in %s\n", old_name, 0); -#else /* not (__sony_news && _SYSTYPE_SYSV) */ +#else /* not HAVE_MIPS_SBSS */ if (NEW_PROGRAM_H (n).p_vaddr + NEW_PROGRAM_H (n).p_filesz > old_bss_addr) fatal ("Program segment above .bss in %s\n", old_name, 0); -#endif /* not (__sony_news && _SYSTYPE_SYSV) */ +#endif /* not HAVE_MIPS_SBSS */ if (NEW_PROGRAM_H (n).p_type == PT_LOAD && (round_up ((NEW_PROGRAM_H (n)).p_vaddr @@@@ -830,11 +897,16 @@@@ d120 1 a120 40 NEW_PROGRAM_H (n).p_memsz = NEW_PROGRAM_H (n).p_filesz; + #if 0 /* Maybe allow section after data2 - does this ever happen? */ for (n = new_file_h->e_phnum - 1; n >= 0; n--) { @@@@ -867,15 +939,15 @@@@ { caddr_t src; int temp_index; -#if defined (__sony_news) && defined (_SYSTYPE_SYSV) +#ifdef HAVE_MIPS_SBSS /* If it is (s)bss section, insert the new data2 section before it. */ /* new_data2_index is the index of either old_sbss or old_bss, that was chosen as a section for new_data2. */ temp_index = new_data2_index; -#else /* not (__sony_news && _SYSTYPE_SYSV) */ +#else /* not HAVE_MIPS_SBSS */ /* If it is bss section, insert the new data2 section before it. */ temp_index = old_bss_index; -#endif /* not (__sony_news && _SYSTYPE_SYSV) */ +#endif /* not HAVE_MIPS_SBSS */ if (n == temp_index) { /* Steal the data section header for this data2 section. */ @@@@ -901,11 +973,11 @@@@ old_file_h->e_shentsize); if (n == old_bss_index -#if defined (__sony_news) && defined (_SYSTYPE_SYSV) +#ifdef HAVE_MIPS_SBSS /* The new bss and sbss section's size is zero, and its file offset and virtual address should be off by NEW_DATA2_SIZE. */ || n == old_sbss_index -#endif /* __sony_news and _SYSTYPE_SYSV */ +#endif /* HAVE_MIPS_SBSS */ ) { /* NN should be `old_bss_index + 1' at this point. */ @@@@ -916,6 +988,28 @@@@ d149 1 a149 18 @@@@ -970,14 +1064,14 @@@@ || !strcmp ((old_section_names + NEW_SECTION_H(n).sh_name), ".sdata") #endif -#if defined (__sony_news) && defined (_SYSTYPE_SYSV) +#ifdef HAVE_MIPS_SBSS || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), ".sdata") || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), ".lit4") || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), ".lit8") -#endif /* __sony_news && _SYSTYPE_SYSV */ +#endif /* HAVE_MIPS_SBSS */ || !strcmp ((old_section_names + NEW_SECTION_H (n).sh_name), ".data1")) src = (caddr_t) OLD_SECTION_H (n).sh_addr; @@@@ -993,18 +1087,7 @@@@ d169 6 a174 1 @@@@ -1017,20 +1100,11 @@@@ d189 1 d191 6 d200 4 a203 5 +#endif /* __sony_news and systype_sysv */ + /* If it is the symbol table, its st_shndx field needs to be patched. */ if (NEW_SECTION_H (nn).sh_type == SHT_SYMTAB || NEW_SECTION_H (nn).sh_type == SHT_DYNSYM) @ 1.4 log @ElfW, not ElfW, in the new code being added by this patch. lets this patched code compile on alpha again! @ text @d1 1 a1 1 $NetBSD: patch-az,v 1.3 1999/06/04 04:15:44 mycroft Exp $ d3 27 a29 3 --- src/unexelf.c.orig Sun Aug 9 22:33:12 1998 +++ src/unexelf.c Thu Jun 3 23:31:50 1999 @@@@ -501,9 +501,16 @@@@ d47 1 a47 1 @@@@ -527,6 +534,14 @@@@ d62 1 a62 1 @@@@ -585,6 +600,47 @@@@ d110 1 a110 1 @@@@ -620,9 +676,10 @@@@ d123 1 a123 1 @@@@ -672,7 +729,7 @@@@ d132 1 a132 1 @@@@ -713,10 +770,10 @@@@ d145 1 a145 1 @@@@ -724,9 +781,9 @@@@ d157 1 a157 1 @@@@ -811,14 +868,14 @@@@ d175 1 a175 1 @@@@ -830,11 +887,16 @@@@ d192 1 a192 1 @@@@ -867,15 +929,15 @@@@ d211 1 a211 1 @@@@ -901,11 +963,11 @@@@ d225 1 a225 1 @@@@ -916,6 +978,28 @@@@ d254 1 a254 1 @@@@ -970,14 +1054,14 @@@@ d271 1 a271 1 @@@@ -993,18 +1077,7 @@@@ d291 1 a291 1 @@@@ -1017,20 +1090,11 @@@@ @ 1.3 log @Must remember to get the paths right... @ text @d1 1 a1 1 $NetBSD: patch-az,v 1.2 1999/06/04 03:42:35 mycroft Exp $ d48 1 a48 1 + Elfw(Word) diff; d68 1 a68 1 + Elfw(Word) diff; @ 1.2 log @I'm not going to pretend to fully grok the ELF magick, but this makes Emacs work on the macppc port. @ text @d1 1 a1 1 $NetBSD$ d3 2 a4 2 --- unexelf.c.orig Sun Aug 9 22:33:12 1998 +++ unexelf.c Thu Jun 3 23:31:50 1999 @ 1.1 log @Make UNEXEC work on NetBSD/pmax - this makes the DOC-link-trick unnecessary and emacs work much better on pmax. Thanks to Jonathan Stone for the src/unexelf.c patch. @ text @d3 2 a4 2 --- src/unexelf.c.orig Mon Aug 10 04:33:12 1998 +++ src/unexelf.c Thu Feb 4 12:46:44 1999 d31 1 a31 1 +#if defined (__mips__) && (defined(__NetBSD__) || defined(__OpenBSD__)) d247 1 a247 1 @@@@ -993,22 +1077,11 @@@@ d267 1 a267 6 -#if defined (__sony_news) && defined (_SYSTYPE_SYSV) +#ifdef HAVE_MIPS_SBSS if (NEW_SECTION_H (nn).sh_type == SHT_MIPS_DEBUG && old_mdebug_index) { int diff = NEW_SECTION_H(nn).sh_offset @@@@ -1017,20 +1090,17 @@@@ a281 1 +#if defined ( __sony_news) && defined (_SYSTYPE_SYSV) a282 6 +#else + /* xxxBSD with GNU binutils has .mdebug, but not ecoff(???) */ +#ifdef DEBUG + printf("Dont know how to relocate mdebug syms by %0x\n", diff); +#endif +#endif d286 2 a287 1 +#endif /* HAVE_MIPS_SBSS */ @