unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
To: Glenn Morris <rgm@gnu.org>
Cc: 10240@debbugs.gnu.org
Subject: bug#10240: GNUstep build fails during dumping
Date: Thu, 08 Dec 2011 09:57:07 +0900	[thread overview]
Message-ID: <wl39cv6fto.wl%mituharu@math.s.chiba-u.ac.jp> (raw)
In-Reply-To: <ul39cwtfxm.fsf@fencepost.gnu.org>

>>>>> On Wed, 07 Dec 2011 13:06:13 -0500, Glenn Morris <rgm@gnu.org> said:
YAMAMOTO Mitsuharu wrote:

>> Could you show the results of `readelf -S src/temacs' 
>> and `nm -an src/temacs | grep _OBJC_' ?

> Here you go:

> 0000000000c4d071 b _OBJC_ClassName_
> 0000000000c4d29c b _OBJC_ClassName_
> 0000000000c4d2f0 b _OBJC_ClassName_
> 0000000000c4d720 b _OBJC_ClassName_
> 0000000000c4d768 b _OBJC_ClassName_
> 0000000000c4d798 b _OBJC_ClassName_

Probably these symbols whose values are in the .bss section caused the
problem, because the current code assumes such values are in the .data
section.  Could you try the patch at the end of this mail?

> Just to say again: `/bin/pwd`/temacs --batch --load loadup bootstrap
> in isolation works fine, but it fails every time when make calls the
> same command, dumping 40MB of 0s.

Currently I have no idea why such a difference in invocation causes
different results.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp

=== modified file 'src/unexelf.c'
*** src/unexelf.c	2011-11-14 21:00:24 +0000
--- src/unexelf.c	2011-12-08 00:46:29 +0000
***************
*** 1219,1227 ****
  	      nn = symp->st_shndx;
  	      if (nn > old_bss_index)
  		nn--;
! 	      old = ((symp->st_value - NEW_SECTION_H (symp->st_shndx).sh_addr)
! 		     + OLD_SECTION_H (nn).sh_offset + old_base);
! 	      memcpy (new, old, symp->st_size);
  	    }
  #endif
  	}
--- 1219,1233 ----
  	      nn = symp->st_shndx;
  	      if (nn > old_bss_index)
  		nn--;
! 	      if (nn == old_bss_index)
! 		memset (new, 0, symp->st_size);
! 	      else
! 		{
! 		  old = ((symp->st_value
! 			  - NEW_SECTION_H (symp->st_shndx).sh_addr)
! 			 + OLD_SECTION_H (nn).sh_offset + old_base);
! 		  memcpy (new, old, symp->st_size);
! 		}
  	    }
  #endif
  	}






  reply	other threads:[~2011-12-08  0:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-07  7:47 bug#10240: GNUstep build fails during dumping Glenn Morris
2011-12-07  8:04 ` Eli Zaretskii
2011-12-07 10:21 ` YAMAMOTO Mitsuharu
2011-12-07 18:06   ` Glenn Morris
2011-12-08  0:57     ` YAMAMOTO Mitsuharu [this message]
2011-12-08  8:44       ` Glenn Morris
2011-12-09 12:48         ` YAMAMOTO Mitsuharu

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=wl39cv6fto.wl%mituharu@math.s.chiba-u.ac.jp \
    --to=mituharu@math.s.chiba-u.ac.jp \
    --cc=10240@debbugs.gnu.org \
    --cc=rgm@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).