From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32763 invoked by alias); 16 Nov 2007 19:54:39 -0000 Received: (qmail 32754 invoked by uid 22791); 16 Nov 2007 19:54:37 -0000 X-Spam-Check-By: sourceware.org Received: from hq.tensilica.com (HELO mailapp.tensilica.com) (65.205.227.29) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 16 Nov 2007 19:54:33 +0000 Received: from localhost ([127.0.0.1]) by mailapp.tensilica.com with esmtp (Exim 4.34) id 1It7H7-0002RG-TQ; Fri, 16 Nov 2007 11:54:50 -0800 Received: from mailapp.tensilica.com ([127.0.0.1]) by localhost (mailapp [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 08569-04-5; Fri, 16 Nov 2007 11:54:49 -0800 (PST) Received: from heron.hq.tensilica.com ([192.168.11.123]) by mailapp.tensilica.com with esmtp (Exim 4.34) id 1It79b-0000VD-8O; Fri, 16 Nov 2007 11:47:03 -0800 Received: from [192.168.11.123] (heron.hq.tensilica.com [192.168.11.123]) by heron.hq.tensilica.com (Postfix) with ESMTP id 4CDFE5EC99; Fri, 16 Nov 2007 11:46:38 -0800 (PST) Message-ID: <473DF39E.2000403@tensilica.com> Date: Fri, 16 Nov 2007 19:54:00 -0000 From: Bob Wilson User-Agent: Thunderbird 1.5.0.14pre (X11/20071023) MIME-Version: 1.0 To: Nick Clifton CC: binutils@sources.redhat.com Subject: Re: [PATCH] fix DWARF for ia64 References: <473A01B5.30907@tensilica.com> <473A1B4E.8030504@tensilica.com> <473D803C.1050700@redhat.com> In-Reply-To: <473D803C.1050700@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00192.txt.bz2 Nick Clifton wrote: > Your first patch and this follow on one both look OK, apart from the=20 > last part of this second patch: >=20 > loc.flags |=3D DWARF2_FLAG_BASIC_BLOCK; >=20 > - current.flags &=3D ~(DWARF2_FLAG_BASIC_BLOCK > - | DWARF2_FLAG_PROLOGUE_END > - | DWARF2_FLAG_EPILOGUE_BEGIN); > - > + dwarf2_consume_line_info (); > dwarf2_gen_line_info_1 (label, &loc); >=20 > Why are you deleting the update of current.flags ? It isn't deleted, just moved into the dwarf2_consume_line_info function. >> Everything passed as expected with one exception: the ld-ia64/line.exp=20 >> test fails but I see the same failure without any of my changes. >=20 > Hmm, I do not see that failure. In fact I get (trimmed slightly for=20 > email): >=20 > Running .../ld-ia64/line.exp ... > .../gas/as-new -o tmpdir/undefined.o -x .../ld-ia64/undefined.s > ./ld-new -e start -o tmpdir/undefined tmpdir/undefined.o > ld-new: warning: cannot find entry symbol start; defaulting to=20 > 40000000000000b0 > tmpdir/undefined.o: In function `function': > undefined.c:9: undefined reference to `this_function_is_not_defined' > ld-new: warning: cannot find entry symbol start; defaulting to=20 > 40000000000000b0 > tmpdir/undefined.o: In function `function': > undefined.c:9: undefined reference to `this_function_is_not_defined' > ld-new: warning: cannot find entry symbol start; defaulting to=20 > 40000000000000b0 > tmpdir/undefined.o: In function `function': > undefined.c:9: undefined reference to `this_function_is_not_defined' > PASS: undefined line > testcase .../ld-ia64/line.exp completed in 0 seconds >=20 >> ld fails to show the source line number in an error message. That=20 >> does seem suspicious. Is this a known problem? >=20 > Suspicious yes. Known problem no. The above test was run for an=20 > ia64-unknown-linux-gnu toolchain, and I would hope that you would see=20 > the same results. Can you investigate a little more please ? It definitely not related to my change. I have again verified that it happ= ens=20 without any of my changes. I suspect you're using a 64-bit host, since the= =20 problem appears to be related to 32-bit hosts. Here is what I get: % ia64-unknown-linux-gnu-ld -e start -o undefined undefined.o ia64-unknown-linux-gnu-ld: warning: cannot find entry symbol start; default= ing=20 to 40000000000000b0 ia64-unknown-linux-gnu-ld: BFD (GNU Binutils) 2.18.50.20071116 assertion fa= il=20 ../../src/bfd/arange-set.c:667 undefined.o: In function `function': undefined.c:(.text+0x12): undefined reference to `this_function_is_not_defi= ned' Notice the assertion failure. The following stack trace shows the problem: #0 splay_tree_insert (sp=3D0x81814e0, key=3D176, value=3D239) at ../../src/libiberty/splay-tree.c:299 #1 0x08093118 in arange_set_splay_tree_insert (set=3D0x81814ac, low=3D4611686018427388080, high=3D4611686018427388143, value=3D0) at ../../src/bfd/arange-set.c:455 #2 0x08093aff in arange_set_insert (set=3D0x81814ac, low=3D461168601842738= 8080, high=3D4611686018427388143, value=3D0) at ../../src/bfd/arange-set.c:6= 60 #3 0x0808db4d in dwarf2_comp_unit_arange_add (unit=3D0x8181458, low=3D4611686018427388080, high=3D4611686018427388144) at ../../src/bfd/dwarf2.c:1014 #4 0x080908e5 in parse_comp_unit (stash=3D0x8167cc8, unit_length=3D76, info_ptr_unit=3D0x8181104 "L", offset_size=3D4) at ../../src/bfd/dwarf= 2.c:2353 #5 0x080920bb in find_line (abfd=3D0x815fb80, section=3D0x8161e34, offset= =3D18, symbol=3D0x0, symbols=3D0x8161738, filename_ptr=3D0xbfc6e314, functionname_ptr=3D0xbfc6e310, linenumber_ptr=3D0xbfc6e30c, addr_size= =3D4, pinfo=3D0x815ff9c) at ../../src/bfd/dwarf2.c:3303 #6 0x0809237d in _bfd_dwarf2_find_nearest_line (abfd=3D0x815fb80, section=3D0x8161e34, symbols=3D0x8161738, offset=3D18, filename_ptr=3D= 0xbfc6e314, functionname_ptr=3D0xbfc6e310, linenumber_ptr=3D0xbfc6e30c, addr_size= =3D0, pinfo=3D0x815ff9c) at ../../src/bfd/dwarf2.c:3372 #7 0x080b5280 in _bfd_elf_find_nearest_line (abfd=3D0x815fb80, section=3D0x8161e34, symbols=3D0x8161738, offset=3D18, filename_ptr=3D= 0xbfc6e314, functionname_ptr=3D0xbfc6e310, line_ptr=3D0xbfc6e30c) at ../../src/bfd/elf.c:7033 #8 0x08065b48 in vfinfo (fp=3D0x40168560, fmt=3D0x810f30c ": undefined reference to `%T'\n", arg=3D0xbfc6e424 "?\026\b", is_warning=3D1) at ../../src/ld/ldmisc.c:3= 23 #9 0x08066031 in einfo (fmt=3D0x810f308 "%X%C: undefined reference to `%T'= \n") at ../../src/ld/ldmisc.c:465 #10 0x08060b3e in undefined_symbol (info=3D0x8147940, name=3D0x81676f2 "this_function_is_not_defined", abfd=3D0x815fb80, section=3D0x8161e34, address=3D18, error=3D1) at ../../src/ld/ldmain.c= :1362 When arange_set_splay_tree_insert calls splay_tree_insert, the 64-bit "low"= and=20 "high" values are truncated to 32-bit "key" and "value". --Bob