From owner-freebsd-bugs@FreeBSD.ORG Wed Dec 3 20:21:28 2014 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4B19D21A for ; Wed, 3 Dec 2014 20:21:28 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3322B8A1 for ; Wed, 3 Dec 2014 20:21:28 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sB3KLSdl016250 for ; Wed, 3 Dec 2014 20:21:28 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 195653] New: elftoolchain strip(1) corrupts PT_TLS segment Date: Wed, 03 Dec 2014 20:21:28 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Dec 2014 20:21:28 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195653 Bug ID: 195653 Summary: elftoolchain strip(1) corrupts PT_TLS segment Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: emaste@freebsd.org See PR195661 for an exp-run with WITH_ELFTOOLCHAIN_TOOLS=yes Antoine found that make and csh segfaultPR195561) Make, before running elftoolchain strip: % feynman% readelf -l make.orig % % Elf file type is EXEC (Executable file) % Entry point 0x4001a0 % There are 5 program headers, starting at offset 64 % % Program Headers: % Type Offset VirtAddr PhysAddr % FileSiz MemSiz Flags Align % LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000 % 0x000000000009185c 0x000000000009185c R E 200000 % LOAD 0x0000000000091860 0x0000000000691860 0x0000000000691860 % 0x0000000000003680 0x0000000000013118 RW 200000 % NOTE 0x0000000000000158 0x0000000000400158 0x0000000000400158 % 0x0000000000000030 0x0000000000000030 R 4 % TLS 0x0000000000091860 0x0000000000691860 0x0000000000691860 % 0x0000000000000004 0x0000000000000088 R 10 % GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000 % 0x0000000000000000 0x0000000000000000 RW 8 % % Section to Segment mapping: % Segment Sections... % 00 .note.tag .init .text .fini .rodata .eh_frame % 01 .tdata .ctors .dtors .jcr .got.plt .data .bss % 02 .note.tag % 03 .tdata .tbss % 04 After strip(1): % feynman% readelf -l make % % Elf file type is EXEC (Executable file) % Entry point 0x4001a0 % There are 5 program headers, starting at offset 64 % % Program Headers: % Type Offset VirtAddr PhysAddr % FileSiz MemSiz Flags Align % LOAD 0x0000000000000000 0x0000000000400000 0x0000000000400000 % 0x000000000009185c 0x000000000009185c R E 200000 % LOAD 0x0000000000091860 0x0000000000691860 0x0000000000691860 % 0x0000000000003680 0x0000000000013118 RW 200000 % NOTE 0x0000000000000158 0x0000000000400158 0x0000000000400158 % 0x0000000000000030 0x0000000000000030 R 4 % TLS 0x0000000000091860 0x0000000000691860 0x0000000000691860 % 0x0000000000000004 0x000000000000007c R 10 % GNU_STACK 0x0000000000000000 0x0000000000000000 0x0000000000000000 % 0x0000000000000000 0x0000000000000000 RW 8 % % Section to Segment mapping: % Segment Sections... % 00 .note.tag .init .text .fini .rodata .eh_frame % 01 .tdata .ctors .dtors .jcr .got.plt .data .bss % 02 .note.tag % 03 .tdata % 04 Note TLS MemSiz 0x88 -> 0x7c and segment 03 dropped .tbss -- You are receiving this mail because: You are the assignee for the bug.