From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6279 invoked by alias); 15 Feb 2015 23:33:33 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 6255 invoked by uid 48); 15 Feb 2015 23:33:33 -0000 From: "msebor at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/17968] [ppc64] SEGV in ppc64_elf_get_synthetic_symtab reading a separate debug file Date: Sun, 15 Feb 2015 23:43:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: 7.8 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-q1/txt/msg00251.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=17968 --- Comment #1 from Martin Sebor --- The following test case reduced from a build of the kernel module in the problem Description reproduces the SEGV with the top of trunk. Tthough the program faults in a different function, Valgrind reports the same Invalid read. $ set -x && cat t.c && gcc -c -g t.c && cat t.lds && ld -r -T t.lds --build-id -o t.ko t.o && cp t.ko t.sym.ko && objcopy --only-keep-debug t.ko t.ko.debug && strip --strip-debug t.ko && objcopy --add-gnu-debuglink=t.ko.debug t.ko && /build/gdb-fsf/gdb/gdb -q -batch t.sym.ko && /build/gdb-fsf/gdb/gdb -q -batch t.ko; set +x + cat t.c void foo (void) __attribute__ ((section (".bar"))); void foo (void) { } + gcc -c -g t.c + cat t.lds SECTIONS { .foobar : { *(.bar) } } + ld -r -T t.lds --build-id -o t.ko t.o + cp t.ko t.sym.ko + objcopy --only-keep-debug t.ko t.ko.debug + strip --strip-debug t.ko + objcopy --add-gnu-debuglink=t.ko.debug t.ko + /build/gdb-fsf/gdb/gdb -q -batch t.sym.ko + /build/gdb-fsf/gdb/gdb -q -batch t.ko Segmentation fault -- You are receiving this mail because: You are on the CC list for the bug.