This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug debug/51419] New: length of dwarf2 debug-info-section-label too small if sizeof(void *)==2


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]