[PATCH] gas: Always use as_where for preprocessed assembly codes

H.J. Lu hjl.tools@gmail.com
Fri Oct 16 14:44:05 GMT 2020


On Thu, Oct 15, 2020 at 8:53 PM H.J. Lu <hjl.tools@gmail.com> wrote:
>
> On Thu, Oct 15, 2020 at 8:44 PM Alan Modra <amodra@gmail.com> wrote:
> >
> > On Thu, Oct 15, 2020 at 07:01:42PM -0700, H.J. Lu via Binutils wrote:
> > > Some instructions can be emitted (dwarf2_emit_insn is called) before the
> > > first .file <NUMBER> directive has been seen which allocate the input file
> > > as the first file entry.  Reuse the input file entry in the file table.
> > >
> > >       PR gas/25878
> > >       PR gas/26740
> > >       * dwarf2dbg.c (file_entry): Remove auto_assigned.
> > >       (assign_file_to_slot): Remove the auto_assign argument.
> > >       (allocate_filenum): Updated.
> > >       (allocate_filename_to_slot): Reuse the input file entry in the
> > >       file table.
> > >       * testsuite/gas/i386/dwarf5-line-1.d: New file.
> > >       * testsuite/gas/i386/dwarf5-line-1.s: Likewise.
> > >       * testsuite/gas/i386/i386.exp: Run dwarf5-line-1.
> >
> > Looks OK to me, except that since you're using as_where_physical
> > (which is correct) it would be good to adjust dwarf2_where to use the
> > same.
>
> Fixed.
>
> > > +      /* Reuse NUM if it is 1 and was assigned to the input file before
> > > +      before the first .file <NUMBER> directive was seen.  */
> >
> > before before
> >
>
> Fixed.
>
> Here is the updated patch I am checking in tomorrow.
>

We need to use as_where for preprocessed assembly codes.
Here is the followup patch.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gas-Always-use-as_where-for-preprocessed-assembly-co.patch
Type: application/x-patch
Size: 8270 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20201016/b28b4239/attachment.bin>


More information about the Binutils mailing list