From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: YAMAMOTO Mitsuharu Newsgroups: gmane.emacs.devel Subject: Dump failure on Solaris 8 Date: Tue, 05 May 2009 13:13:44 +0900 Organization: Faculty of Science, Chiba University Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1241496858 29915 80.91.229.12 (5 May 2009 04:14:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 May 2009 04:14:18 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 05 06:14:08 2009 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.50) id 1M1C2g-0005lj-R2 for ged-emacs-devel@m.gmane.org; Tue, 05 May 2009 06:14:07 +0200 Original-Received: from localhost ([127.0.0.1]:37722 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1C2f-0000iZ-V0 for ged-emacs-devel@m.gmane.org; Tue, 05 May 2009 00:14:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1C2Q-0000eX-H4 for emacs-devel@gnu.org; Tue, 05 May 2009 00:13:50 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1C2M-0000dR-VD for emacs-devel@gnu.org; Tue, 05 May 2009 00:13:50 -0400 Original-Received: from [199.232.76.173] (port=54119 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1C2M-0000dO-OX for emacs-devel@gnu.org; Tue, 05 May 2009 00:13:46 -0400 Original-Received: from ntp.math.s.chiba-u.ac.jp ([133.82.132.2]:63461 helo=mathmail.math.s.chiba-u.ac.jp) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M1C2M-0003uu-4O for emacs-devel@gnu.org; Tue, 05 May 2009 00:13:46 -0400 Original-Received: from church.math.s.chiba-u.ac.jp (church [133.82.132.36]) by mathmail.math.s.chiba-u.ac.jp (Postfix) with ESMTP id 524652C40 for ; Tue, 5 May 2009 13:13:44 +0900 (JST) User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.6 Emacs/22.3 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI) X-detected-operating-system: by monty-python.gnu.org: NetBSD 3.0 (DF) 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:110671 Archived-At: I experienced a failure in dumping on Solaris 8 with gcc 3.4.2. The dumped .data section was overwritten by the succeeding .symtab section. This is due to a part of this change: 2009-02-02 Andreas Schwab * unexelf.c (unexec): Handle unaligned bss offset. *** unexelf.c 2009/01/08 03:16:02 1.69 --- unexelf.c 2009/02/02 16:07:00 1.70 *************** *** 970,985 **** else { /* Any section that was originally placed after the .bss ! section should now be off by NEW_DATA2_SIZE. If a section overlaps the .bss section, consider it to be placed after the .bss section. Overlap can occur if the section just before .bss has less-strict alignment; this was observed between .symtab and .bss on Solaris 2.5.1 (sparc) with GCC snapshot 960602. */ ! if (NEW_SECTION_H (nn).sh_offset + NEW_SECTION_H (nn).sh_size ! > new_data2_offset) ! NEW_SECTION_H (nn).sh_offset += new_data2_size; /* Any section that was originally placed after the section header table should now be off by the size of one section --- 980,994 ---- else { /* Any section that was originally placed after the .bss ! section should now be off by NEW_DATA2_INCR. If a section overlaps the .bss section, consider it to be placed after the .bss section. Overlap can occur if the section just before .bss has less-strict alignment; this was observed between .symtab and .bss on Solaris 2.5.1 (sparc) with GCC snapshot 960602. */ ! if (NEW_SECTION_H (nn).sh_offset >= old_bss_offset) ! NEW_SECTION_H (nn).sh_offset += new_data2_incr; /* Any section that was originally placed after the section header table should now be off by the size of one section If I restore the if-condition (not including the then-clause) in the hunk above, the dumping process works again. Actually, the comment above the if-condition seems to tell about this case. The output of "dump -h temacs" becomes as follows and the offset of the .bss section (0x315158) is greater than that of the succeeding .symtab section (0x315154). YAMAMOTO Mitsuharu mituharu@math.s.chiba-u.ac.jp src/temacs: **** SECTION HEADER TABLE **** [No] Type Flags Addr Offset Size Name Link Info Adralgn Entsize [1] 1 2 0x100d4 0xd4 0x11 .interp 0 0 0x1 0 [2] 5 2 0x100e8 0xe8 0xafa8 .hash 3 0 0x4 0x4 [3] 11 2 0x1b090 0xb090 0x15f10 .dynsym 4 1 0x4 0x10 [4] 3 34 0x30fa0 0x20fa0 0x167bf .dynstr 0 0 0x1 0 [5] 1879048190 2 0x47760 0x37760 0x1a0 .SUNW_version 4 12 0x4 0 [6] 4 66 0x47900 0x37900 0x30 .rela.got 3 14 0x4 0xc [7] 4 66 0x47930 0x37930 0xc .rela.data 3 17 0x4 0xc [8] 4 66 0x4793c 0x3793c 0x12c .rela.bss 3 23 0x4 0xc [9] 4 66 0x47a68 0x37a68 0x17f4 .rela.plt 3 15 0x4 0xc [10] 1 6 0x4925c 0x3925c 0x1815f0 .text 0 0 0x4 0 [11] 1 6 0x1ca84c 0x1ba84c 0x1c .init 0 0 0x4 0 [12] 1 6 0x1ca868 0x1ba868 0x14 .fini 0 0 0x4 0 [13] 1 2 0x1ca880 0x1ba880 0x1aa78 .rodata 0 0 0x8 0 [14] 1 3 0x1f52f8 0x1d52f8 0x34 .got 0 0 0x4 0x4 [15] 1 7 0x1f532c 0x1d532c 0x1828 .plt 0 0 0x4 0xc [16] 6 3 0x1f6b54 0x1d6b54 0x170 .dynamic 4 0 0x4 0x8 [17] 1 3 0x1f6cc8 0x1d6cc8 0x13e470 .data 0 0 0x8 0 [18] 1 3 0x335138 0x315138 0x8 .ctors 0 0 0x4 0 [19] 1 3 0x335140 0x315140 0x8 .dtors 0 0 0x4 0 [20] 1 3 0x335148 0x315148 0x4 .eh_frame 0 0 0x4 0 [21] 1 3 0x33514c 0x31514c 0x4 .jcr 0 0 0x4 0 [22] 1 3 0x335150 0x315150 0x4 .data.rel.local 0 0 0x4 0 [23] 8 3 0x335158 0x315158 0x42720 .bss 0 0 0x8 0 [24] 2 0 0 0x315154 0x1c9d0 .symtab 25 1709 0x4 0x10 [25] 3 32 0 0x331b24 0x1d406 .strtab 0 0 0x1 0 [26] 1 0 0 0x34ef2a 0x1c0f .comment 0 0 0x1 0 [27] 1 0 0 0x350b3c 0x24 .stab.index 37 0 0x4 0xc [28] 1 0 0 0x350b60 0x11359 .debug_abbrev 0 0 0x1 0 [29] 1 0 0 0x361eb9 0x1f35a7 .debug_info 0 0 0x1 0 [30] 1 0 0 0x555460 0x12c356 .debug_line 0 0 0x1 0 [31] 1 0 0 0x6817b8 0x15d50 .debug_frame 0 0 0x4 0 [32] 1 0 0 0x697508 0x1aa7c .debug_pubnames 0 0 0x1 0 [33] 1 0 0 0x6b1f84 0xa00 .debug_aranges 0 0 0x1 0 [34] 1 0 0 0x6b2984 0x14478 .debug_ranges 0 0 0x1 0 [35] 1 0 0 0x6c6dfc 0xd033 .debug_str 0 0 0x1 0 [36] 3 32 0 0x6d3e2f 0x14f .shstrtab 0 0 0x1 0 [37] 3 0 0 0x6d3f7e 0x176 .stab.indexstr 0 0 0x1 0