From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Some OpenWrt port related problems Date: Sat, 01 Jan 2011 17:34:18 +0200 Message-ID: <83ei8wprid.fsf@gnu.org> References: <87sjxi5hko.fsf@snail.Pool> <87lj39y52n.fsf@snail.Pool> <87pqsl7wt7.fsf@snail.Pool> <66798668-5808-473B-BF11-DF4DBA5464A1@raeburn.org> <8739pc9039.fsf@snail.Pool> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1293895993 22314 80.91.229.12 (1 Jan 2011 15:33:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 1 Jan 2011 15:33:13 +0000 (UTC) Cc: raeburn@raeburn.org, rms@gnu.org, emacs-devel@gnu.org To: David Kuehling Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 01 16:33:08 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PZ3S8-0006gP-6j for ged-emacs-devel@m.gmane.org; Sat, 01 Jan 2011 16:33:08 +0100 Original-Received: from localhost ([127.0.0.1]:33548 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZ3S7-0003DN-Mm for ged-emacs-devel@m.gmane.org; Sat, 01 Jan 2011 10:33:07 -0500 Original-Received: from [140.186.70.92] (port=60493 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PZ3S2-0003DH-R1 for emacs-devel@gnu.org; Sat, 01 Jan 2011 10:33:03 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PZ3S1-000423-Kr for emacs-devel@gnu.org; Sat, 01 Jan 2011 10:33:02 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:49671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PZ3S1-00041y-DC; Sat, 01 Jan 2011 10:33:01 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LEC00K00O52JL00@a-mtaout22.012.net.il>; Sat, 01 Jan 2011 17:32:10 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.127.127.157]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LEC00J9VOHKJKG0@a-mtaout22.012.net.il>; Sat, 01 Jan 2011 17:32:10 +0200 (IST) In-reply-to: <8739pc9039.fsf@snail.Pool> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134113 Archived-At: > From: David Kuehling > Date: Sat, 01 Jan 2011 15:20:58 +0100 > Cc: rms@gnu.org, Emacs Dev > > Loading ediff-hook... > Finding pointers to doc strings... > Finding pointers to doc strings...done > emacs: Can't allocate buffer for /usr/bin/emacs > > So it wants to pull a full copy of the emacs binary into memory? It tries to mmap it, yes: old_file_size = stat_buf.st_size; old_base = mmap (NULL, old_file_size, PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, mmap_fd, 0); if (old_base == MAP_FAILED) fatal ("Can't allocate buffer for %s\n", old_name, 0); > $ echo "1" > /proc/sys/vm/overcommit_memory > $ emacs -Q --batch --eval \ > '(dump-emacs "./demacs" "/usr/bin/emacs")' > > [..] > Finding pointers to doc strings... > Finding pointers to doc strings...done > emacs: Program segment above .bss in /usr/bin/emacs > > So what's that supposed to mean? This message comes from this portion of unexelf.c: /* Fix up a new program header. Extend the writable data segment so that the bss area is covered too. Find that segment by looking for a segment that ends just before the .bss area. Make sure that no segments are above the new .data2. Put a loop at the end to adjust the offset and address of any segment that is above data2, just in case we decide to allow this later. */ for (n = new_file_h->e_phnum - 1; n >= 0; n--) { /* Compute maximum of all requirements for alignment of section. */ ElfW(Word) alignment = (NEW_PROGRAM_H (n)).p_align; if ((OLD_SECTION_H (old_bss_index)).sh_addralign > alignment) alignment = OLD_SECTION_H (old_bss_index).sh_addralign; #ifdef __sgi /* According to r02kar@x4u2.desy.de (Karsten Kuenne) and oliva@gnu.org (Alexandre Oliva), on IRIX 5.2, we always get "Program segment above .bss" when dumping when the executable doesn't have an sbss section. */ if (old_sbss_index != -1) #endif /* __sgi */ if (NEW_PROGRAM_H (n).p_vaddr + NEW_PROGRAM_H (n).p_filesz > (old_sbss_index == -1 ? old_bss_addr : round_up (old_bss_addr, alignment))) fatal ("Program segment above .bss in %s\n", old_name, 0); I don't know enough about unexelf, nor about ELF in general, to tell what this means or what to do about this, though. Anyone?