[PATCH] gas: Don't error when .debug_line already exists, unless .loc was used
Mark Wielaard
mark@klomp.org
Mon Sep 14 22:43:56 GMT 2020
Hi Nick,
On Mon, Sep 14, 2020 at 10:45:45AM +0100, Nick Clifton wrote:
> > Which brings me to another request. This patch (and some of the other
> > dwarf5 fixes) as pre-requirements for passing --gdwarf-5 to gas from
> > gcc to get full DWARF5 support. Would it be possible to backport these
> > to the 2.35 branch so that it can be used with bintuils 2.35.1?
> >
> > commit 19d80e5fec548e681c453d15b4ae5b49bc080acc
> > bfd: Handle DW_FORM_data16 for .debug_line tables containing MD5
> >
> > commit c3757b583d2448a5996e83e374fb96ac7938da35
> > Fix the linker's handling of DWARF-5 line number tables.
> >
> > commit 4a5700b62f767ed08c97122bad182244700bb4e3
> > gas: Handle bad -gdwarf options, just like bad --gdwarf options.
> >
> > commit dd216e07a156c19e589fc5f481fe13a256262801
> > gas: Use DW_FORM_sec_offset for DWARF version 4 or higher.
> >
> > commit b0b3ea7e10443f211267babcac99ac6677d593ce
> > gas: Make sure to only add an md5 to a .file when requested.
> >
> > commit bdd3b953e24c3d2bc55e06e30e0ef5e0ff829e3f
> > gas: Output .debug_rnglists for DWARF 5.
> >
> > commit d2a54558074287721ce9e47142f7fa92bda15531
> > gas: Output directory and file names in .debug_line_str for DWARF5
> >
> > commit edc7a80a9c04667dfa74f90f74bd39827bc372b7
> > gas: Don't error when .debug_line already exists, unless .loc was used
> >
> > I can do the backports myself if you tell me how.
>
> The how is quite straightforward. You probably know most of this already
> but I am going to include it here just in case:
>
> 0. Request permission to backport the patches.
> (Permission is granted for the ones listed above).
Turned out that the first two were already backported by you.
Sorry I missed that.
> 1. Checkout the mainline binutils sources from the git repository.
> 2. Get the patches for the commits above.
> 3. Switch to the binutils-2_35 branch.
> 4. Apply the patches.
> The Changelog changes will probably not apply cleanly, but this is
> OK, because the convention is to create a new changelog entry with
> today's date saying something along the lines of "backport this patch
> from the mainline sources" and then including the original changelog
> entry as a comment in the new changelog.
I did add a 'Backport from mainline:' header to the ChangeLog entries,
but note that if you hava the gnulib git-merge-changelog installed then
a git cherry-pick will automatically merge the ChangeLog entries.
https://gnu.wildebeest.org/blog/mjw/2012/03/16/automagically-merging-changelog-files-with-mercurial-or-git/
> 5. Test that the patched sources still build.
I tested all git cherry-picks individually and only had to adjust
commit bdd3b953e gas: Output .debug_rnglists for DWARF 5
for the change in argument order from the mainline commit e01e1cee3
Rearrange symbol_create parameters.
> 6. Commit the changes.
>
> Once this is complete it would be worth sending an email to the list
> suggesting that the creation of a 2.35.1 release might be a good
> thing. (Assuming of course that you do think that it would be a
> good thing).
I pushed the commits to the binutils-2_35-branch and do think it would
be nice to do a 2.35.1 release.
Thanks,
Mark
More information about the Binutils
mailing list