From: Eli Zaretskii <eliz@gnu.org>
To: David Kuehling <dvdkhlng@gmx.de>
Cc: raeburn@raeburn.org, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Some OpenWrt port related problems
Date: Sat, 01 Jan 2011 17:34:18 +0200 [thread overview]
Message-ID: <83ei8wprid.fsf@gnu.org> (raw)
In-Reply-To: <8739pc9039.fsf@snail.Pool>
> From: David Kuehling <dvdkhlng@gmx.de>
> Date: Sat, 01 Jan 2011 15:20:58 +0100
> Cc: rms@gnu.org, Emacs Dev <emacs-devel@gnu.org>
>
> 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?
next prev parent reply other threads:[~2011-01-01 15:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-28 10:15 Some OpenWrt port related problems David Kuehling
2010-12-28 19:36 ` Stefan Monnier
2010-12-28 21:12 ` David Kuehling
2010-12-28 22:02 ` Stefan Monnier
2010-12-29 9:37 ` David Kuehling
2010-12-29 7:47 ` Richard Stallman
2010-12-29 9:28 ` David Kuehling
2010-12-30 4:08 ` Ken Raeburn
2011-01-01 14:20 ` David Kuehling
2011-01-01 15:06 ` Andreas Schwab
2011-01-01 15:34 ` Eli Zaretskii [this message]
2011-01-02 1:35 ` Ken Raeburn
2011-01-02 13:53 ` David Kuehling
2011-01-02 14:44 ` Stefan Monnier
2011-01-02 14:55 ` David Kuehling
2011-01-02 20:35 ` Ken Raeburn
2011-01-02 21:12 ` David Kuehling
2011-01-03 9:32 ` David Kuehling
2010-12-30 16:06 ` Richard Stallman
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=83ei8wprid.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=dvdkhlng@gmx.de \
--cc=emacs-devel@gnu.org \
--cc=raeburn@raeburn.org \
--cc=rms@gnu.org \
/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.