[PATCH] as: Automatically enable DWARF5 support

H.J. Lu hjl.tools@gmail.com
Sun Jan 17 16:00:25 GMT 2021


On Sat, Jan 16, 2021 at 10:11 PM Fangrui Song <i@maskray.me> wrote:
>
> On 2021-01-16, H.J. Lu via Binutils wrote:
> >Currently
> >
> >$ as -o x.o x.s
> >
> >fails when x.s contains DWARF5 info.  Add a .dwarf_level directive to
> >set the DWARF level and GCC can emit ".dwarf_level 5" when generating
> >DWARF5 info so that
> >
> >$ gcc -S -g -c x.c
> >$ gcc -c x.s
> >
> >works.
>
> The problem is file number 0 in .file and .loc directives.  An alternative
> design is to detect number 0 and upgrade to DWARF v5 line tables automatically.
>
> If we decide to add a new directive, .dwarf_version is better than .dwarf_level .
> The DWARF specifications don't use the term "level".

How about this patch to automatically enable DWARF5 support?

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-as-Automatically-enable-DWARF5-support.patch
Type: application/x-patch
Size: 3193 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20210117/70fc880d/attachment.bin>


More information about the Binutils mailing list