[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/683] New: Bug in bfd/elflink.c

From: alx_s at hotmail dot com
Subject: [Bug binutils/683] New: Bug in bfd/elflink.c
Date: 19 Jan 2005 19:39:00 -0000

I encountered this problem trying to build GCC 3.4 on Solaris with GNU ld and 
It crashed during bootstrap process. After some research I found the reason - it
is an undefined behaviour if you are trying to calculate a difference between 2
pointers which are not part of the same array. I a real world you can get a
problem if a difference between 2 addresses is not a multiple of an object 

An offending line:
Line 2703: long sdiff = h1->root.u.def.section - h2->root.u.def.section;

How to reproduce:
$ ../gcc-3.4.3/configure --enable-languages=c++ --enable-threads=posix \
 --with-gnu-as --with-as=/usr/local/bin/gas \
 --with-gnu-ld --with-ld=/usr/local/bin/gld
$ make bootstrap

GNU as and ld are installed as /usr/local/bin/gas and /usr/local/bin/gld
on my machine.

           Summary: Bug in bfd/elflink.c
           Product: binutils
           Version: 2.15
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
        AssignedTo: unassigned at sources dot redhat dot com
        ReportedBy: alx_s at hotmail dot com
                CC: bug-binutils at gnu dot org
 GCC build triplet: sparc-sun-solaris2.9
  GCC host triplet: sparc-sun-solaris2.9
GCC target triplet: sparc-sun-solaris2.9


------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]