PATCH: PR gas/10531: Strange assembler warning message on section group

H.J. Lu hjl.tools@gmail.com
Sat Aug 22 19:10:00 GMT 2009


On Thu, Aug 20, 2009 at 9:26 PM, H.J. Lu<hjl.tools@gmail.com> wrote:
> On Thu, Aug 20, 2009 at 6:49 PM, H.J. Lu<hjl.tools@gmail.com> wrote:
>> On Thu, Aug 20, 2009 at 2:08 PM, Jim Wilson<wilson@codesourcery.com> wrote:
>>> On Wed, 2009-08-19 at 18:20 -0700, H.J. Lu wrote:
>>>> I didn't see the problem with my icc, using the patched
>>>> assembler. Can you provide main.s compiled by your icc?
>>>
>>> I tried your patch.  Gas isn't emitting a spurious warning anymore, but
>>> it is still emitting bogus debug info, which is what I expected.
>>>
>>> To see the problem, just put a breakpoint in the function
>>> out_debug_line.  You will see that we hit the breakpoint, even though we
>>> should not, because the input assembly file already has a fully
>>> populated debug_line section.
>>>
>>> You patch is doing something useful; it is making sure that gas picks up
>>> up the correct (non-comdat) debug_line section.  But it doesn't stop gas
>>> from emitting the bogus debug info.
>>>
>>> Jim
>>>
>>
>> Hi Jim,
>>
>> I think we have been generate bogus debug line info forever when .loc
>> directive isn't used.  Does it patch make any senses?
>>
>
> Here is the updated patch. We should generate DWARF info only
> when -g or .loc directives are used.  OK to install?
>
> Thanks.
>
>

Here is a new patch with updated testcases. OK to install?

Thanks.

-- 
H.J.
--
bfd/

2009-08-22  H.J. Lu  <hongjiu.lu@intel.com>

	PR gas/10531
	* section.c: Include "elf-bfd.h".
	(bfd_get_section_by_name): Don't use a section in a section
	group.
	(bfd_make_section_old_way): Likewise.

binutils/testsuite/

2009-08-22  H.J. Lu  <hongjiu.lu@intel.com>

	PR gas/10531
	* binutils-all/objdump.W: Remove bogus line debug info.

gas/

2009-08-22  H.J. Lu  <hongjiu.lu@intel.com>

	PR gas/10531
	* as.c (gen_debug): New.
	(parse_args): Set gen_debug to debug_type.

	* as.h (gen_debug): New.

	* dwarf2dbg.c (dwarf2_loc_directive_used): New.
	(dwarf2_directive_loc): Set dwarf2_loc_directive_used.
	(dwarf2_loc_directive_used): Likewise.
	(dwarf2_finish): Return if -g isn't passed nor any .loc
	directive is used.

	* subsegs.c (subseg_get): Don't compare segment name.

gas/testsuite/

2009-08-22  H.J. Lu  <hongjiu.lu@intel.com>

	 PR gas/10531
	 * gas/elf/dwarf2-1.d: New.
	 * gas/elf/dwarf2-1.s: Likewise.
	 * gas/elf/dwarf2-1.d: Likewise.
	 * gas/elf/dwarf2-1.2: Likewise.
	 * gas/i386/debug1.d: Likewise.
	 * gas/i386/debug1.s: Likewise.

	* gas/elf/elf.exp: Run dwarf2-1 and dwarf2-2.

	* gas/i386/i386.exp: Run debug1 for both 32bit and 64bit.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: binutils-group-6.patch
Type: application/octet-stream
Size: 26919 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090822/022a4cba/attachment.obj>


More information about the Binutils mailing list