From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Petr Hracek Newsgroups: gmane.emacs.bugs Subject: bug#20614: Segmentation fault when building on Power8 Little Endian Date: Thu, 24 Sep 2015 13:04:30 +0200 Message-ID: <5603D8BE.10300@redhat.com> References: <555C3E3C.4090700@redhat.com> <1gpp5vi5xn.fsf@fencepost.gnu.org> <555DD5D3.3020207@redhat.com> <55A3A08A.9060905@redhat.com> <55A4BFB7.3010208@redhat.com> <55F95275.4040209@redhat.com> <56012AA6.7010702@redhat.com> <56025D9A.9080608@redhat.com> <838u7xlbsn.fsf@gnu.org> <56028633.3000303@redhat.com> <83zj0djskx.fsf@gnu.org> <56029707.9040100@redhat.com> <83wpvhjpdd.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1443092732 16553 80.91.229.3 (24 Sep 2015 11:05:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Sep 2015 11:05:32 +0000 (UTC) To: 20614@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 24 13:05:19 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zf4Kz-0003w1-G6 for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Sep 2015 13:05:17 +0200 Original-Received: from localhost ([::1]:56414 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf4Ky-00051z-Je for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Sep 2015 07:05:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48792) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf4Ko-0004wP-Gq for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2015 07:05:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zf4Kl-0008Ew-9I for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2015 07:05:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:52486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf4Kl-0008Ei-6m for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2015 07:05:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zf4Kk-0004a1-PF for bug-gnu-emacs@gnu.org; Thu, 24 Sep 2015 07:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Petr Hracek Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Sep 2015 11:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20614-submit@debbugs.gnu.org id=B20614.144309267917573 (code B ref 20614); Thu, 24 Sep 2015 11:05:02 +0000 Original-Received: (at 20614) by debbugs.gnu.org; 24 Sep 2015 11:04:39 +0000 Original-Received: from localhost ([127.0.0.1]:41457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zf4KL-0004ZL-Lc for submit@debbugs.gnu.org; Thu, 24 Sep 2015 07:04:38 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:55776) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zf4KI-0004ZA-Bv for 20614@debbugs.gnu.org; Thu, 24 Sep 2015 07:04:36 -0400 Original-Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 8B7A4461C3 for <20614@debbugs.gnu.org>; Thu, 24 Sep 2015 11:04:32 +0000 (UTC) Original-Received: from [10.34.4.133] (unused-4-133.brq.redhat.com [10.34.4.133]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8OB4UTH019540 for <20614@debbugs.gnu.org>; Thu, 24 Sep 2015 07:04:31 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: <83wpvhjpdd.fsf@gnu.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:106857 Archived-At: On 09/23/2015 02:23 PM, Eli Zaretskii wrote: >> Cc: 20614@debbugs.gnu.org >> From: Petr Hracek >> Date: Wed, 23 Sep 2015 14:11:51 +0200 >> >>> If you run Emacs under GDB, you don't need any traces: GDB allows to >>> look at variables without any tracing code. >> I will investigate is a bit more. >> How to call dump when emacs or temacs is buildup? >> Machine is already prepared. >> I have seen some code in loadup.el lisp file and would like to do it >> from command line. > Like this: > > $ cd src > $ gdb ./temacs > (gdb) r --batch --load loadup bootstrap > > (This uses the command that failed.) When the dumping failed with message "Program segment above .bss" then I have add a some debug info. Hopefully It helps. Dumping under the name emacs Looking for .bss - found .interp Looking for .bss - found .note.ABI-tag Looking for .bss - found .note.gnu.build-id Looking for .bss - found .gnu.hash Looking for .bss - found .dynsym Looking for .bss - found .dynstr Looking for .bss - found .gnu.version Looking for .bss - found .gnu.version_r Looking for .bss - found .rela.toc Looking for .bss - found .rela.plt Looking for .bss - found .init Looking for .bss - found .text Looking for .bss - found .fini Looking for .bss - found .rodata Looking for .bss - found .eh_frame_hdr Looking for .bss - found .eh_frame Looking for .bss - found .data.rel.ro Looking for .bss - found .dynamic Looking for .bss - found .got Looking for .bss - found .plt Looking for .bss - found .data Looking for .bss - found .bss Looking for .sbss - found .interp Looking for .sbss - found .note.ABI-tag Looking for .sbss - found .note.gnu.build-id Looking for .sbss - found .gnu.hash Looking for .sbss - found .dynsym Looking for .sbss - found .dynstr Looking for .sbss - found .gnu.version Looking for .sbss - found .gnu.version_r Looking for .sbss - found .rela.toc Looking for .sbss - found .rela.plt Looking for .sbss - found .init Looking for .sbss - found .text Looking for .sbss - found .fini Looking for .sbss - found .rodata Looking for .sbss - found .eh_frame_hdr Looking for .sbss - found .eh_frame Looking for .sbss - found .data.rel.ro Looking for .sbss - found .dynamic Looking for .sbss - found .got Looking for .sbss - found .plt Looking for .sbss - found .data Looking for .sbss - found .bss Looking for .sbss - found .comment Looking for .sbss - found .debug_aranges Looking for .sbss - found .debug_info Looking for .sbss - found .debug_abbrev Looking for .sbss - found .debug_line Looking for .sbss - found .debug_str Looking for .sbss - found .debug_loc Looking for .sbss - found .debug_ranges Looking for .sbss - found .shstrtab Looking for .sbss - found .symtab Looking for .sbss - found .strtab Looking for .plt - found .interp Looking for .plt - found .note.ABI-tag Looking for .plt - found .note.gnu.build-id Looking for .plt - found .gnu.hash Looking for .plt - found .dynsym Looking for .plt - found .dynstr Looking for .plt - found .gnu.version Looking for .plt - found .gnu.version_r Looking for .plt - found .rela.toc Looking for .plt - found .rela.plt Looking for .plt - found .init Looking for .plt - found .text Looking for .plt - found .fini Looking for .plt - found .rodata Looking for .plt - found .eh_frame_hdr Looking for .plt - found .eh_frame Looking for .plt - found .data.rel.ro Looking for .plt - found .dynamic Looking for .plt - found .got Looking for .plt - found .plt Looking for .data - found .interp Looking for .data - found .note.ABI-tag Looking for .data - found .note.gnu.build-id Looking for .data - found .gnu.hash Looking for .data - found .dynsym Looking for .data - found .dynstr Looking for .data - found .gnu.version Looking for .data - found .gnu.version_r Looking for .data - found .rela.toc Looking for .data - found .rela.plt Looking for .data - found .init Looking for .data - found .text Looking for .data - found .fini Looking for .data - found .rodata Looking for .data - found .eh_frame_hdr Looking for .data - found .eh_frame Looking for .data - found .data.rel.ro Looking for .data - found .dynamic Looking for .data - found .got Looking for .data - found .plt Looking for .data - found .data old_bss_index 22 old_bss_addr 102b0000 old_bss_size 89798 old_bss_offset 2a0000 new_bss_addr 115d0000 new_data2_addr 102b0000 new_data2_size 1320000 new_data2_offset 2a0000 new_data2_incr 1320000 Old section offset da1ac8 Old section count 34 New section offset 20c1ac8 New section count 35 new_file_h->e_phnum 9 old_sbss_index ffffffff old_bss_addr 102b0000 alignment 10 NEW_PROGRAM_H (n).p_vaddr 102af638 NEW_PROGRAM_H (n).p_filesz 9c8 (OLD_SECTION_H (old_bss_index)).sh_addralign 10 old_sbss_index ffffffff old_bss_addr 102b0000 alignment 10 NEW_PROGRAM_H (n).p_vaddr 0 NEW_PROGRAM_H (n).p_filesz 0 (OLD_SECTION_H (old_bss_index)).sh_addralign 10 old_sbss_index ffffffff old_bss_addr 102b0000 alignment 10 NEW_PROGRAM_H (n).p_vaddr 10269510 NEW_PROGRAM_H (n).p_filesz 73cc (OLD_SECTION_H (old_bss_index)).sh_addralign 10 old_sbss_index ffffffff old_bss_addr 102b0000 alignment 10 NEW_PROGRAM_H (n).p_vaddr 1000024c NEW_PROGRAM_H (n).p_filesz 44 (OLD_SECTION_H (old_bss_index)).sh_addralign 10 old_sbss_index ffffffff old_bss_addr 102b0000 alignment 10 NEW_PROGRAM_H (n).p_vaddr 102afa68 NEW_PROGRAM_H (n).p_filesz 440 (OLD_SECTION_H (old_bss_index)).sh_addralign 10 old_sbss_index ffffffff old_bss_addr 102b0000 alignment 10000 NEW_PROGRAM_H (n).p_vaddr 102af638 NEW_PROGRAM_H (n).p_filesz 2c9756 (OLD_SECTION_H (old_bss_index)).sh_addralign 10 emacs: Program segment above .bss in /home/phracek/rpmbuild/BUILD/emacs-24.3/build-gtk/src/temacs Some useful information taken by command readelf: readelf -h ./temacs ELF Header: Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 Class: ELF64 Data: 2's complement, little endian Version: 1 (current) OS/ABI: UNIX - System V ABI Version: 0 Type: EXEC (Executable file) Machine: PowerPC64 Version: 0x1 Entry point address: 0x100184f0 Start of program headers: 64 (bytes into file) Start of section headers: 14289272 (bytes into file) Flags: 0x2, abiv2 Size of this header: 64 (bytes) Size of program headers: 56 (bytes) Number of program headers: 9 Size of section headers: 64 (bytes) Number of section headers: 34 Section header string table index: 31 readelf -l ./temacs Elf file type is EXEC (Executable file) Entry point 0x100184f0 There are 9 program headers, starting at offset 64 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flags Align PHDR 0x0000000000000040 0x0000000010000040 0x0000000010000040 0x00000000000001f8 0x00000000000001f8 R E 8 INTERP 0x0000000000000238 0x0000000010000238 0x0000000010000238 0x0000000000000011 0x0000000000000011 R 1 [Requesting program interpreter: /lib64/ld64.so.2] LOAD 0x0000000000000000 0x0000000010000000 0x0000000010000000 0x000000000029e6d8 0x000000000029e6d8 R E 10000 LOAD 0x000000000029f640 0x00000000102af640 0x00000000102af640 0x00000000002c974e 0x0000000000350e90 RW 10000 DYNAMIC 0x000000000029fa70 0x00000000102afa70 0x00000000102afa70 0x0000000000000440 0x0000000000000440 RW 8 NOTE 0x000000000000024c 0x000000001000024c 0x000000001000024c 0x0000000000000044 0x0000000000000044 R 4 GNU_EH_FRAME 0x0000000000268fe0 0x0000000010268fe0 0x0000000010268fe0 0x00000000000073cc 0x00000000000073cc R 4 GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 RW 10 GNU_RELRO 0x000000000029f640 0x00000000102af640 0x00000000102af640 0x00000000000009c0 0x00000000000009c0 R 1 Section to Segment mapping: Segment Sections... 00 01 .interp 02 .interp .note.ABI-tag .note.gnu.build-id .gnu.hash .dynsym .dynstr .gnu.version .gnu.version_r .rela.toc .rela.plt .init .text .fini .rodata .eh_frame_hdr .eh_frame 03 .data.rel.ro .dynamic .got .plt .data .bss 04 .dynamic 05 .note.ABI-tag .note.gnu.build-id 06 .eh_frame_hdr 07 08 .data.rel.ro .dynamic .got readelf -S ./temacs There are 34 section headers, starting at offset 0xda0978: Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0000000000000000 00000000 0000000000000000 0000000000000000 0 0 0 [ 1] .interp PROGBITS 0000000010000238 00000238 0000000000000011 0000000000000000 A 0 0 1 [ 2] .note.ABI-tag NOTE 000000001000024c 0000024c 0000000000000020 0000000000000000 A 0 0 4 [ 3] .note.gnu.build-i NOTE 000000001000026c 0000026c 0000000000000024 0000000000000000 A 0 0 4 [ 4] .gnu.hash GNU_HASH 0000000010000290 00000290 00000000000000dc 0000000000000000 A 5 0 8 [ 5] .dynsym DYNSYM 0000000010000370 00000370 00000000000063f0 0000000000000018 A 6 1 8 [ 6] .dynstr STRTAB 0000000010006760 00006760 0000000000004ae9 0000000000000000 A 0 0 1 [ 7] .gnu.version VERSYM 000000001000b24a 0000b24a 0000000000000854 0000000000000002 A 5 0 2 [ 8] .gnu.version_r VERNEED 000000001000baa0 0000baa0 0000000000000160 0000000000000000 A 6 10 8 [ 9] .rela.toc RELA 000000001000bc00 0000bc00 0000000000000330 0000000000000018 A 5 0 8 [10] .rela.plt RELA 000000001000bf30 0000bf30 00000000000060d8 0000000000000018 A 5 20 8 [11] .init PROGBITS 0000000010012020 00012020 000000000000004c 0000000000000000 AX 0 0 32 [12] .text PROGBITS 0000000010012080 00012080 0000000000237140 0000000000000000 AX 0 0 32 [13] .fini PROGBITS 00000000102491c0 002491c0 0000000000000024 0000000000000000 AX 0 0 4 [14] .rodata PROGBITS 00000000102491e8 002491e8 000000000001fdf8 0000000000000000 A 0 0 8 [15] .eh_frame_hdr PROGBITS 0000000010268fe0 00268fe0 00000000000073cc 0000000000000000 A 0 0 4 [16] .eh_frame PROGBITS 00000000102703b0 002703b0 000000000002e328 0000000000000000 A 0 0 8 [17] .data.rel.ro PROGBITS 00000000102af640 0029f640 0000000000000430 0000000000000000 WA 0 0 8 [18] .dynamic DYNAMIC 00000000102afa70 0029fa70 0000000000000440 0000000000000010 WA 6 0 8 [19] .got PROGBITS 00000000102afeb0 0029feb0 0000000000000150 0000000000000008 WA 0 0 8 [20] .plt NOBITS 00000000102b0000 002a0000 0000000000002058 0000000000000008 WA 0 0 8 [21] .data PROGBITS 00000000102b2058 002a2058 00000000002c6d36 0000000000000000 WA 0 0 8 [22] .bss NOBITS 0000000010578d90 00568d8e 0000000000087740 0000000000000000 WA 0 0 16 [23] .comment PROGBITS 0000000000000000 00568d8e 0000000000000058 0000000000000001 MS 0 0 1 [24] .debug_aranges PROGBITS 0000000000000000 00568de6 0000000000001350 0000000000000000 0 0 1 [25] .debug_info PROGBITS 0000000000000000 0056a136 00000000003aeadb 0000000000000000 0 0 1 [26] .debug_abbrev PROGBITS 0000000000000000 00918c11 0000000000021b05 0000000000000000 0 0 1 [27] .debug_line PROGBITS 0000000000000000 0093a716 000000000007d970 0000000000000000 0 0 1 [28] .debug_str PROGBITS 0000000000000000 009b8086 000000000004911a 0000000000000001 MS 0 0 1 [29] .debug_loc PROGBITS 0000000000000000 00a011a0 00000000003277c9 0000000000000000 0 0 1 [30] .debug_ranges PROGBITS 0000000000000000 00d28969 0000000000077ec0 0000000000000000 0 0 1 [31] .shstrtab STRTAB 0000000000000000 00da0829 0000000000000148 0000000000000000 0 0 1 [32] .symtab SYMTAB 0000000000000000 00da11f8 0000000000037bc0 0000000000000018 33 5415 8 [33] .strtab STRTAB 0000000000000000 00dd8db8 000000000002e23b 0000000000000000 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings) I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific) -- Petr Hracek Software Engineer Developer Experience Red Hat, Inc Mob: +420777056169 email: phracek@redhat.com