public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* crc32, gpl, debuglink, and interoperability.
@ 2020-10-09 20:59 David Anderson
  2020-10-09 21:36 ` Mark Wielaard
  0 siblings, 1 reply; 2+ messages in thread
From: David Anderson @ 2020-10-09 20:59 UTC (permalink / raw)
  To: gdb

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.

Thanks for any help or information.
David Anderson


--
Of course power tools and alcohol don't mix.
Everyone knows power tools aren't soluble in alcohol.
-- Crazy Nigel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: crc32, gpl, debuglink, and interoperability.
  2020-10-09 20:59 crc32, gpl, debuglink, and interoperability David Anderson
@ 2020-10-09 21:36 ` Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2020-10-09 21:36 UTC (permalink / raw)
  To: David Anderson, gdb

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-09 21:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09 20:59 crc32, gpl, debuglink, and interoperability David Anderson
2020-10-09 21:36 ` Mark Wielaard

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).