From: Mark Wielaard <mark@klomp.org>
To: David Anderson <davea42@linuxmail.org>, gdb@sourceware.org
Subject: Re: crc32, gpl, debuglink, and interoperability.
Date: Fri, 09 Oct 2020 23:36:15 +0200 [thread overview]
Message-ID: <d0ee40db0c14af3d42c74f7f1016dab49db0f969.camel@klomp.org> (raw)
In-Reply-To: <6eeb0949-c85a-9762-37b0-f08a49b8ba90@linuxmail.org>
Hi David,
On Fri, 2020-10-09 at 13:59 -0700, David Anderson wrote:
> I'm the maintainer of libdwarf and dwarfdump and wish to
> interoperate with gdb/debuglink by reading the appropriate
> sections and validating the crc32 when appropriate.
>
> The crc32 used in binutils for debuglink is under plain GPLV3.
> Linking to sucn a thing (from what I've been able to find and
> somewhat-understand) means the GPL applies to the linked work.
> That is not appropriate for the libdwarf library.
>
> So how can I get permission to use LGPL v2.1 (which most of
> libdwarf is) or LGPL v3? on the relevant crc32 function (in
> bfd/opncls.c)? In other words extract the source and apply
> an LGPL to the one function calculating the debuglink crc.
>
> At present interoperability with debuglink is impossible in
> libdwarf (so impossible in dwarfdump) and I would like to
> make it work.
If you like a dual GPLv2+/LGPLv3+ license better, then you can find an
implementation in elfutils too:
https://sourceware.org/git/?p=elfutils.git;a=blob;f=lib/crc32.c;hb=HEAD
But it is really a fairly standard crc-32. See the end of
https://www.sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html
for the polynomial used. You can use that to generate the crc-32
table. Then all you need to know is that you start with 0xFFFFFFFF and
that the CRC is inverted when the calculation is done.
Cheers,
Mark
prev parent reply other threads:[~2020-10-09 21:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-09 20:59 David Anderson
2020-10-09 21:36 ` Mark Wielaard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d0ee40db0c14af3d42c74f7f1016dab49db0f969.camel@klomp.org \
--to=mark@klomp.org \
--cc=davea42@linuxmail.org \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).