From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14294 invoked by alias); 5 Dec 2011 05:45:15 -0000 Received: (qmail 14187 invoked by uid 22791); 5 Dec 2011 05:45:02 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 05 Dec 2011 05:44:46 +0000 From: "kikairoya at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/51419] New: length of dwarf2 debug-info-section-label too small if sizeof(void *)==2 Date: Mon, 05 Dec 2011 05:45:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kikairoya at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-12/txt/msg00351.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51419 Bug #: 51419 Summary: length of dwarf2 debug-info-section-label too small if sizeof(void *)==2 Classification: Unclassified Product: gcc Version: 4.6.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassigned@gcc.gnu.org ReportedBy: kikairoya@gmail.com Created attachment 25989 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25989 proposal patch In dwarf2, length of debug-info-section-label (DWARF_REF_SIZE) is defined to DWARF2_ADDR_SIZE, but it is too small (2bytes) on some target. This causes an error in compiling libstdc++: /bin/sh ../libtool --tag CXX --mode=compile /tmp/ggg/./gcc/xgcc -shared-libgcc -B/tmp/ggg/./gcc -nostdinc++ -L/tmp/ggg/h8300-elf/libstdc++-v3/src -L/tmp/ggg/h8300-elf/libstdc++-v3/src/.libs -B/home/kikairoya/gcc/h8300-elf/bin/ -B/home/kikairoya/gcc/h8300-elf/lib/ -isystem /home/kikairoya/gcc/h8300-elf/include -isystem /home/kikairoya/gcc/h8300-elf/sys-include -I/tmp/ggg/h8300-elf/libstdc++-v3/include/h8300-elf -I/tmp/ggg/h8300-elf/libstdc++-v3/include -I/home/kikairoya/repos/gcc/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -g -Os -c -o wlocale-inst.lo /home/kikairoya/repos/gcc/libstdc++-v3/src/wlocale-inst.cc libtool: compile: /tmp/ggg/./gcc/xgcc -shared-libgcc -B/tmp/ggg/./gcc -nostdinc++ -L/tmp/ggg/h8300-elf/libstdc++-v3/src -L/tmp/ggg/h8300-elf/libstdc++-v3/src/.libs -B/home/kikairoya/gcc/h8300-elf/bin/ -B/home/kikairoya/gcc/h8300-elf/lib/ -isystem /home/kikairoya/gcc/h8300-elf/include -isystem /home/kikairoya/gcc/h8300-elf/sys-include -I/tmp/ggg/h8300-elf/libstdc++-v3/include/h8300-elf -I/tmp/ggg/h8300-elf/libstdc++-v3/include -I/home/kikairoya/repos/gcc/libstdc++-v3/libsupc++ -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -g -Os -c /home/kikairoya/repos/gcc/libstdc++-v3/src/wlocale-inst.cc -o wlocale-inst.o /tmp/cc12NgrP.s: Assembler messages: /tmp/cc12NgrP.s:74233: Error: value of 72828 too large for field of 2 bytes at 72912 target: h8300-elf, binutils: 2.22, gcc: 4.6.2 (both of host and cross) I think DWARF2_ADDR_SIZE needs at least 4. attach a proposal patch.