All of lore.kernel.org
 help / color / mirror / Atom feed
* [prelink-cross] Bug 13529 add SPDX identifier
@ 2019-10-21  9:43 ` Yann CARDAILLAC
  0 siblings, 0 replies; 8+ messages in thread
From: Yann CARDAILLAC @ 2019-10-21  9:43 UTC (permalink / raw)
  To: yocto, openembedded-core; +Cc: jakub, Romain Naour, mark.hatle

[-- Attachment #1: Type: text/plain, Size: 1294 bytes --]

Hi Mark Hatle, Jakub Jelinek,

I'm currently beginning the work on bug 13529:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=13529

The purpose is to add SPDX identifier to scripts and sources.

Most of the sources have licences on the sources, however some of them
don't, and I've question about others :

- src/sha.c do not shall it be GPLV2-or-later as most of the other?
- how to licence m4/libelf.m4 ? I'd prefer you to tell me exactly what to
add in order to avoid errors
- what about *.C files ? They don't have licence header, they look like C
file to me so I'd probably add :
// SPDX-License-Identifier: GPL-2.0-or-later
- what about testsuite/ files ?

Shall every thing just be GPL-2.0-or-later?

Best Regards,

Yann CARDAILLAC

-- 
[image: SMILE] <http://www.smile.eu/>

20 rue des Jardins
92600 Asnières-sur-Seine
*Yann CARDAILLAC*
Ingénieur Systèmes Embarqués

[image: email] yann.cardaillac@smile.fr
[image: url] http://www.smile.eu

[image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
<https://www.facebook.com/smileopensource> [image: LinkedIn]
<https://www.linkedin.com/company/smile> [image: Github]
<https://github.com/Smile-SA>


[image: eco] Pour la planète, n'imprimez ce mail que si c'est nécessaire

[-- Attachment #2: Type: text/html, Size: 4723 bytes --]

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

* [yocto][prelink-cross] Bug 13529 add SPDX identifier
@ 2019-10-21  9:43 ` Yann CARDAILLAC
  0 siblings, 0 replies; 8+ messages in thread
From: Yann CARDAILLAC @ 2019-10-21  9:43 UTC (permalink / raw)
  To: yocto, openembedded-core; +Cc: jakub, Romain Naour, mark.hatle

[-- Attachment #1: Type: text/plain, Size: 1294 bytes --]

Hi Mark Hatle, Jakub Jelinek,

I'm currently beginning the work on bug 13529:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=13529

The purpose is to add SPDX identifier to scripts and sources.

Most of the sources have licences on the sources, however some of them
don't, and I've question about others :

- src/sha.c do not shall it be GPLV2-or-later as most of the other?
- how to licence m4/libelf.m4 ? I'd prefer you to tell me exactly what to
add in order to avoid errors
- what about *.C files ? They don't have licence header, they look like C
file to me so I'd probably add :
// SPDX-License-Identifier: GPL-2.0-or-later
- what about testsuite/ files ?

Shall every thing just be GPL-2.0-or-later?

Best Regards,

Yann CARDAILLAC

-- 
[image: SMILE] <http://www.smile.eu/>

20 rue des Jardins
92600 Asnières-sur-Seine
*Yann CARDAILLAC*
Ingénieur Systèmes Embarqués

[image: email] yann.cardaillac@smile.fr
[image: url] http://www.smile.eu

[image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
<https://www.facebook.com/smileopensource> [image: LinkedIn]
<https://www.linkedin.com/company/smile> [image: Github]
<https://github.com/Smile-SA>


[image: eco] Pour la planète, n'imprimez ce mail que si c'est nécessaire

[-- Attachment #2: Type: text/html, Size: 4723 bytes --]

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

* Re: [OE-core] [prelink-cross] Bug 13529 add SPDX identifier
  2019-10-21  9:43 ` [yocto][prelink-cross] " Yann CARDAILLAC
@ 2019-10-21 14:35   ` Mark Hatle
  -1 siblings, 0 replies; 8+ messages in thread
From: Mark Hatle @ 2019-10-21 14:35 UTC (permalink / raw)
  To: Yann CARDAILLAC, yocto, openembedded-core; +Cc: jakub, Romain Naour, mark.hatle

On 10/21/19 4:43 AM, Yann CARDAILLAC wrote:
> Hi Mark Hatle, Jakub Jelinek,

Jakub is no longer supporting this code, but he may have valuable insights into
licensing.

> I'm currently beginning the work on bug 13529:
> 
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=13529
> 
> The purpose is to add SPDX identifier to scripts and sources.
> 
> Most of the sources have licences on the sources, however some of them don't,
> and I've question about others :
> 
> - src/sha.c do not shall it be GPLV2-or-later as most of the other?

/* sha.c - Functions to compute the SHA1 hash (message-digest) of files
   or blocks of memory.  Complies to the NIST specification FIPS-180-1.

   Copyright (C) 2000, 2001, 2003 Scott G. Miller

   Credits:
      Robert Klep <robert@ilse.nl>  -- Expansion function fix
   NOTE: The canonical source of this file is maintained in GNU coreutils.
*/

The last line is the key.  This apparently came from GNU coreutils.

From the SCM logs, sha.c was introduced in approx 2003-07-01 from what it looks
like.  So it's a pretty old version.  You will need to do some detective work,
and find older versions of coreutils until you find the one that corresponds to
the code that was checked in.  Start back in 2003 and work backwards as
necessary.  (The version that matches to the original 2003-07-01 should be the
reasonable license to use.)

> - how to licence m4/libelf.m4 ? I'd prefer you to tell me exactly what to add in
> order to avoid errors

The original version of the m4/libelf.m4 was introduced 2001-09-27.  It appears
to me that it was written as part of the prelinker, so would be under the
overall license of the prelinker.

Based on this, my assumption is that it is GPL-2.0

I do not see any 'or-later' clauses anywhere.

> - what about *.C files ? They don't have licence header, they look like C file
> to me so I'd probably add :
> // SPDX-License-Identifier: GPL-2.0-or-later

There are each simply test cases.  They would be covered by the overall
'COPYING' for the package.  Thus GPL-2.0

> - what about testsuite/ files ?

Same, no specifically stated license will be GPL-2.0.

> Shall every thing just be GPL-2.0-or-later?

Also just to be clear.  As I am NOT the original author of this work, I won't
accept a patch to remove any existing license text from the headers in this
software, but I will accept the SPDX-License-Identifier to be added in addition
to the existing license text.

If an existing file does not have any License text in it, then we will need to
assume that the COPYING file covers all software unless there is some indicator
it comes from another source with a different license.  For items w/o existing
licenses, just adding the SPDX-License-Identifier will be acceptable.

So in a header similar to:

/* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
   Written by Jakub Jelinek <jakub@redhat.com>, 2001.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */

please add the header between the 'Written by' and the existing license text,
such as:

/* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
   Written by Jakub Jelinek <jakub@redhat.com>, 2001.

   SPDX-License-Identifier: GPL-2.0-or-later

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by


> Best Regards,
> 
> Yann CARDAILLAC
> 
> -- 
> SMILE <http://www.smile.eu/>
> 
> 20 rue des Jardins
> 92600 Asnières-sur-Seine
> 
> 	
> *Yann CARDAILLAC*
> Ingénieur Systèmes Embarqués
> 
> email yann.cardaillac@smile.fr <mailto:yann.cardaillac@smile.fr>
> url http://www.smile.eu
> 
> Twitter <https://twitter.com/GroupeSmile> Facebook
> <https://www.facebook.com/smileopensource> LinkedIn
> <https://www.linkedin.com/company/smile> Github <https://github.com/Smile-SA>
> 
> 
> 
> eco Pour la planète, n'imprimez ce mail que si c'est nécessaire
> 


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

* Re: [yocto][prelink-cross] Bug 13529 add SPDX identifier
@ 2019-10-21 14:35   ` Mark Hatle
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Hatle @ 2019-10-21 14:35 UTC (permalink / raw)
  To: Yann CARDAILLAC, yocto, openembedded-core; +Cc: jakub, Romain Naour, mark.hatle

On 10/21/19 4:43 AM, Yann CARDAILLAC wrote:
> Hi Mark Hatle, Jakub Jelinek,

Jakub is no longer supporting this code, but he may have valuable insights into
licensing.

> I'm currently beginning the work on bug 13529:
> 
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=13529
> 
> The purpose is to add SPDX identifier to scripts and sources.
> 
> Most of the sources have licences on the sources, however some of them don't,
> and I've question about others :
> 
> - src/sha.c do not shall it be GPLV2-or-later as most of the other?

/* sha.c - Functions to compute the SHA1 hash (message-digest) of files
   or blocks of memory.  Complies to the NIST specification FIPS-180-1.

   Copyright (C) 2000, 2001, 2003 Scott G. Miller

   Credits:
      Robert Klep <robert@ilse.nl>  -- Expansion function fix
   NOTE: The canonical source of this file is maintained in GNU coreutils.
*/

The last line is the key.  This apparently came from GNU coreutils.

From the SCM logs, sha.c was introduced in approx 2003-07-01 from what it looks
like.  So it's a pretty old version.  You will need to do some detective work,
and find older versions of coreutils until you find the one that corresponds to
the code that was checked in.  Start back in 2003 and work backwards as
necessary.  (The version that matches to the original 2003-07-01 should be the
reasonable license to use.)

> - how to licence m4/libelf.m4 ? I'd prefer you to tell me exactly what to add in
> order to avoid errors

The original version of the m4/libelf.m4 was introduced 2001-09-27.  It appears
to me that it was written as part of the prelinker, so would be under the
overall license of the prelinker.

Based on this, my assumption is that it is GPL-2.0

I do not see any 'or-later' clauses anywhere.

> - what about *.C files ? They don't have licence header, they look like C file
> to me so I'd probably add :
> // SPDX-License-Identifier: GPL-2.0-or-later

There are each simply test cases.  They would be covered by the overall
'COPYING' for the package.  Thus GPL-2.0

> - what about testsuite/ files ?

Same, no specifically stated license will be GPL-2.0.

> Shall every thing just be GPL-2.0-or-later?

Also just to be clear.  As I am NOT the original author of this work, I won't
accept a patch to remove any existing license text from the headers in this
software, but I will accept the SPDX-License-Identifier to be added in addition
to the existing license text.

If an existing file does not have any License text in it, then we will need to
assume that the COPYING file covers all software unless there is some indicator
it comes from another source with a different license.  For items w/o existing
licenses, just adding the SPDX-License-Identifier will be acceptable.

So in a header similar to:

/* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
   Written by Jakub Jelinek <jakub@redhat.com>, 2001.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software Foundation,
   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */

please add the header between the 'Written by' and the existing license text,
such as:

/* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
   Written by Jakub Jelinek <jakub@redhat.com>, 2001.

   SPDX-License-Identifier: GPL-2.0-or-later

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by


> Best Regards,
> 
> Yann CARDAILLAC
> 
> -- 
> SMILE <http://www.smile.eu/>
> 
> 20 rue des Jardins
> 92600 Asnières-sur-Seine
> 
> 	
> *Yann CARDAILLAC*
> Ingénieur Systèmes Embarqués
> 
> email yann.cardaillac@smile.fr <mailto:yann.cardaillac@smile.fr>
> url http://www.smile.eu
> 
> Twitter <https://twitter.com/GroupeSmile> Facebook
> <https://www.facebook.com/smileopensource> LinkedIn
> <https://www.linkedin.com/company/smile> Github <https://github.com/Smile-SA>
> 
> 
> 
> eco Pour la planète, n'imprimez ce mail que si c'est nécessaire
> 


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

* Re: [OE-core] [prelink-cross] Bug 13529 add SPDX identifier
  2019-10-21 14:35   ` [yocto][prelink-cross] " Mark Hatle
@ 2019-10-22  9:28     ` Yann CARDAILLAC
  -1 siblings, 0 replies; 8+ messages in thread
From: Yann CARDAILLAC @ 2019-10-22  9:28 UTC (permalink / raw)
  To: Mark Hatle; +Cc: jakub, yocto, Romain Naour, mark.hatle, openembedded-core


[-- Attachment #1.1: Type: text/plain, Size: 5437 bytes --]

On Mon, Oct 21, 2019 at 4:35 PM Mark Hatle <mark.hatle@kernel.crashing.org>
wrote:

> On 10/21/19 4:43 AM, Yann CARDAILLAC wrote:
> > Hi Mark Hatle, Jakub Jelinek,
>
> Jakub is no longer supporting this code, but he may have valuable insights
> into
> licensing.
>
> > I'm currently beginning the work on bug 13529:
> >
> > https://bugzilla.yoctoproject.org/show_bug.cgi?id=13529
> >
> > The purpose is to add SPDX identifier to scripts and sources.
> >
> > Most of the sources have licences on the sources, however some of them
> don't,
> > and I've question about others :
> >
> > - src/sha.c do not shall it be GPLV2-or-later as most of the other?
>
> /* sha.c - Functions to compute the SHA1 hash (message-digest) of files
>    or blocks of memory.  Complies to the NIST specification FIPS-180-1.
>
>    Copyright (C) 2000, 2001, 2003 Scott G. Miller
>
>    Credits:
>       Robert Klep <robert@ilse.nl>  -- Expansion function fix
>    NOTE: The canonical source of this file is maintained in GNU coreutils.
> */
>
> The last line is the key.  This apparently came from GNU coreutils.
>
> From the SCM logs, sha.c was introduced in approx 2003-07-01 from what it
> looks
> like.  So it's a pretty old version.  You will need to do some detective
> work,
> and find older versions of coreutils until you find the one that
> corresponds to
> the code that was checked in.  Start back in 2003 and work backwards as
> necessary.  (The version that matches to the original 2003-07-01 should be
> the
> reasonable license to use.)
>

Ok I found it ! https://github.com/coreutils/coreutils/blob/v4.5.8/lib/sha.c

from : https://github.com/coreutils/coreutils/blob/v4.5.8/COPYING it looks
like it's only GPLV2


> > - how to licence m4/libelf.m4 ? I'd prefer you to tell me exactly what
> to add in
> > order to avoid errors
>
> The original version of the m4/libelf.m4 was introduced 2001-09-27.  It
> appears
> to me that it was written as part of the prelinker, so would be under the
> overall license of the prelinker.
>
> Based on this, my assumption is that it is GPL-2.0
>
> I do not see any 'or-later' clauses anywhere.
>
> I have just add  "dnl SPDX-License-Identifier: GPL-2.0-only" bellow the
"Written by" comment, however should it also be in the resulting template?
I can add it also at first line of the resulting file if necessary ?


> - what about *.C files ? They don't have licence header, they look like C
> file
> > to me so I'd probably add :
> > // SPDX-License-Identifier: GPL-2.0-or-later
>
> There are each simply test cases.  They would be covered by the overall
> 'COPYING' for the package.  Thus GPL-2.0
>
> > - what about testsuite/ files ?
>
> Same, no specifically stated license will be GPL-2.0.
>
> Done !

> > Shall every thing just be GPL-2.0-or-later?
>
> Also just to be clear.  As I am NOT the original author of this work, I
> won't
> accept a patch to remove any existing license text from the headers in this
> software, but I will accept the SPDX-License-Identifier to be added in
> addition
> to the existing license text.
>
>
If an existing file does not have any License text in it, then we will need
> to
> assume that the COPYING file covers all software unless there is some
> indicator
> it comes from another source with a different license.  For items w/o
> existing
> licenses, just adding the SPDX-License-Identifier will be acceptable.
>
> So in a header similar to:
>
> /* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
>    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
>
>    This program is free software; you can redistribute it and/or modify
>    it under the terms of the GNU General Public License as published by
>    the Free Software Foundation; either version 2, or (at your option)
>    any later version.
>
>    This program is distributed in the hope that it will be useful,
>    but WITHOUT ANY WARRANTY; without even the implied warranty of
>    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>    GNU General Public License for more details.
>
>    You should have received a copy of the GNU General Public License
>    along with this program; if not, write to the Free Software Foundation,
>    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
>
> please add the header between the 'Written by' and the existing license
> text,
> such as:
>
> /* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
>    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
>
>    SPDX-License-Identifier: GPL-2.0-or-later
>
>    This program is free software; you can redistribute it and/or modify
>    it under the terms of the GNU General Public License as published by
>
>
Here's the first attempt of the patch, feel free to give me any advice on
how to improve it!

Regards,

-- 
[image: SMILE] <http://www.smile.eu/>

20 rue des Jardins
92600 Asnières-sur-Seine
*Yann CARDAILLAC*
Ingénieur Systèmes Embarqués

[image: email] yann.cardaillac@smile.fr
[image: url] http://www.smile.eu

[image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
<https://www.facebook.com/smileopensource> [image: LinkedIn]
<https://www.linkedin.com/company/smile> [image: Github]
<https://github.com/Smile-SA>


[image: eco] Pour la planète, n'imprimez ce mail que si c'est nécessaire

[-- Attachment #1.2: Type: text/html, Size: 10450 bytes --]

[-- Attachment #2: 0001-add-SPDX-Licence-identifier.patch --]
[-- Type: text/x-patch, Size: 73507 bytes --]

From e327620eb36ddb04b4e5761fa1a13a272375dafb Mon Sep 17 00:00:00 2001
From: Yann CARDAILLAC <yann.cardaillac@smile.fr>
Date: Tue, 22 Oct 2019 11:27:00 +0200
Subject: [PATCH] add SPDX Licence identifier

Signed-off-by: Yann CARDAILLAC <yann.cardaillac@smile.fr>
---
 gelf/gelf.c              | 2 ++
 gelf/gelf.h              | 2 ++
 gelfx/gelfx.h            | 2 ++
 gelfx32/gelfx.h          | 2 ++
 m4/libelf.m4             | 1 +
 src/arch-alpha.c         | 2 ++
 src/arch-arm.c           | 2 ++
 src/arch-cris.c          | 2 ++
 src/arch-i386.c          | 2 ++
 src/arch-ia64.c          | 2 ++
 src/arch-mips.c          | 2 ++
 src/arch-ppc.c           | 2 ++
 src/arch-ppc64.c         | 2 ++
 src/arch-s390.c          | 2 ++
 src/arch-s390x.c         | 2 ++
 src/arch-sh.c            | 2 ++
 src/arch-sparc.c         | 2 ++
 src/arch-sparc64.c       | 2 ++
 src/arch-x86_64.c        | 2 ++
 src/cache.c              | 2 ++
 src/canonicalize.c       | 2 ++
 src/checksum.c           | 2 ++
 src/conflict.c           | 2 ++
 src/crc32.c              | 2 ++
 src/cxx.c                | 2 ++
 src/data.c               | 2 ++
 src/doit.c               | 2 ++
 src/dso.c                | 2 ++
 src/dwarf2.c             | 2 ++
 src/dwarf2.h             | 2 ++
 src/exec.c               | 2 ++
 src/execle_open.c        | 2 ++
 src/execstack.c          | 2 ++
 src/fptr.c               | 2 ++
 src/fptr.h               | 2 ++
 src/gather.c             | 2 ++
 src/get.c                | 2 ++
 src/hashtab.c            | 2 ++
 src/hashtab.h            | 2 ++
 src/layout.c             | 2 ++
 src/layout.h             | 2 ++
 src/main.c               | 2 ++
 src/makecrc.c            | 1 +
 src/md5.c                | 2 ++
 src/md5.h                | 2 ++
 src/mdebug.c             | 2 ++
 src/prelink.c            | 2 ++
 src/prelink.h            | 2 ++
 src/prelinktab.h         | 2 ++
 src/reloc-info.c         | 2 ++
 src/reloc-info.h         | 2 ++
 src/reloc.c              | 2 ++
 src/reloc.h              | 2 ++
 src/sha.c                | 2 ++
 src/sha.h                | 2 ++
 src/space.c              | 2 ++
 src/space.h              | 2 ++
 src/stabs.c              | 2 ++
 src/undo.c               | 2 ++
 src/undoall.c            | 2 ++
 src/verify.c             | 2 ++
 testsuite/cxx1.C         | 1 +
 testsuite/cxx1.h         | 1 +
 testsuite/cxx1.sh        | 1 +
 testsuite/cxx1lib1.C     | 1 +
 testsuite/cxx1lib2.C     | 1 +
 testsuite/cxx2.C         | 1 +
 testsuite/cxx2.sh        | 1 +
 testsuite/cxx3.C         | 1 +
 testsuite/cxx3.h         | 1 +
 testsuite/cxx3.sh        | 1 +
 testsuite/cxx3lib1.C     | 1 +
 testsuite/cxx3lib2.C     | 1 +
 testsuite/cycle1.sh      | 1 +
 testsuite/cycle2.sh      | 1 +
 testsuite/deps1.c        | 1 +
 testsuite/deps1.h        | 1 +
 testsuite/deps1.sh       | 1 +
 testsuite/deps1lib1.c    | 1 +
 testsuite/deps1lib2.c    | 1 +
 testsuite/deps2.sh       | 1 +
 testsuite/deps2lib1.c    | 1 +
 testsuite/functions.sh   | 1 +
 testsuite/ifunc.h        | 1 +
 testsuite/ifunc1.c       | 1 +
 testsuite/ifunc1.sh      | 1 +
 testsuite/ifunc1lib1.c   | 1 +
 testsuite/ifunc1lib2.c   | 1 +
 testsuite/ifunc2.sh      | 1 +
 testsuite/ifunc3.c       | 1 +
 testsuite/ifunc3.sh      | 1 +
 testsuite/ifunc3lib1.c   | 1 +
 testsuite/ifunctest.c    | 1 +
 testsuite/layout.C       | 1 +
 testsuite/layout1.sh     | 1 +
 testsuite/layout2.sh     | 1 +
 testsuite/layoutlib.C    | 1 +
 testsuite/movelibs.sh    | 1 +
 testsuite/order.c        | 1 +
 testsuite/order.sh       | 1 +
 testsuite/orderlib.c     | 1 +
 testsuite/orderlib.h     | 1 +
 testsuite/orderlib1.c    | 1 +
 testsuite/orderlib1.h    | 1 +
 testsuite/orderlib2.c    | 1 +
 testsuite/orderlib3.c    | 1 +
 testsuite/preload1.c     | 1 +
 testsuite/preload1.h     | 1 +
 testsuite/preload1.sh    | 1 +
 testsuite/preload1lib1.c | 1 +
 testsuite/preload1lib2.c | 1 +
 testsuite/quick1.c       | 1 +
 testsuite/quick1.sh      | 1 +
 testsuite/quick1lib1.c   | 1 +
 testsuite/quick1lib2.c   | 1 +
 testsuite/quick1lib3.c   | 1 +
 testsuite/quick1lib4.c   | 1 +
 testsuite/quick2.sh      | 1 +
 testsuite/quick3.sh      | 1 +
 testsuite/reloc1.c       | 1 +
 testsuite/reloc1.h       | 1 +
 testsuite/reloc1.sh      | 1 +
 testsuite/reloc10.c      | 1 +
 testsuite/reloc10.sh     | 1 +
 testsuite/reloc10lib1.c  | 1 +
 testsuite/reloc10lib2.c  | 1 +
 testsuite/reloc10lib3.c  | 1 +
 testsuite/reloc10lib4.c  | 1 +
 testsuite/reloc10lib5.c  | 1 +
 testsuite/reloc11.c      | 1 +
 testsuite/reloc11.sh     | 1 +
 testsuite/reloc11lib2.c  | 1 +
 testsuite/reloc11lib3.c  | 1 +
 testsuite/reloc12.c      | 1 +
 testsuite/reloc12.h      | 1 +
 testsuite/reloc12.sh     | 1 +
 testsuite/reloc12lib1.c  | 1 +
 testsuite/reloc12lib2.c  | 1 +
 testsuite/reloc1lib1.c   | 1 +
 testsuite/reloc1lib2.c   | 1 +
 testsuite/reloc2.c       | 1 +
 testsuite/reloc2.sh      | 1 +
 testsuite/reloc2lib1.c   | 1 +
 testsuite/reloc2lib2.c   | 1 +
 testsuite/reloc3.c       | 1 +
 testsuite/reloc3.sh      | 1 +
 testsuite/reloc3lib1.c   | 1 +
 testsuite/reloc4.c       | 1 +
 testsuite/reloc4.sh      | 1 +
 testsuite/reloc4lib1.c   | 1 +
 testsuite/reloc4lib2.c   | 1 +
 testsuite/reloc4lib3.c   | 1 +
 testsuite/reloc5.c       | 1 +
 testsuite/reloc5.sh      | 1 +
 testsuite/reloc6.sh      | 1 +
 testsuite/reloc7.c       | 1 +
 testsuite/reloc7.sh      | 1 +
 testsuite/reloc8.sh      | 1 +
 testsuite/reloc9.sh      | 1 +
 testsuite/shuffle1.sh    | 1 +
 testsuite/shuffle2.c     | 1 +
 testsuite/shuffle2.sh    | 1 +
 testsuite/shuffle3.sh    | 1 +
 testsuite/shuffle4.sh    | 1 +
 testsuite/shuffle5.sh    | 1 +
 testsuite/shuffle6.sh    | 1 +
 testsuite/shuffle6lib1.c | 1 +
 testsuite/shuffle6lib2.c | 1 +
 testsuite/shuffle7.sh    | 1 +
 testsuite/shuffle8.c     | 1 +
 testsuite/shuffle8.sh    | 1 +
 testsuite/shuffle9.c     | 1 +
 testsuite/shuffle9.sh    | 1 +
 testsuite/tls1.c         | 1 +
 testsuite/tls1.h         | 1 +
 testsuite/tls1.sh        | 1 +
 testsuite/tls1lib1.c     | 1 +
 testsuite/tls1lib2.c     | 1 +
 testsuite/tls2.c         | 1 +
 testsuite/tls2.sh        | 1 +
 testsuite/tls2lib1.c     | 1 +
 testsuite/tls3.sh        | 1 +
 testsuite/tls3lib2.c     | 1 +
 testsuite/tls4.c         | 1 +
 testsuite/tls4.sh        | 1 +
 testsuite/tls4lib1.c     | 1 +
 testsuite/tls4lib2.c     | 1 +
 testsuite/tls5.sh        | 1 +
 testsuite/tls5lib1.c     | 1 +
 testsuite/tls6.sh        | 1 +
 testsuite/tls6lib1.c     | 1 +
 testsuite/tls7.c         | 1 +
 testsuite/tls7.sh        | 1 +
 testsuite/undo1.sh       | 1 +
 testsuite/undosyslibs.sh | 1 +
 testsuite/unprel1.c      | 1 +
 testsuite/unprel1.sh     | 1 +
 testsuite/unprel1lib1.c  | 1 +
 testsuite/unprel1lib2.c  | 1 +
 199 files changed, 258 insertions(+)

diff --git a/gelf/gelf.c b/gelf/gelf.c
index 915cf5b..9261318 100644
--- a/gelf/gelf.c
+++ b/gelf/gelf.c
@@ -2,6 +2,8 @@
    Copyright (C) 2001, 2002, 2004 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/gelf/gelf.h b/gelf/gelf.h
index 6b76a15..b552e23 100644
--- a/gelf/gelf.h
+++ b/gelf/gelf.h
@@ -2,6 +2,8 @@
    Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/gelfx/gelfx.h b/gelfx/gelfx.h
index c011a57..fc914a9 100644
--- a/gelfx/gelfx.h
+++ b/gelfx/gelfx.h
@@ -2,6 +2,8 @@
    Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/gelfx32/gelfx.h b/gelfx32/gelfx.h
index 7668a84..ece2e1b 100644
--- a/gelfx32/gelfx.h
+++ b/gelfx32/gelfx.h
@@ -2,6 +2,8 @@
    Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/m4/libelf.m4 b/m4/libelf.m4
index 295bf0c..f9e39b2 100644
--- a/m4/libelf.m4
+++ b/m4/libelf.m4
@@ -4,6 +4,7 @@ dnl Some libelf versions have bugs in Elf64_Sxword conversions.
 dnl Detect it.
 
 dnl Written by Jakub Jelinek <jakub@redhat.com>.
+dnl SPDX-License-Identifier: GPL-2.0-only
 
 AC_DEFUN([AC_LIBELF_SXWORD],
   [AC_TRY_RUN([
diff --git a/src/arch-alpha.c b/src/arch-alpha.c
index 7802a3e..8835ce0 100644
--- a/src/arch-alpha.c
+++ b/src/arch-alpha.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-arm.c b/src/arch-arm.c
index eec7c57..0d7726e 100644
--- a/src/arch-arm.c
+++ b/src/arch-arm.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2004, 2009, 2011, 2013 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-cris.c b/src/arch-cris.c
index 3272779..461ca47 100644
--- a/src/arch-cris.c
+++ b/src/arch-cris.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-i386.c b/src/arch-i386.c
index a1e0fcc..5afb27f 100644
--- a/src/arch-i386.c
+++ b/src/arch-i386.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009, 2011 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-ia64.c b/src/arch-ia64.c
index 6039115..a7a235f 100644
--- a/src/arch-ia64.c
+++ b/src/arch-ia64.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-mips.c b/src/arch-mips.c
index 02c608f..faad1ee 100644
--- a/src/arch-mips.c
+++ b/src/arch-mips.c
@@ -2,6 +2,8 @@
    Written by Richard Sandiford <richard@codesourcery.com>, 2006
    Updated by Maciej W. Rozycki <macro@codesourcery.com>, 2008.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-ppc.c b/src/arch-ppc.c
index e22e5d5..d6c0d3a 100644
--- a/src/arch-ppc.c
+++ b/src/arch-ppc.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2011 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-ppc64.c b/src/arch-ppc64.c
index a764b99..26f2032 100644
--- a/src/arch-ppc64.c
+++ b/src/arch-ppc64.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2002, 2003, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2002.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-s390.c b/src/arch-s390.c
index e5fe130..20d1566 100644
--- a/src/arch-s390.c
+++ b/src/arch-s390.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009, 2010, 2013 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-s390x.c b/src/arch-s390x.c
index e4d82f7..d4c3799 100644
--- a/src/arch-s390x.c
+++ b/src/arch-s390x.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009, 2013 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-sh.c b/src/arch-sh.c
index 1b11312..f744251 100644
--- a/src/arch-sh.c
+++ b/src/arch-sh.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-sparc.c b/src/arch-sparc.c
index e016a79..6b164e1 100644
--- a/src/arch-sparc.c
+++ b/src/arch-sparc.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-sparc64.c b/src/arch-sparc64.c
index aee4601..390895c 100644
--- a/src/arch-sparc64.c
+++ b/src/arch-sparc64.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-x86_64.c b/src/arch-x86_64.c
index 2f6c551..5b43219 100644
--- a/src/arch-x86_64.c
+++ b/src/arch-x86_64.c
@@ -3,6 +3,8 @@
    Copyright (C) 2011 Wind River Systems, Inc.
    x32 support by Mark Hatle <mark.hatle@windriver.com>
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/cache.c b/src/cache.c
index 1cc3217..8176876 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2013 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/canonicalize.c b/src/canonicalize.c
index 79df44e..ec9043b 100644
--- a/src/canonicalize.c
+++ b/src/canonicalize.c
@@ -2,6 +2,8 @@
    Copyright (C) 1996-2002, 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
diff --git a/src/checksum.c b/src/checksum.c
index 20a23a0..0df5363 100644
--- a/src/checksum.c
+++ b/src/checksum.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/conflict.c b/src/conflict.c
index 5613ace..36f8606 100644
--- a/src/conflict.c
+++ b/src/conflict.c
@@ -3,6 +3,8 @@
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
    Updated by Maciej W. Rozycki <macro@codesourcery.com>, 2008.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/crc32.c b/src/crc32.c
index f36abb5..631f7bb 100644
--- a/src/crc32.c
+++ b/src/crc32.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/cxx.c b/src/cxx.c
index 4391ebe..34f0ed8 100644
--- a/src/cxx.c
+++ b/src/cxx.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2007, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/data.c b/src/data.c
index 751f96f..4d8639d 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/doit.c b/src/doit.c
index 3784866..618672d 100644
--- a/src/doit.c
+++ b/src/doit.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2003, 2004, 2005, 2007 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/dso.c b/src/dso.c
index 949abf9..3853d43 100644
--- a/src/dso.c
+++ b/src/dso.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2010 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/dwarf2.c b/src/dwarf2.c
index b9588b1..4c2f939 100644
--- a/src/dwarf2.c
+++ b/src/dwarf2.c
@@ -2,6 +2,8 @@
    Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/dwarf2.h b/src/dwarf2.h
index b0c80b6..be732e2 100644
--- a/src/dwarf2.h
+++ b/src/dwarf2.h
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2009, 2010, 2011, 2012 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/exec.c b/src/exec.c
index ca7fd14..2641877 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/execle_open.c b/src/execle_open.c
index 2ee5cbc..d795461 100644
--- a/src/execle_open.c
+++ b/src/execle_open.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/execstack.c b/src/execstack.c
index 97fb453..24f6fbb 100644
--- a/src/execstack.c
+++ b/src/execstack.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2003, 2005, 2010 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2003.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/fptr.c b/src/fptr.c
index cfe3aed..1c7916c 100644
--- a/src/fptr.c
+++ b/src/fptr.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/fptr.h b/src/fptr.h
index 36ef7c6..6daae03 100644
--- a/src/fptr.h
+++ b/src/fptr.h
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/gather.c b/src/gather.c
index 277f1b5..2af3d4d 100644
--- a/src/gather.c
+++ b/src/gather.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/get.c b/src/get.c
index 0659962..e956313 100644
--- a/src/get.c
+++ b/src/get.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/hashtab.c b/src/hashtab.c
index fa27446..b361785 100644
--- a/src/hashtab.c
+++ b/src/hashtab.c
@@ -2,6 +2,8 @@
    Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
    Contributed by Vladimir Makarov (vmakarov@cygnus.com).
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
 This file is part of the libiberty library.
 Libiberty is free software; you can redistribute it and/or
 modify it under the terms of the GNU Library General Public
diff --git a/src/hashtab.h b/src/hashtab.h
index 31e63e0..b100bb1 100644
--- a/src/hashtab.h
+++ b/src/hashtab.h
@@ -2,6 +2,8 @@
    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
    Contributed by Vladimir Makarov (vmakarov@cygnus.com).
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
diff --git a/src/layout.c b/src/layout.c
index 859ab66..626e858 100644
--- a/src/layout.c
+++ b/src/layout.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2011 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/layout.h b/src/layout.h
index f481d22..78494bc 100644
--- a/src/layout.h
+++ b/src/layout.h
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2004, 2006 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/main.c b/src/main.c
index 6ba89d5..f9be6cf 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2010, 2011 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/makecrc.c b/src/makecrc.c
index db52013..8de40d5 100644
--- a/src/makecrc.c
+++ b/src/makecrc.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /* Not copyrighted 1990 Mark Adler */
 
 #ifndef lint
diff --git a/src/md5.c b/src/md5.c
index 0d2fdef..8bf4a5d 100644
--- a/src/md5.c
+++ b/src/md5.c
@@ -4,6 +4,8 @@
    NOTE: The canonical source of this file is maintained with the GNU C
    Library.  Bugs can be reported to bug-glibc@prep.ai.mit.edu.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
    Free Software Foundation; either version 2, or (at your option) any
diff --git a/src/md5.h b/src/md5.h
index 55f6195..e74c214 100644
--- a/src/md5.h
+++ b/src/md5.h
@@ -4,6 +4,8 @@
    NOTE: The canonical source of this file is maintained with the GNU C
    Library.  Bugs can be reported to bug-glibc@prep.ai.mit.edu.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
    Free Software Foundation; either version 2, or (at your option) any
diff --git a/src/mdebug.c b/src/mdebug.c
index 4c22d2f..54a2739 100644
--- a/src/mdebug.c
+++ b/src/mdebug.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/prelink.c b/src/prelink.c
index 64c4fea..4c512dc 100644
--- a/src/prelink.c
+++ b/src/prelink.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/prelink.h b/src/prelink.h
index 39c4390..e2cde42 100644
--- a/src/prelink.h
+++ b/src/prelink.h
@@ -4,6 +4,8 @@
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
    Updated by Maciej W. Rozycki <macro@codesourcery.com>, 2008.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/prelinktab.h b/src/prelinktab.h
index f41c79c..d116e5d 100644
--- a/src/prelinktab.h
+++ b/src/prelinktab.h
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/reloc-info.c b/src/reloc-info.c
index 4ce333c..4c679b8 100644
--- a/src/reloc-info.c
+++ b/src/reloc-info.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2008 CodeSourcery
    Written by Maciej W. Rozycki <macro@codesourcery.com>, 2008.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/reloc-info.h b/src/reloc-info.h
index a8f8b7c..f9f02db 100644
--- a/src/reloc-info.h
+++ b/src/reloc-info.h
@@ -1,6 +1,8 @@
 /* Copyright (C) 2008 CodeSourcery
    Written by Maciej W. Rozycki <macro@codesourcery.com>, 2008.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/reloc.c b/src/reloc.c
index deb0abe..0132425 100644
--- a/src/reloc.c
+++ b/src/reloc.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2005 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/reloc.h b/src/reloc.h
index a2ceff9..001ebd1 100644
--- a/src/reloc.h
+++ b/src/reloc.h
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/sha.c b/src/sha.c
index cfbc956..0b8f9f8 100644
--- a/src/sha.c
+++ b/src/sha.c
@@ -3,6 +3,8 @@
 
    Copyright (C) 2000, 2001, 2003 Scott G. Miller
 
+   SPDX-License-Identifier: GPL-2.0-only
+
    Credits:
       Robert Klep <robert@ilse.nl>  -- Expansion function fix
    NOTE: The canonical source of this file is maintained in GNU coreutils.
diff --git a/src/sha.h b/src/sha.h
index 13583e3..b409752 100644
--- a/src/sha.h
+++ b/src/sha.h
@@ -2,6 +2,8 @@
    library functions.
 
    Copyright (C) 1999, Scott G. Miller
+
+   SPDX-License-Identifier: GPL-2.0-only
 */
 
 #ifndef _SHA_H
diff --git a/src/space.c b/src/space.c
index 4bd4760..3da0561 100644
--- a/src/space.c
+++ b/src/space.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/space.h b/src/space.h
index 5c9f725..4ef429e 100644
--- a/src/space.h
+++ b/src/space.h
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2004 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/stabs.c b/src/stabs.c
index c0a5a6a..4346950 100644
--- a/src/stabs.c
+++ b/src/stabs.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2005, 2006 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/undo.c b/src/undo.c
index 4c38dab..cf33f26 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2005, 2010 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/undoall.c b/src/undoall.c
index 55d2a0b..44907bd 100644
--- a/src/undoall.c
+++ b/src/undoall.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2002, 2005 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2002.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/verify.c b/src/verify.c
index 7f530c0..be028fc 100644
--- a/src/verify.c
+++ b/src/verify.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2002, 2003, 2006, 2007, 2010 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2002.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/testsuite/cxx1.C b/testsuite/cxx1.C
index 9c11a6d..9e9c7a9 100644
--- a/testsuite/cxx1.C
+++ b/testsuite/cxx1.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "cxx1.h"
 extern "C" void abort (void);
 
diff --git a/testsuite/cxx1.h b/testsuite/cxx1.h
index d6efe9b..8103388 100644
--- a/testsuite/cxx1.h
+++ b/testsuite/cxx1.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 struct A
   {
     virtual int a ();
diff --git a/testsuite/cxx1.sh b/testsuite/cxx1.sh
index 477a545..b4dc548 100755
--- a/testsuite/cxx1.sh
+++ b/testsuite/cxx1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f cxx1 cxx1lib*.so cxx1.log
 rm -f prelink.cache
diff --git a/testsuite/cxx1lib1.C b/testsuite/cxx1lib1.C
index 1eb192a..48cd2d9 100644
--- a/testsuite/cxx1lib1.C
+++ b/testsuite/cxx1lib1.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "cxx1.h"
 
 int A::a ()
diff --git a/testsuite/cxx1lib2.C b/testsuite/cxx1lib2.C
index 77055da..a600f55 100644
--- a/testsuite/cxx1lib2.C
+++ b/testsuite/cxx1lib2.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "cxx1.h"
 
 int A::a ()
diff --git a/testsuite/cxx2.C b/testsuite/cxx2.C
index 8b6e0bf..d2e5397 100644
--- a/testsuite/cxx2.C
+++ b/testsuite/cxx2.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "cxx1.h"
 extern "C" void abort (void);
 
diff --git a/testsuite/cxx2.sh b/testsuite/cxx2.sh
index 064fcb6..66d0d42 100755
--- a/testsuite/cxx2.sh
+++ b/testsuite/cxx2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f cxx2 cxx2lib*.so cxx2.log
 rm -f prelink.cache
diff --git a/testsuite/cxx3.C b/testsuite/cxx3.C
index 0a4ad7b..7a4a6fc 100644
--- a/testsuite/cxx3.C
+++ b/testsuite/cxx3.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "cxx3.h"
 extern "C" void abort (void);
 
diff --git a/testsuite/cxx3.h b/testsuite/cxx3.h
index ad2de7e..37e693b 100644
--- a/testsuite/cxx3.h
+++ b/testsuite/cxx3.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 struct A
   {
     virtual int a () { return 1; }
diff --git a/testsuite/cxx3.sh b/testsuite/cxx3.sh
index 418369a..e4a769b 100755
--- a/testsuite/cxx3.sh
+++ b/testsuite/cxx3.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f cxx3 cxx3lib*.so cxx3.log
 rm -f prelink.cache
diff --git a/testsuite/cxx3lib1.C b/testsuite/cxx3lib1.C
index f870bf0..0d21ee3 100644
--- a/testsuite/cxx3lib1.C
+++ b/testsuite/cxx3lib1.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "cxx3.h"
 
 A a1;
diff --git a/testsuite/cxx3lib2.C b/testsuite/cxx3lib2.C
index 75f2b12..8b4766c 100644
--- a/testsuite/cxx3lib2.C
+++ b/testsuite/cxx3lib2.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "cxx3.h"
 
 A a2;
diff --git a/testsuite/cycle1.sh b/testsuite/cycle1.sh
index 3dc7f93..d44819f 100755
--- a/testsuite/cycle1.sh
+++ b/testsuite/cycle1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f cycle1 cycle1lib*.so cycle1.log
 rm -f prelink.cache
diff --git a/testsuite/cycle2.sh b/testsuite/cycle2.sh
index 0b99a5d..6b55056 100755
--- a/testsuite/cycle2.sh
+++ b/testsuite/cycle2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f cycle2 cycle2lib*.so cycle2.log
 rm -f prelink.cache
diff --git a/testsuite/deps1.c b/testsuite/deps1.c
index 331546c..3018e4b 100644
--- a/testsuite/deps1.c
+++ b/testsuite/deps1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/deps1.h b/testsuite/deps1.h
index d5868f7..b297708 100644
--- a/testsuite/deps1.h
+++ b/testsuite/deps1.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 
 extern int f8 (void);
diff --git a/testsuite/deps1.sh b/testsuite/deps1.sh
index b61a41d..ee48407 100755
--- a/testsuite/deps1.sh
+++ b/testsuite/deps1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 
 PRELINK=`echo $PRELINK \
diff --git a/testsuite/deps1lib1.c b/testsuite/deps1lib1.c
index d4ab28b..4efc3ac 100644
--- a/testsuite/deps1lib1.c
+++ b/testsuite/deps1lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "deps1.h"
 
 int bar = 26;
diff --git a/testsuite/deps1lib2.c b/testsuite/deps1lib2.c
index f73b456..719ad7d 100644
--- a/testsuite/deps1lib2.c
+++ b/testsuite/deps1lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 
 int f1 (void)
diff --git a/testsuite/deps2.sh b/testsuite/deps2.sh
index 0bcc21c..72551e5 100755
--- a/testsuite/deps2.sh
+++ b/testsuite/deps2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 
 PRELINK=`echo $PRELINK \
diff --git a/testsuite/deps2lib1.c b/testsuite/deps2lib1.c
index 9d4b2de..aa05d44 100644
--- a/testsuite/deps2lib1.c
+++ b/testsuite/deps2lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "deps1.h"
 
 int bar = 26;
diff --git a/testsuite/functions.sh b/testsuite/functions.sh
index 5e98725..a126029 100755
--- a/testsuite/functions.sh
+++ b/testsuite/functions.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 CC="${CC:-gcc} ${LINKOPTS}"
 CCLINK=${CCLINK:-${CC} -Wl,--dynamic-linker=`echo ./ld*.so.*[0-9]`}
 CXX="${CXX:-g++} ${LINKOPTS}"
diff --git a/testsuite/ifunc.h b/testsuite/ifunc.h
index 78ad86b..5762839 100644
--- a/testsuite/ifunc.h
+++ b/testsuite/ifunc.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #ifndef PICKNO
 # define PICKNO 1
 #endif
diff --git a/testsuite/ifunc1.c b/testsuite/ifunc1.c
index f5500df..6d5f7e0 100644
--- a/testsuite/ifunc1.c
+++ b/testsuite/ifunc1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "ifunc.h"
 
 static int bint11 (void) { return 1; }
diff --git a/testsuite/ifunc1.sh b/testsuite/ifunc1.sh
index 135014d..11f0243 100755
--- a/testsuite/ifunc1.sh
+++ b/testsuite/ifunc1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 $CCLINK -o ifunctest $srcdir/ifunctest.c -Wl,--rpath-link,. > /dev/null 2>&1 || exit 77
diff --git a/testsuite/ifunc1lib1.c b/testsuite/ifunc1lib1.c
index 27a3f03..79bcbe4 100644
--- a/testsuite/ifunc1lib1.c
+++ b/testsuite/ifunc1lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "ifunc.h"
 
 static int lib1t11 (void) { return 11; }
diff --git a/testsuite/ifunc1lib2.c b/testsuite/ifunc1lib2.c
index ca12e3d..f66c754 100644
--- a/testsuite/ifunc1lib2.c
+++ b/testsuite/ifunc1lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "ifunc.h"
 
 static int lib2t11 (void) { return 1; }
diff --git a/testsuite/ifunc2.sh b/testsuite/ifunc2.sh
index 3966e86..2717595 100755
--- a/testsuite/ifunc2.sh
+++ b/testsuite/ifunc2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 $CCLINK -o ifunctest $srcdir/ifunctest.c -Wl,--rpath-link,. > /dev/null 2>&1 || exit 77
diff --git a/testsuite/ifunc3.c b/testsuite/ifunc3.c
index 1f243d8..dab90c5 100644
--- a/testsuite/ifunc3.c
+++ b/testsuite/ifunc3.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "ifunc.h"
 
 static int bint11 (void) { return 1; }
diff --git a/testsuite/ifunc3.sh b/testsuite/ifunc3.sh
index 30fc893..c6e8dc6 100755
--- a/testsuite/ifunc3.sh
+++ b/testsuite/ifunc3.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 $CCLINK -o ifunctest $srcdir/ifunctest.c -Wl,--rpath-link,. > /dev/null 2>&1 || exit 77
diff --git a/testsuite/ifunc3lib1.c b/testsuite/ifunc3lib1.c
index 133b389..88a7019 100644
--- a/testsuite/ifunc3lib1.c
+++ b/testsuite/ifunc3lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "ifunc.h"
 
 static int lib1t11 (void) { return 11; }
diff --git a/testsuite/ifunctest.c b/testsuite/ifunctest.c
index 9ce7b1a..6b12e46 100644
--- a/testsuite/ifunctest.c
+++ b/testsuite/ifunctest.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "ifunc.h"
 
 static int foo1 (void) { return 1; }
diff --git a/testsuite/layout.C b/testsuite/layout.C
index 5047a34..eccbeee 100644
--- a/testsuite/layout.C
+++ b/testsuite/layout.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int main()
 {
 }
diff --git a/testsuite/layout1.sh b/testsuite/layout1.sh
index ee751ab..63c1891 100755
--- a/testsuite/layout1.sh
+++ b/testsuite/layout1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f prelink.cache
 rm -f layout1 layoutlib*.so layout1.log
diff --git a/testsuite/layout2.sh b/testsuite/layout2.sh
index 7d8504b..5378b0e 100755
--- a/testsuite/layout2.sh
+++ b/testsuite/layout2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f layout2 layout2lib*.so layout2.log
 i=1
diff --git a/testsuite/layoutlib.C b/testsuite/layoutlib.C
index 8162515..d699152 100644
--- a/testsuite/layoutlib.C
+++ b/testsuite/layoutlib.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 struct A
   {
     virtual int a();
diff --git a/testsuite/movelibs.sh b/testsuite/movelibs.sh
index 4357ee8..0655df5 100755
--- a/testsuite/movelibs.sh
+++ b/testsuite/movelibs.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # This script copies needed C and C++ libraries into the test directory
 echo 'int main() { }' > movelibs.C
diff --git a/testsuite/order.c b/testsuite/order.c
index 5e0ef43..08fdf43 100644
--- a/testsuite/order.c
+++ b/testsuite/order.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdio.h>
 #include "orderlib1.h"
 #include "orderlib.h"
diff --git a/testsuite/order.sh b/testsuite/order.sh
index ce0dbda..4725736 100755
--- a/testsuite/order.sh
+++ b/testsuite/order.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f order orderlib*.so order.log
 rm -f prelink.cache
diff --git a/testsuite/orderlib.c b/testsuite/orderlib.c
index 0a97e0a..2171de2 100644
--- a/testsuite/orderlib.c
+++ b/testsuite/orderlib.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "orderlib.h"
 #include "orderlib1.h"
 
diff --git a/testsuite/orderlib.h b/testsuite/orderlib.h
index a4f1eb0..cf693d5 100644
--- a/testsuite/orderlib.h
+++ b/testsuite/orderlib.h
@@ -1,2 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int value(void);
 int value1(void);
diff --git a/testsuite/orderlib1.c b/testsuite/orderlib1.c
index be4ebdc..4a8460e 100644
--- a/testsuite/orderlib1.c
+++ b/testsuite/orderlib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "orderlib.h"
 
 int value1(void)
diff --git a/testsuite/orderlib1.h b/testsuite/orderlib1.h
index 5763a36..12750ca 100644
--- a/testsuite/orderlib1.h
+++ b/testsuite/orderlib1.h
@@ -1 +1,2 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int orderlib1(void);
diff --git a/testsuite/orderlib2.c b/testsuite/orderlib2.c
index d1908ea..ec17e93 100644
--- a/testsuite/orderlib2.c
+++ b/testsuite/orderlib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "orderlib.h"
 
 int value(void)
diff --git a/testsuite/orderlib3.c b/testsuite/orderlib3.c
index f0ff8cd..285f29b 100644
--- a/testsuite/orderlib3.c
+++ b/testsuite/orderlib3.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "orderlib.h"
 
 int value(void)
diff --git a/testsuite/preload1.c b/testsuite/preload1.c
index d6ee489..8805956 100644
--- a/testsuite/preload1.c
+++ b/testsuite/preload1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdlib.h>
 #include "preload1.h"
 
diff --git a/testsuite/preload1.h b/testsuite/preload1.h
index 139bee0..f85bd3b 100644
--- a/testsuite/preload1.h
+++ b/testsuite/preload1.h
@@ -1,2 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int foo(int x, int y);
 
diff --git a/testsuite/preload1.sh b/testsuite/preload1.sh
index 8e1f4d0..2ac3105 100755
--- a/testsuite/preload1.sh
+++ b/testsuite/preload1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 check_one() {
   cnt=0
diff --git a/testsuite/preload1lib1.c b/testsuite/preload1lib1.c
index 0c1fa43..9be97fd 100644
--- a/testsuite/preload1lib1.c
+++ b/testsuite/preload1lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "preload1.h"
 
 int foo(int x, int y) {
diff --git a/testsuite/preload1lib2.c b/testsuite/preload1lib2.c
index 7ab50aa..19de490 100644
--- a/testsuite/preload1lib2.c
+++ b/testsuite/preload1lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "preload1.h"
 
 int foo(int x, int y) {
diff --git a/testsuite/quick1.c b/testsuite/quick1.c
index dc98441..5d6c9ef 100644
--- a/testsuite/quick1.c
+++ b/testsuite/quick1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/quick1.sh b/testsuite/quick1.sh
index 691b940..01d5172 100755
--- a/testsuite/quick1.sh
+++ b/testsuite/quick1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 check_one() {
   cnt=0
diff --git a/testsuite/quick1lib1.c b/testsuite/quick1lib1.c
index 41767ce..0c6deb7 100644
--- a/testsuite/quick1lib1.c
+++ b/testsuite/quick1lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int q1 (void)
 {
   return q2 () + 1;
diff --git a/testsuite/quick1lib2.c b/testsuite/quick1lib2.c
index b545086..bd718f8 100644
--- a/testsuite/quick1lib2.c
+++ b/testsuite/quick1lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 extern int q1 (void);
 
 int f1 (void)
diff --git a/testsuite/quick1lib3.c b/testsuite/quick1lib3.c
index 06760a3..40de8d6 100644
--- a/testsuite/quick1lib3.c
+++ b/testsuite/quick1lib3.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #ifndef D1
 #define D1(n) int qvar##n; int *qpvar##n = &qvar##n;
 #endif
diff --git a/testsuite/quick1lib4.c b/testsuite/quick1lib4.c
index 53e23d7..7a0e168 100644
--- a/testsuite/quick1lib4.c
+++ b/testsuite/quick1lib4.c
@@ -1,2 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #define D1(n) int qvar##n;
 #include "quick1lib3.c"
diff --git a/testsuite/quick2.sh b/testsuite/quick2.sh
index 031a410..a8248df 100755
--- a/testsuite/quick2.sh
+++ b/testsuite/quick2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 check_one() {
   cnt=0
diff --git a/testsuite/quick3.sh b/testsuite/quick3.sh
index 1cdb523..f86d582 100755
--- a/testsuite/quick3.sh
+++ b/testsuite/quick3.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 check_one() {
   cnt=0
diff --git a/testsuite/reloc1.c b/testsuite/reloc1.c
index e679bed..e799f1f 100644
--- a/testsuite/reloc1.c
+++ b/testsuite/reloc1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/reloc1.h b/testsuite/reloc1.h
index 093dd3a..1287080 100644
--- a/testsuite/reloc1.h
+++ b/testsuite/reloc1.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 struct A
   {
     char a;
diff --git a/testsuite/reloc1.sh b/testsuite/reloc1.sh
index 5616d4e..a89163c 100755
--- a/testsuite/reloc1.sh
+++ b/testsuite/reloc1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f reloc1 reloc1lib*.so reloc1.log
 rm -f prelink.cache
diff --git a/testsuite/reloc10.c b/testsuite/reloc10.c
index 5720d33..5418a35 100644
--- a/testsuite/reloc10.c
+++ b/testsuite/reloc10.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdlib.h>
 
 extern int bar, baz, *barp, *bazp, dummy;
diff --git a/testsuite/reloc10.sh b/testsuite/reloc10.sh
index 03034c1..f9deb4a 100755
--- a/testsuite/reloc10.sh
+++ b/testsuite/reloc10.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f reloc10 reloc10lib*.so reloc10.log
 rm -f prelink.cache
diff --git a/testsuite/reloc10lib1.c b/testsuite/reloc10lib1.c
index 2ee06d2..f229bcf 100644
--- a/testsuite/reloc10lib1.c
+++ b/testsuite/reloc10lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int bar = 26;
 int baz = 28;
 
diff --git a/testsuite/reloc10lib2.c b/testsuite/reloc10lib2.c
index fc327fc..1e34aab 100644
--- a/testsuite/reloc10lib2.c
+++ b/testsuite/reloc10lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 extern int bar, baz, f1 (void), f2 (void);
 
 int f3 (void)
diff --git a/testsuite/reloc10lib3.c b/testsuite/reloc10lib3.c
index 2ec80ab..4db3b03 100644
--- a/testsuite/reloc10lib3.c
+++ b/testsuite/reloc10lib3.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 extern int bar, baz, f1 (void), f2 (void);
 
 int *barp = &bar, *bazp = &baz;
diff --git a/testsuite/reloc10lib4.c b/testsuite/reloc10lib4.c
index 4376249..dc7c0c6 100644
--- a/testsuite/reloc10lib4.c
+++ b/testsuite/reloc10lib4.c
@@ -1 +1,2 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int dummy = 24;
diff --git a/testsuite/reloc10lib5.c b/testsuite/reloc10lib5.c
index 19fd925..0986a4a 100644
--- a/testsuite/reloc10lib5.c
+++ b/testsuite/reloc10lib5.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int bar = 36;
 int baz = 38;
 
diff --git a/testsuite/reloc11.c b/testsuite/reloc11.c
index 923aff4..28ff119 100644
--- a/testsuite/reloc11.c
+++ b/testsuite/reloc11.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdlib.h>
 
 extern int dummy;
diff --git a/testsuite/reloc11.sh b/testsuite/reloc11.sh
index fa0eab9..dbfe6f8 100755
--- a/testsuite/reloc11.sh
+++ b/testsuite/reloc11.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f reloc11 reloc11lib*.so reloc11.log
 rm -f prelink.cache
diff --git a/testsuite/reloc11lib2.c b/testsuite/reloc11lib2.c
index 6a2191c..7f2e24f 100644
--- a/testsuite/reloc11lib2.c
+++ b/testsuite/reloc11lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int var = 24, var2 = 16;
 
 int varp1 (void)
diff --git a/testsuite/reloc11lib3.c b/testsuite/reloc11lib3.c
index 0cea7f3..0693304 100644
--- a/testsuite/reloc11lib3.c
+++ b/testsuite/reloc11lib3.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int var = 32;
 extern int var2;
 
diff --git a/testsuite/reloc12.c b/testsuite/reloc12.c
index cfa8888..71dce49 100644
--- a/testsuite/reloc12.c
+++ b/testsuite/reloc12.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc12.h"
 #include <stdlib.h>
 
diff --git a/testsuite/reloc12.h b/testsuite/reloc12.h
index 8e09405..b7fe27b 100644
--- a/testsuite/reloc12.h
+++ b/testsuite/reloc12.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 typedef struct
   {
     char a;
diff --git a/testsuite/reloc12.sh b/testsuite/reloc12.sh
index 74d1fa8..e65dcd2 100755
--- a/testsuite/reloc12.sh
+++ b/testsuite/reloc12.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f reloc12 reloc12lib*.so reloc12.log
 rm -f prelink.cache
diff --git a/testsuite/reloc12lib1.c b/testsuite/reloc12lib1.c
index db7e64f..4ee9d39 100644
--- a/testsuite/reloc12lib1.c
+++ b/testsuite/reloc12lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc12.h"
 
 char a(const A *d)
diff --git a/testsuite/reloc12lib2.c b/testsuite/reloc12lib2.c
index ffa60a0..cbe06cb 100644
--- a/testsuite/reloc12lib2.c
+++ b/testsuite/reloc12lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc12.h"
 
 A foo[] = {
diff --git a/testsuite/reloc1lib1.c b/testsuite/reloc1lib1.c
index 8aa0628..ac5e92b 100644
--- a/testsuite/reloc1lib1.c
+++ b/testsuite/reloc1lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 
 int bar = 26;
diff --git a/testsuite/reloc1lib2.c b/testsuite/reloc1lib2.c
index a338c1d..619c878 100644
--- a/testsuite/reloc1lib2.c
+++ b/testsuite/reloc1lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 
 int f1 (void)
diff --git a/testsuite/reloc2.c b/testsuite/reloc2.c
index 6c7fed5..97d0485 100644
--- a/testsuite/reloc2.c
+++ b/testsuite/reloc2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdlib.h>
 
 extern int f2 (int add);
diff --git a/testsuite/reloc2.sh b/testsuite/reloc2.sh
index 42bb63f..f495f64 100755
--- a/testsuite/reloc2.sh
+++ b/testsuite/reloc2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 SHFLAGS=
 case "`uname -m`" in
diff --git a/testsuite/reloc2lib1.c b/testsuite/reloc2lib1.c
index 3551704..6e234a4 100644
--- a/testsuite/reloc2lib1.c
+++ b/testsuite/reloc2lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int f1 (int dummy)
 {
   return 1;
diff --git a/testsuite/reloc2lib2.c b/testsuite/reloc2lib2.c
index 094daad..d3f8510 100644
--- a/testsuite/reloc2lib2.c
+++ b/testsuite/reloc2lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 extern int f1 (int dummy);
 
 int f2 (int add)
diff --git a/testsuite/reloc3.c b/testsuite/reloc3.c
index 2f455d7..8555d80 100644
--- a/testsuite/reloc3.c
+++ b/testsuite/reloc3.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/testsuite/reloc3.sh b/testsuite/reloc3.sh
index 5941798..d3c25d3 100755
--- a/testsuite/reloc3.sh
+++ b/testsuite/reloc3.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f reloc3 reloc3lib*.so reloc3.log
 rm -f prelink.cache
diff --git a/testsuite/reloc3lib1.c b/testsuite/reloc3lib1.c
index fd649c6..df4330a 100644
--- a/testsuite/reloc3lib1.c
+++ b/testsuite/reloc3lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 
 int baz[3] = { 28, 29, 30 };
diff --git a/testsuite/reloc4.c b/testsuite/reloc4.c
index cb3b17a..e9560d0 100644
--- a/testsuite/reloc4.c
+++ b/testsuite/reloc4.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdio.h>
 
 int main (void)
diff --git a/testsuite/reloc4.sh b/testsuite/reloc4.sh
index 992c33a..fbea2b8 100755
--- a/testsuite/reloc4.sh
+++ b/testsuite/reloc4.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # This test takes a lot of time, so skip it normally
 [ -z "$CHECK_ME_HARDER" ] && exit 77
diff --git a/testsuite/reloc4lib1.c b/testsuite/reloc4lib1.c
index f1297d8..8583bad 100644
--- a/testsuite/reloc4lib1.c
+++ b/testsuite/reloc4lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdio.h>
 
 int main (void)
diff --git a/testsuite/reloc4lib2.c b/testsuite/reloc4lib2.c
index 07aa721..8014a12 100644
--- a/testsuite/reloc4lib2.c
+++ b/testsuite/reloc4lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdio.h>
 
 int main (void)
diff --git a/testsuite/reloc4lib3.c b/testsuite/reloc4lib3.c
index 1f30817..615eb99 100644
--- a/testsuite/reloc4lib3.c
+++ b/testsuite/reloc4lib3.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdio.h>
 
 int main (void)
diff --git a/testsuite/reloc5.c b/testsuite/reloc5.c
index 123ad5d..a9c6b97 100644
--- a/testsuite/reloc5.c
+++ b/testsuite/reloc5.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdio.h>
 
 int main (void)
diff --git a/testsuite/reloc5.sh b/testsuite/reloc5.sh
index b17cbff..9fe5efb 100755
--- a/testsuite/reloc5.sh
+++ b/testsuite/reloc5.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # This test takes a lot of time, so skip it normally
 [ -z "$CHECK_ME_HARDER" ] && exit 77
diff --git a/testsuite/reloc6.sh b/testsuite/reloc6.sh
index f2a5b17..5015c1e 100755
--- a/testsuite/reloc6.sh
+++ b/testsuite/reloc6.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f reloc6 reloc6lib*.so reloc6.log
 rm -f prelink.cache
diff --git a/testsuite/reloc7.c b/testsuite/reloc7.c
index c1f6dc8..c4c8a53 100644
--- a/testsuite/reloc7.c
+++ b/testsuite/reloc7.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/testsuite/reloc7.sh b/testsuite/reloc7.sh
index c7dab99..3b0d42b 100755
--- a/testsuite/reloc7.sh
+++ b/testsuite/reloc7.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f reloc7 reloc7lib*.so reloc7.log
 rm -f prelink.cache
diff --git a/testsuite/reloc8.sh b/testsuite/reloc8.sh
index 05195cf..179f411 100755
--- a/testsuite/reloc8.sh
+++ b/testsuite/reloc8.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # Disable this test under SELinux
 if test -x /usr/sbin/getenforce; then
diff --git a/testsuite/reloc9.sh b/testsuite/reloc9.sh
index e5ec292..a187fcb 100755
--- a/testsuite/reloc9.sh
+++ b/testsuite/reloc9.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # Disable this test under SELinux
 if test -x /usr/sbin/getenforce; then
diff --git a/testsuite/shuffle1.sh b/testsuite/shuffle1.sh
index 61e596f..4971854 100755
--- a/testsuite/shuffle1.sh
+++ b/testsuite/shuffle1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f shuffle1 shuffle1lib*.so shuffle1.log shuffle1.lds
 rm -f prelink.cache
diff --git a/testsuite/shuffle2.c b/testsuite/shuffle2.c
index 8c06942..8ecf168 100644
--- a/testsuite/shuffle2.c
+++ b/testsuite/shuffle2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/shuffle2.sh b/testsuite/shuffle2.sh
index 953cea3..3d7f7ae 100755
--- a/testsuite/shuffle2.sh
+++ b/testsuite/shuffle2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # Kernels before 2.4.10 are known not to work
 case "`uname -r`" in
diff --git a/testsuite/shuffle3.sh b/testsuite/shuffle3.sh
index 534d174..413f3d9 100755
--- a/testsuite/shuffle3.sh
+++ b/testsuite/shuffle3.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # Kernels before 2.4.10 are known not to work
 case "`uname -r`" in
diff --git a/testsuite/shuffle4.sh b/testsuite/shuffle4.sh
index 398972a..da2664d 100755
--- a/testsuite/shuffle4.sh
+++ b/testsuite/shuffle4.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # Kernels before 2.4.10 are known not to work
 case "`uname -r`" in
diff --git a/testsuite/shuffle5.sh b/testsuite/shuffle5.sh
index e8c0297..9543aa0 100755
--- a/testsuite/shuffle5.sh
+++ b/testsuite/shuffle5.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f shuffle5 shuffle5lib*.so shuffle5.log shuffle5.lds
 rm -f prelink.cache
diff --git a/testsuite/shuffle6.sh b/testsuite/shuffle6.sh
index cdd16a0..0c4442e 100755
--- a/testsuite/shuffle6.sh
+++ b/testsuite/shuffle6.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f shuffle6 shuffle6lib*.so shuffle6.log shuffle6.lds
 rm -f prelink.cache
diff --git a/testsuite/shuffle6lib1.c b/testsuite/shuffle6lib1.c
index 8053293..2e75a87 100644
--- a/testsuite/shuffle6lib1.c
+++ b/testsuite/shuffle6lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 
 int bar = 26;
diff --git a/testsuite/shuffle6lib2.c b/testsuite/shuffle6lib2.c
index ed18f6b..20ddf54 100644
--- a/testsuite/shuffle6lib2.c
+++ b/testsuite/shuffle6lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/shuffle7.sh b/testsuite/shuffle7.sh
index 4250b26..64332d0 100755
--- a/testsuite/shuffle7.sh
+++ b/testsuite/shuffle7.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f shuffle7 shuffle7lib*.so shuffle7.log shuffle7.lds
 rm -f prelink.cache
diff --git a/testsuite/shuffle8.c b/testsuite/shuffle8.c
index 4e80184..eeee490 100644
--- a/testsuite/shuffle8.c
+++ b/testsuite/shuffle8.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/shuffle8.sh b/testsuite/shuffle8.sh
index 7875673..8e99b04 100755
--- a/testsuite/shuffle8.sh
+++ b/testsuite/shuffle8.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f shuffle8 shuffle8lib*.so shuffle8.log shuffle8.lds
 rm -f prelink.cache
diff --git a/testsuite/shuffle9.c b/testsuite/shuffle9.c
index 201eabc..5c9a913 100644
--- a/testsuite/shuffle9.c
+++ b/testsuite/shuffle9.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/shuffle9.sh b/testsuite/shuffle9.sh
index c974708..5079acb 100755
--- a/testsuite/shuffle9.sh
+++ b/testsuite/shuffle9.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # Kernels before 2.4.10 are known not to work
 case "`uname -r`" in
diff --git a/testsuite/tls1.c b/testsuite/tls1.c
index 08bd26f..db87bf9 100644
--- a/testsuite/tls1.c
+++ b/testsuite/tls1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls1.h b/testsuite/tls1.h
index d627340..b550cf6 100644
--- a/testsuite/tls1.h
+++ b/testsuite/tls1.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 struct A
   {
     char a;
diff --git a/testsuite/tls1.sh b/testsuite/tls1.sh
index 585d179..4571fa4 100755
--- a/testsuite/tls1.sh
+++ b/testsuite/tls1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 rm -f tlstest
diff --git a/testsuite/tls1lib1.c b/testsuite/tls1lib1.c
index eb0734b..6fa1d07 100644
--- a/testsuite/tls1lib1.c
+++ b/testsuite/tls1lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls1lib2.c b/testsuite/tls1lib2.c
index eee03a9..c8d309a 100644
--- a/testsuite/tls1lib2.c
+++ b/testsuite/tls1lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls2.c b/testsuite/tls2.c
index 1246165..a8756e2 100644
--- a/testsuite/tls2.c
+++ b/testsuite/tls2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls2.sh b/testsuite/tls2.sh
index 6910c16..238f07b 100755
--- a/testsuite/tls2.sh
+++ b/testsuite/tls2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 rm -f tlstest
diff --git a/testsuite/tls2lib1.c b/testsuite/tls2lib1.c
index 24b7555..df3c657 100644
--- a/testsuite/tls2lib1.c
+++ b/testsuite/tls2lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls3.sh b/testsuite/tls3.sh
index 951ee55..f9b3edf 100755
--- a/testsuite/tls3.sh
+++ b/testsuite/tls3.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 rm -f tlstest
diff --git a/testsuite/tls3lib2.c b/testsuite/tls3lib2.c
index ba485d3..5e50e86 100644
--- a/testsuite/tls3lib2.c
+++ b/testsuite/tls3lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls4.c b/testsuite/tls4.c
index 0882f07..0e4ced1 100644
--- a/testsuite/tls4.c
+++ b/testsuite/tls4.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls4.sh b/testsuite/tls4.sh
index e00e7cc..e61c041 100755
--- a/testsuite/tls4.sh
+++ b/testsuite/tls4.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 rm -f tlstest
diff --git a/testsuite/tls4lib1.c b/testsuite/tls4lib1.c
index a03af0b..202bbbb 100644
--- a/testsuite/tls4lib1.c
+++ b/testsuite/tls4lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls4lib2.c b/testsuite/tls4lib2.c
index 309504b..9284a30 100644
--- a/testsuite/tls4lib2.c
+++ b/testsuite/tls4lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls5.sh b/testsuite/tls5.sh
index 7282808..99a7812 100755
--- a/testsuite/tls5.sh
+++ b/testsuite/tls5.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 rm -f tlstest
diff --git a/testsuite/tls5lib1.c b/testsuite/tls5lib1.c
index 9677848..bf42fcf 100644
--- a/testsuite/tls5lib1.c
+++ b/testsuite/tls5lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls6.sh b/testsuite/tls6.sh
index 6a64f02..0f526a5 100755
--- a/testsuite/tls6.sh
+++ b/testsuite/tls6.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 rm -f tlstest
diff --git a/testsuite/tls6lib1.c b/testsuite/tls6lib1.c
index 5310c06..4ee7eb8 100644
--- a/testsuite/tls6lib1.c
+++ b/testsuite/tls6lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls7.c b/testsuite/tls7.c
index 4a3db24..a11adfb 100644
--- a/testsuite/tls7.c
+++ b/testsuite/tls7.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls7.sh b/testsuite/tls7.sh
index ab93719..7431819 100755
--- a/testsuite/tls7.sh
+++ b/testsuite/tls7.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 rm -f tlstest
diff --git a/testsuite/undo1.sh b/testsuite/undo1.sh
index 68eee1f..ac07fb8 100755
--- a/testsuite/undo1.sh
+++ b/testsuite/undo1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f undo1 undo1lib*.so undo1.log
 rm -f prelink.cache
diff --git a/testsuite/undosyslibs.sh b/testsuite/undosyslibs.sh
index 1ce136d..ef0b1e8 100755
--- a/testsuite/undosyslibs.sh
+++ b/testsuite/undosyslibs.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 LIBS=`cat syslib.list`
 comparelibs >> undosyslibs.log 2>&1 || exit 1
diff --git a/testsuite/unprel1.c b/testsuite/unprel1.c
index 0c8e9f9..8aebe96 100644
--- a/testsuite/unprel1.c
+++ b/testsuite/unprel1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 extern int bar ();
 
 int
diff --git a/testsuite/unprel1.sh b/testsuite/unprel1.sh
index 401f8bf..69a7081 100755
--- a/testsuite/unprel1.sh
+++ b/testsuite/unprel1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 PRELINK=`echo $PRELINK \
 	 | sed -e 's, \./\(prelink\.\(cache\|conf\)\), unprel1.tree/etc/\1,g' \
diff --git a/testsuite/unprel1lib1.c b/testsuite/unprel1lib1.c
index 8f85da3..9ed43e5 100644
--- a/testsuite/unprel1lib1.c
+++ b/testsuite/unprel1lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int
 baz ()
 {
diff --git a/testsuite/unprel1lib2.c b/testsuite/unprel1lib2.c
index 4783123..7325d15 100644
--- a/testsuite/unprel1lib2.c
+++ b/testsuite/unprel1lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 extern int baz ();
 
 int
-- 
2.7.4


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

* Re: [yocto][prelink-cross] Bug 13529 add SPDX identifier
@ 2019-10-22  9:28     ` Yann CARDAILLAC
  0 siblings, 0 replies; 8+ messages in thread
From: Yann CARDAILLAC @ 2019-10-22  9:28 UTC (permalink / raw)
  To: Mark Hatle; +Cc: jakub, yocto, Romain Naour, mark.hatle, openembedded-core


[-- Attachment #1.1: Type: text/plain, Size: 5437 bytes --]

On Mon, Oct 21, 2019 at 4:35 PM Mark Hatle <mark.hatle@kernel.crashing.org>
wrote:

> On 10/21/19 4:43 AM, Yann CARDAILLAC wrote:
> > Hi Mark Hatle, Jakub Jelinek,
>
> Jakub is no longer supporting this code, but he may have valuable insights
> into
> licensing.
>
> > I'm currently beginning the work on bug 13529:
> >
> > https://bugzilla.yoctoproject.org/show_bug.cgi?id=13529
> >
> > The purpose is to add SPDX identifier to scripts and sources.
> >
> > Most of the sources have licences on the sources, however some of them
> don't,
> > and I've question about others :
> >
> > - src/sha.c do not shall it be GPLV2-or-later as most of the other?
>
> /* sha.c - Functions to compute the SHA1 hash (message-digest) of files
>    or blocks of memory.  Complies to the NIST specification FIPS-180-1.
>
>    Copyright (C) 2000, 2001, 2003 Scott G. Miller
>
>    Credits:
>       Robert Klep <robert@ilse.nl>  -- Expansion function fix
>    NOTE: The canonical source of this file is maintained in GNU coreutils.
> */
>
> The last line is the key.  This apparently came from GNU coreutils.
>
> From the SCM logs, sha.c was introduced in approx 2003-07-01 from what it
> looks
> like.  So it's a pretty old version.  You will need to do some detective
> work,
> and find older versions of coreutils until you find the one that
> corresponds to
> the code that was checked in.  Start back in 2003 and work backwards as
> necessary.  (The version that matches to the original 2003-07-01 should be
> the
> reasonable license to use.)
>

Ok I found it ! https://github.com/coreutils/coreutils/blob/v4.5.8/lib/sha.c

from : https://github.com/coreutils/coreutils/blob/v4.5.8/COPYING it looks
like it's only GPLV2


> > - how to licence m4/libelf.m4 ? I'd prefer you to tell me exactly what
> to add in
> > order to avoid errors
>
> The original version of the m4/libelf.m4 was introduced 2001-09-27.  It
> appears
> to me that it was written as part of the prelinker, so would be under the
> overall license of the prelinker.
>
> Based on this, my assumption is that it is GPL-2.0
>
> I do not see any 'or-later' clauses anywhere.
>
> I have just add  "dnl SPDX-License-Identifier: GPL-2.0-only" bellow the
"Written by" comment, however should it also be in the resulting template?
I can add it also at first line of the resulting file if necessary ?


> - what about *.C files ? They don't have licence header, they look like C
> file
> > to me so I'd probably add :
> > // SPDX-License-Identifier: GPL-2.0-or-later
>
> There are each simply test cases.  They would be covered by the overall
> 'COPYING' for the package.  Thus GPL-2.0
>
> > - what about testsuite/ files ?
>
> Same, no specifically stated license will be GPL-2.0.
>
> Done !

> > Shall every thing just be GPL-2.0-or-later?
>
> Also just to be clear.  As I am NOT the original author of this work, I
> won't
> accept a patch to remove any existing license text from the headers in this
> software, but I will accept the SPDX-License-Identifier to be added in
> addition
> to the existing license text.
>
>
If an existing file does not have any License text in it, then we will need
> to
> assume that the COPYING file covers all software unless there is some
> indicator
> it comes from another source with a different license.  For items w/o
> existing
> licenses, just adding the SPDX-License-Identifier will be acceptable.
>
> So in a header similar to:
>
> /* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
>    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
>
>    This program is free software; you can redistribute it and/or modify
>    it under the terms of the GNU General Public License as published by
>    the Free Software Foundation; either version 2, or (at your option)
>    any later version.
>
>    This program is distributed in the hope that it will be useful,
>    but WITHOUT ANY WARRANTY; without even the implied warranty of
>    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>    GNU General Public License for more details.
>
>    You should have received a copy of the GNU General Public License
>    along with this program; if not, write to the Free Software Foundation,
>    Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
>
> please add the header between the 'Written by' and the existing license
> text,
> such as:
>
> /* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
>    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
>
>    SPDX-License-Identifier: GPL-2.0-or-later
>
>    This program is free software; you can redistribute it and/or modify
>    it under the terms of the GNU General Public License as published by
>
>
Here's the first attempt of the patch, feel free to give me any advice on
how to improve it!

Regards,

-- 
[image: SMILE] <http://www.smile.eu/>

20 rue des Jardins
92600 Asnières-sur-Seine
*Yann CARDAILLAC*
Ingénieur Systèmes Embarqués

[image: email] yann.cardaillac@smile.fr
[image: url] http://www.smile.eu

[image: Twitter] <https://twitter.com/GroupeSmile> [image: Facebook]
<https://www.facebook.com/smileopensource> [image: LinkedIn]
<https://www.linkedin.com/company/smile> [image: Github]
<https://github.com/Smile-SA>


[image: eco] Pour la planète, n'imprimez ce mail que si c'est nécessaire

[-- Attachment #1.2: Type: text/html, Size: 10450 bytes --]

[-- Attachment #2: 0001-add-SPDX-Licence-identifier.patch --]
[-- Type: text/x-patch, Size: 73507 bytes --]

From e327620eb36ddb04b4e5761fa1a13a272375dafb Mon Sep 17 00:00:00 2001
From: Yann CARDAILLAC <yann.cardaillac@smile.fr>
Date: Tue, 22 Oct 2019 11:27:00 +0200
Subject: [PATCH] add SPDX Licence identifier

Signed-off-by: Yann CARDAILLAC <yann.cardaillac@smile.fr>
---
 gelf/gelf.c              | 2 ++
 gelf/gelf.h              | 2 ++
 gelfx/gelfx.h            | 2 ++
 gelfx32/gelfx.h          | 2 ++
 m4/libelf.m4             | 1 +
 src/arch-alpha.c         | 2 ++
 src/arch-arm.c           | 2 ++
 src/arch-cris.c          | 2 ++
 src/arch-i386.c          | 2 ++
 src/arch-ia64.c          | 2 ++
 src/arch-mips.c          | 2 ++
 src/arch-ppc.c           | 2 ++
 src/arch-ppc64.c         | 2 ++
 src/arch-s390.c          | 2 ++
 src/arch-s390x.c         | 2 ++
 src/arch-sh.c            | 2 ++
 src/arch-sparc.c         | 2 ++
 src/arch-sparc64.c       | 2 ++
 src/arch-x86_64.c        | 2 ++
 src/cache.c              | 2 ++
 src/canonicalize.c       | 2 ++
 src/checksum.c           | 2 ++
 src/conflict.c           | 2 ++
 src/crc32.c              | 2 ++
 src/cxx.c                | 2 ++
 src/data.c               | 2 ++
 src/doit.c               | 2 ++
 src/dso.c                | 2 ++
 src/dwarf2.c             | 2 ++
 src/dwarf2.h             | 2 ++
 src/exec.c               | 2 ++
 src/execle_open.c        | 2 ++
 src/execstack.c          | 2 ++
 src/fptr.c               | 2 ++
 src/fptr.h               | 2 ++
 src/gather.c             | 2 ++
 src/get.c                | 2 ++
 src/hashtab.c            | 2 ++
 src/hashtab.h            | 2 ++
 src/layout.c             | 2 ++
 src/layout.h             | 2 ++
 src/main.c               | 2 ++
 src/makecrc.c            | 1 +
 src/md5.c                | 2 ++
 src/md5.h                | 2 ++
 src/mdebug.c             | 2 ++
 src/prelink.c            | 2 ++
 src/prelink.h            | 2 ++
 src/prelinktab.h         | 2 ++
 src/reloc-info.c         | 2 ++
 src/reloc-info.h         | 2 ++
 src/reloc.c              | 2 ++
 src/reloc.h              | 2 ++
 src/sha.c                | 2 ++
 src/sha.h                | 2 ++
 src/space.c              | 2 ++
 src/space.h              | 2 ++
 src/stabs.c              | 2 ++
 src/undo.c               | 2 ++
 src/undoall.c            | 2 ++
 src/verify.c             | 2 ++
 testsuite/cxx1.C         | 1 +
 testsuite/cxx1.h         | 1 +
 testsuite/cxx1.sh        | 1 +
 testsuite/cxx1lib1.C     | 1 +
 testsuite/cxx1lib2.C     | 1 +
 testsuite/cxx2.C         | 1 +
 testsuite/cxx2.sh        | 1 +
 testsuite/cxx3.C         | 1 +
 testsuite/cxx3.h         | 1 +
 testsuite/cxx3.sh        | 1 +
 testsuite/cxx3lib1.C     | 1 +
 testsuite/cxx3lib2.C     | 1 +
 testsuite/cycle1.sh      | 1 +
 testsuite/cycle2.sh      | 1 +
 testsuite/deps1.c        | 1 +
 testsuite/deps1.h        | 1 +
 testsuite/deps1.sh       | 1 +
 testsuite/deps1lib1.c    | 1 +
 testsuite/deps1lib2.c    | 1 +
 testsuite/deps2.sh       | 1 +
 testsuite/deps2lib1.c    | 1 +
 testsuite/functions.sh   | 1 +
 testsuite/ifunc.h        | 1 +
 testsuite/ifunc1.c       | 1 +
 testsuite/ifunc1.sh      | 1 +
 testsuite/ifunc1lib1.c   | 1 +
 testsuite/ifunc1lib2.c   | 1 +
 testsuite/ifunc2.sh      | 1 +
 testsuite/ifunc3.c       | 1 +
 testsuite/ifunc3.sh      | 1 +
 testsuite/ifunc3lib1.c   | 1 +
 testsuite/ifunctest.c    | 1 +
 testsuite/layout.C       | 1 +
 testsuite/layout1.sh     | 1 +
 testsuite/layout2.sh     | 1 +
 testsuite/layoutlib.C    | 1 +
 testsuite/movelibs.sh    | 1 +
 testsuite/order.c        | 1 +
 testsuite/order.sh       | 1 +
 testsuite/orderlib.c     | 1 +
 testsuite/orderlib.h     | 1 +
 testsuite/orderlib1.c    | 1 +
 testsuite/orderlib1.h    | 1 +
 testsuite/orderlib2.c    | 1 +
 testsuite/orderlib3.c    | 1 +
 testsuite/preload1.c     | 1 +
 testsuite/preload1.h     | 1 +
 testsuite/preload1.sh    | 1 +
 testsuite/preload1lib1.c | 1 +
 testsuite/preload1lib2.c | 1 +
 testsuite/quick1.c       | 1 +
 testsuite/quick1.sh      | 1 +
 testsuite/quick1lib1.c   | 1 +
 testsuite/quick1lib2.c   | 1 +
 testsuite/quick1lib3.c   | 1 +
 testsuite/quick1lib4.c   | 1 +
 testsuite/quick2.sh      | 1 +
 testsuite/quick3.sh      | 1 +
 testsuite/reloc1.c       | 1 +
 testsuite/reloc1.h       | 1 +
 testsuite/reloc1.sh      | 1 +
 testsuite/reloc10.c      | 1 +
 testsuite/reloc10.sh     | 1 +
 testsuite/reloc10lib1.c  | 1 +
 testsuite/reloc10lib2.c  | 1 +
 testsuite/reloc10lib3.c  | 1 +
 testsuite/reloc10lib4.c  | 1 +
 testsuite/reloc10lib5.c  | 1 +
 testsuite/reloc11.c      | 1 +
 testsuite/reloc11.sh     | 1 +
 testsuite/reloc11lib2.c  | 1 +
 testsuite/reloc11lib3.c  | 1 +
 testsuite/reloc12.c      | 1 +
 testsuite/reloc12.h      | 1 +
 testsuite/reloc12.sh     | 1 +
 testsuite/reloc12lib1.c  | 1 +
 testsuite/reloc12lib2.c  | 1 +
 testsuite/reloc1lib1.c   | 1 +
 testsuite/reloc1lib2.c   | 1 +
 testsuite/reloc2.c       | 1 +
 testsuite/reloc2.sh      | 1 +
 testsuite/reloc2lib1.c   | 1 +
 testsuite/reloc2lib2.c   | 1 +
 testsuite/reloc3.c       | 1 +
 testsuite/reloc3.sh      | 1 +
 testsuite/reloc3lib1.c   | 1 +
 testsuite/reloc4.c       | 1 +
 testsuite/reloc4.sh      | 1 +
 testsuite/reloc4lib1.c   | 1 +
 testsuite/reloc4lib2.c   | 1 +
 testsuite/reloc4lib3.c   | 1 +
 testsuite/reloc5.c       | 1 +
 testsuite/reloc5.sh      | 1 +
 testsuite/reloc6.sh      | 1 +
 testsuite/reloc7.c       | 1 +
 testsuite/reloc7.sh      | 1 +
 testsuite/reloc8.sh      | 1 +
 testsuite/reloc9.sh      | 1 +
 testsuite/shuffle1.sh    | 1 +
 testsuite/shuffle2.c     | 1 +
 testsuite/shuffle2.sh    | 1 +
 testsuite/shuffle3.sh    | 1 +
 testsuite/shuffle4.sh    | 1 +
 testsuite/shuffle5.sh    | 1 +
 testsuite/shuffle6.sh    | 1 +
 testsuite/shuffle6lib1.c | 1 +
 testsuite/shuffle6lib2.c | 1 +
 testsuite/shuffle7.sh    | 1 +
 testsuite/shuffle8.c     | 1 +
 testsuite/shuffle8.sh    | 1 +
 testsuite/shuffle9.c     | 1 +
 testsuite/shuffle9.sh    | 1 +
 testsuite/tls1.c         | 1 +
 testsuite/tls1.h         | 1 +
 testsuite/tls1.sh        | 1 +
 testsuite/tls1lib1.c     | 1 +
 testsuite/tls1lib2.c     | 1 +
 testsuite/tls2.c         | 1 +
 testsuite/tls2.sh        | 1 +
 testsuite/tls2lib1.c     | 1 +
 testsuite/tls3.sh        | 1 +
 testsuite/tls3lib2.c     | 1 +
 testsuite/tls4.c         | 1 +
 testsuite/tls4.sh        | 1 +
 testsuite/tls4lib1.c     | 1 +
 testsuite/tls4lib2.c     | 1 +
 testsuite/tls5.sh        | 1 +
 testsuite/tls5lib1.c     | 1 +
 testsuite/tls6.sh        | 1 +
 testsuite/tls6lib1.c     | 1 +
 testsuite/tls7.c         | 1 +
 testsuite/tls7.sh        | 1 +
 testsuite/undo1.sh       | 1 +
 testsuite/undosyslibs.sh | 1 +
 testsuite/unprel1.c      | 1 +
 testsuite/unprel1.sh     | 1 +
 testsuite/unprel1lib1.c  | 1 +
 testsuite/unprel1lib2.c  | 1 +
 199 files changed, 258 insertions(+)

diff --git a/gelf/gelf.c b/gelf/gelf.c
index 915cf5b..9261318 100644
--- a/gelf/gelf.c
+++ b/gelf/gelf.c
@@ -2,6 +2,8 @@
    Copyright (C) 2001, 2002, 2004 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/gelf/gelf.h b/gelf/gelf.h
index 6b76a15..b552e23 100644
--- a/gelf/gelf.h
+++ b/gelf/gelf.h
@@ -2,6 +2,8 @@
    Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/gelfx/gelfx.h b/gelfx/gelfx.h
index c011a57..fc914a9 100644
--- a/gelfx/gelfx.h
+++ b/gelfx/gelfx.h
@@ -2,6 +2,8 @@
    Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/gelfx32/gelfx.h b/gelfx32/gelfx.h
index 7668a84..ece2e1b 100644
--- a/gelfx32/gelfx.h
+++ b/gelfx32/gelfx.h
@@ -2,6 +2,8 @@
    Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/m4/libelf.m4 b/m4/libelf.m4
index 295bf0c..f9e39b2 100644
--- a/m4/libelf.m4
+++ b/m4/libelf.m4
@@ -4,6 +4,7 @@ dnl Some libelf versions have bugs in Elf64_Sxword conversions.
 dnl Detect it.
 
 dnl Written by Jakub Jelinek <jakub@redhat.com>.
+dnl SPDX-License-Identifier: GPL-2.0-only
 
 AC_DEFUN([AC_LIBELF_SXWORD],
   [AC_TRY_RUN([
diff --git a/src/arch-alpha.c b/src/arch-alpha.c
index 7802a3e..8835ce0 100644
--- a/src/arch-alpha.c
+++ b/src/arch-alpha.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-arm.c b/src/arch-arm.c
index eec7c57..0d7726e 100644
--- a/src/arch-arm.c
+++ b/src/arch-arm.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2004, 2009, 2011, 2013 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-cris.c b/src/arch-cris.c
index 3272779..461ca47 100644
--- a/src/arch-cris.c
+++ b/src/arch-cris.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-i386.c b/src/arch-i386.c
index a1e0fcc..5afb27f 100644
--- a/src/arch-i386.c
+++ b/src/arch-i386.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009, 2011 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-ia64.c b/src/arch-ia64.c
index 6039115..a7a235f 100644
--- a/src/arch-ia64.c
+++ b/src/arch-ia64.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-mips.c b/src/arch-mips.c
index 02c608f..faad1ee 100644
--- a/src/arch-mips.c
+++ b/src/arch-mips.c
@@ -2,6 +2,8 @@
    Written by Richard Sandiford <richard@codesourcery.com>, 2006
    Updated by Maciej W. Rozycki <macro@codesourcery.com>, 2008.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-ppc.c b/src/arch-ppc.c
index e22e5d5..d6c0d3a 100644
--- a/src/arch-ppc.c
+++ b/src/arch-ppc.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2011 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-ppc64.c b/src/arch-ppc64.c
index a764b99..26f2032 100644
--- a/src/arch-ppc64.c
+++ b/src/arch-ppc64.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2002, 2003, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2002.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-s390.c b/src/arch-s390.c
index e5fe130..20d1566 100644
--- a/src/arch-s390.c
+++ b/src/arch-s390.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009, 2010, 2013 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-s390x.c b/src/arch-s390x.c
index e4d82f7..d4c3799 100644
--- a/src/arch-s390x.c
+++ b/src/arch-s390x.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009, 2013 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-sh.c b/src/arch-sh.c
index 1b11312..f744251 100644
--- a/src/arch-sh.c
+++ b/src/arch-sh.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-sparc.c b/src/arch-sparc.c
index e016a79..6b164e1 100644
--- a/src/arch-sparc.c
+++ b/src/arch-sparc.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-sparc64.c b/src/arch-sparc64.c
index aee4601..390895c 100644
--- a/src/arch-sparc64.c
+++ b/src/arch-sparc64.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/arch-x86_64.c b/src/arch-x86_64.c
index 2f6c551..5b43219 100644
--- a/src/arch-x86_64.c
+++ b/src/arch-x86_64.c
@@ -3,6 +3,8 @@
    Copyright (C) 2011 Wind River Systems, Inc.
    x32 support by Mark Hatle <mark.hatle@windriver.com>
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/cache.c b/src/cache.c
index 1cc3217..8176876 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2013 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/canonicalize.c b/src/canonicalize.c
index 79df44e..ec9043b 100644
--- a/src/canonicalize.c
+++ b/src/canonicalize.c
@@ -2,6 +2,8 @@
    Copyright (C) 1996-2002, 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
diff --git a/src/checksum.c b/src/checksum.c
index 20a23a0..0df5363 100644
--- a/src/checksum.c
+++ b/src/checksum.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/conflict.c b/src/conflict.c
index 5613ace..36f8606 100644
--- a/src/conflict.c
+++ b/src/conflict.c
@@ -3,6 +3,8 @@
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
    Updated by Maciej W. Rozycki <macro@codesourcery.com>, 2008.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/crc32.c b/src/crc32.c
index f36abb5..631f7bb 100644
--- a/src/crc32.c
+++ b/src/crc32.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/cxx.c b/src/cxx.c
index 4391ebe..34f0ed8 100644
--- a/src/cxx.c
+++ b/src/cxx.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2007, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/data.c b/src/data.c
index 751f96f..4d8639d 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/doit.c b/src/doit.c
index 3784866..618672d 100644
--- a/src/doit.c
+++ b/src/doit.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2003, 2004, 2005, 2007 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/dso.c b/src/dso.c
index 949abf9..3853d43 100644
--- a/src/dso.c
+++ b/src/dso.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2010 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/dwarf2.c b/src/dwarf2.c
index b9588b1..4c2f939 100644
--- a/src/dwarf2.c
+++ b/src/dwarf2.c
@@ -2,6 +2,8 @@
    Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/dwarf2.h b/src/dwarf2.h
index b0c80b6..be732e2 100644
--- a/src/dwarf2.h
+++ b/src/dwarf2.h
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2009, 2010, 2011, 2012 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/exec.c b/src/exec.c
index ca7fd14..2641877 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/execle_open.c b/src/execle_open.c
index 2ee5cbc..d795461 100644
--- a/src/execle_open.c
+++ b/src/execle_open.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/execstack.c b/src/execstack.c
index 97fb453..24f6fbb 100644
--- a/src/execstack.c
+++ b/src/execstack.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2003, 2005, 2010 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2003.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/fptr.c b/src/fptr.c
index cfe3aed..1c7916c 100644
--- a/src/fptr.c
+++ b/src/fptr.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/fptr.h b/src/fptr.h
index 36ef7c6..6daae03 100644
--- a/src/fptr.h
+++ b/src/fptr.h
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/gather.c b/src/gather.c
index 277f1b5..2af3d4d 100644
--- a/src/gather.c
+++ b/src/gather.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/get.c b/src/get.c
index 0659962..e956313 100644
--- a/src/get.c
+++ b/src/get.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/hashtab.c b/src/hashtab.c
index fa27446..b361785 100644
--- a/src/hashtab.c
+++ b/src/hashtab.c
@@ -2,6 +2,8 @@
    Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
    Contributed by Vladimir Makarov (vmakarov@cygnus.com).
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
 This file is part of the libiberty library.
 Libiberty is free software; you can redistribute it and/or
 modify it under the terms of the GNU Library General Public
diff --git a/src/hashtab.h b/src/hashtab.h
index 31e63e0..b100bb1 100644
--- a/src/hashtab.h
+++ b/src/hashtab.h
@@ -2,6 +2,8 @@
    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
    Contributed by Vladimir Makarov (vmakarov@cygnus.com).
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
diff --git a/src/layout.c b/src/layout.c
index 859ab66..626e858 100644
--- a/src/layout.c
+++ b/src/layout.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2011 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/layout.h b/src/layout.h
index f481d22..78494bc 100644
--- a/src/layout.h
+++ b/src/layout.h
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2004, 2006 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/main.c b/src/main.c
index 6ba89d5..f9be6cf 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2010, 2011 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/makecrc.c b/src/makecrc.c
index db52013..8de40d5 100644
--- a/src/makecrc.c
+++ b/src/makecrc.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /* Not copyrighted 1990 Mark Adler */
 
 #ifndef lint
diff --git a/src/md5.c b/src/md5.c
index 0d2fdef..8bf4a5d 100644
--- a/src/md5.c
+++ b/src/md5.c
@@ -4,6 +4,8 @@
    NOTE: The canonical source of this file is maintained with the GNU C
    Library.  Bugs can be reported to bug-glibc@prep.ai.mit.edu.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
    Free Software Foundation; either version 2, or (at your option) any
diff --git a/src/md5.h b/src/md5.h
index 55f6195..e74c214 100644
--- a/src/md5.h
+++ b/src/md5.h
@@ -4,6 +4,8 @@
    NOTE: The canonical source of this file is maintained with the GNU C
    Library.  Bugs can be reported to bug-glibc@prep.ai.mit.edu.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU General Public License as published by the
    Free Software Foundation; either version 2, or (at your option) any
diff --git a/src/mdebug.c b/src/mdebug.c
index 4c22d2f..54a2739 100644
--- a/src/mdebug.c
+++ b/src/mdebug.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/prelink.c b/src/prelink.c
index 64c4fea..4c512dc 100644
--- a/src/prelink.c
+++ b/src/prelink.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/prelink.h b/src/prelink.h
index 39c4390..e2cde42 100644
--- a/src/prelink.h
+++ b/src/prelink.h
@@ -4,6 +4,8 @@
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
    Updated by Maciej W. Rozycki <macro@codesourcery.com>, 2008.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/prelinktab.h b/src/prelinktab.h
index f41c79c..d116e5d 100644
--- a/src/prelinktab.h
+++ b/src/prelinktab.h
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/reloc-info.c b/src/reloc-info.c
index 4ce333c..4c679b8 100644
--- a/src/reloc-info.c
+++ b/src/reloc-info.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2008 CodeSourcery
    Written by Maciej W. Rozycki <macro@codesourcery.com>, 2008.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/reloc-info.h b/src/reloc-info.h
index a8f8b7c..f9f02db 100644
--- a/src/reloc-info.h
+++ b/src/reloc-info.h
@@ -1,6 +1,8 @@
 /* Copyright (C) 2008 CodeSourcery
    Written by Maciej W. Rozycki <macro@codesourcery.com>, 2008.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/reloc.c b/src/reloc.c
index deb0abe..0132425 100644
--- a/src/reloc.c
+++ b/src/reloc.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2005 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/reloc.h b/src/reloc.h
index a2ceff9..001ebd1 100644
--- a/src/reloc.h
+++ b/src/reloc.h
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/sha.c b/src/sha.c
index cfbc956..0b8f9f8 100644
--- a/src/sha.c
+++ b/src/sha.c
@@ -3,6 +3,8 @@
 
    Copyright (C) 2000, 2001, 2003 Scott G. Miller
 
+   SPDX-License-Identifier: GPL-2.0-only
+
    Credits:
       Robert Klep <robert@ilse.nl>  -- Expansion function fix
    NOTE: The canonical source of this file is maintained in GNU coreutils.
diff --git a/src/sha.h b/src/sha.h
index 13583e3..b409752 100644
--- a/src/sha.h
+++ b/src/sha.h
@@ -2,6 +2,8 @@
    library functions.
 
    Copyright (C) 1999, Scott G. Miller
+
+   SPDX-License-Identifier: GPL-2.0-only
 */
 
 #ifndef _SHA_H
diff --git a/src/space.c b/src/space.c
index 4bd4760..3da0561 100644
--- a/src/space.c
+++ b/src/space.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/space.h b/src/space.h
index 5c9f725..4ef429e 100644
--- a/src/space.h
+++ b/src/space.h
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2004 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/stabs.c b/src/stabs.c
index c0a5a6a..4346950 100644
--- a/src/stabs.c
+++ b/src/stabs.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2005, 2006 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/undo.c b/src/undo.c
index 4c38dab..cf33f26 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2005, 2010 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2001.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/undoall.c b/src/undoall.c
index 55d2a0b..44907bd 100644
--- a/src/undoall.c
+++ b/src/undoall.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2002, 2005 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2002.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/src/verify.c b/src/verify.c
index 7f530c0..be028fc 100644
--- a/src/verify.c
+++ b/src/verify.c
@@ -1,6 +1,8 @@
 /* Copyright (C) 2002, 2003, 2006, 2007, 2010 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@redhat.com>, 2002.
 
+   SPDX-License-Identifier: GPL-2.0-or-later
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2, or (at your option)
diff --git a/testsuite/cxx1.C b/testsuite/cxx1.C
index 9c11a6d..9e9c7a9 100644
--- a/testsuite/cxx1.C
+++ b/testsuite/cxx1.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "cxx1.h"
 extern "C" void abort (void);
 
diff --git a/testsuite/cxx1.h b/testsuite/cxx1.h
index d6efe9b..8103388 100644
--- a/testsuite/cxx1.h
+++ b/testsuite/cxx1.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 struct A
   {
     virtual int a ();
diff --git a/testsuite/cxx1.sh b/testsuite/cxx1.sh
index 477a545..b4dc548 100755
--- a/testsuite/cxx1.sh
+++ b/testsuite/cxx1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f cxx1 cxx1lib*.so cxx1.log
 rm -f prelink.cache
diff --git a/testsuite/cxx1lib1.C b/testsuite/cxx1lib1.C
index 1eb192a..48cd2d9 100644
--- a/testsuite/cxx1lib1.C
+++ b/testsuite/cxx1lib1.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "cxx1.h"
 
 int A::a ()
diff --git a/testsuite/cxx1lib2.C b/testsuite/cxx1lib2.C
index 77055da..a600f55 100644
--- a/testsuite/cxx1lib2.C
+++ b/testsuite/cxx1lib2.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "cxx1.h"
 
 int A::a ()
diff --git a/testsuite/cxx2.C b/testsuite/cxx2.C
index 8b6e0bf..d2e5397 100644
--- a/testsuite/cxx2.C
+++ b/testsuite/cxx2.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "cxx1.h"
 extern "C" void abort (void);
 
diff --git a/testsuite/cxx2.sh b/testsuite/cxx2.sh
index 064fcb6..66d0d42 100755
--- a/testsuite/cxx2.sh
+++ b/testsuite/cxx2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f cxx2 cxx2lib*.so cxx2.log
 rm -f prelink.cache
diff --git a/testsuite/cxx3.C b/testsuite/cxx3.C
index 0a4ad7b..7a4a6fc 100644
--- a/testsuite/cxx3.C
+++ b/testsuite/cxx3.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "cxx3.h"
 extern "C" void abort (void);
 
diff --git a/testsuite/cxx3.h b/testsuite/cxx3.h
index ad2de7e..37e693b 100644
--- a/testsuite/cxx3.h
+++ b/testsuite/cxx3.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 struct A
   {
     virtual int a () { return 1; }
diff --git a/testsuite/cxx3.sh b/testsuite/cxx3.sh
index 418369a..e4a769b 100755
--- a/testsuite/cxx3.sh
+++ b/testsuite/cxx3.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f cxx3 cxx3lib*.so cxx3.log
 rm -f prelink.cache
diff --git a/testsuite/cxx3lib1.C b/testsuite/cxx3lib1.C
index f870bf0..0d21ee3 100644
--- a/testsuite/cxx3lib1.C
+++ b/testsuite/cxx3lib1.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "cxx3.h"
 
 A a1;
diff --git a/testsuite/cxx3lib2.C b/testsuite/cxx3lib2.C
index 75f2b12..8b4766c 100644
--- a/testsuite/cxx3lib2.C
+++ b/testsuite/cxx3lib2.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "cxx3.h"
 
 A a2;
diff --git a/testsuite/cycle1.sh b/testsuite/cycle1.sh
index 3dc7f93..d44819f 100755
--- a/testsuite/cycle1.sh
+++ b/testsuite/cycle1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f cycle1 cycle1lib*.so cycle1.log
 rm -f prelink.cache
diff --git a/testsuite/cycle2.sh b/testsuite/cycle2.sh
index 0b99a5d..6b55056 100755
--- a/testsuite/cycle2.sh
+++ b/testsuite/cycle2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f cycle2 cycle2lib*.so cycle2.log
 rm -f prelink.cache
diff --git a/testsuite/deps1.c b/testsuite/deps1.c
index 331546c..3018e4b 100644
--- a/testsuite/deps1.c
+++ b/testsuite/deps1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/deps1.h b/testsuite/deps1.h
index d5868f7..b297708 100644
--- a/testsuite/deps1.h
+++ b/testsuite/deps1.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 
 extern int f8 (void);
diff --git a/testsuite/deps1.sh b/testsuite/deps1.sh
index b61a41d..ee48407 100755
--- a/testsuite/deps1.sh
+++ b/testsuite/deps1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 
 PRELINK=`echo $PRELINK \
diff --git a/testsuite/deps1lib1.c b/testsuite/deps1lib1.c
index d4ab28b..4efc3ac 100644
--- a/testsuite/deps1lib1.c
+++ b/testsuite/deps1lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "deps1.h"
 
 int bar = 26;
diff --git a/testsuite/deps1lib2.c b/testsuite/deps1lib2.c
index f73b456..719ad7d 100644
--- a/testsuite/deps1lib2.c
+++ b/testsuite/deps1lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 
 int f1 (void)
diff --git a/testsuite/deps2.sh b/testsuite/deps2.sh
index 0bcc21c..72551e5 100755
--- a/testsuite/deps2.sh
+++ b/testsuite/deps2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 
 PRELINK=`echo $PRELINK \
diff --git a/testsuite/deps2lib1.c b/testsuite/deps2lib1.c
index 9d4b2de..aa05d44 100644
--- a/testsuite/deps2lib1.c
+++ b/testsuite/deps2lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "deps1.h"
 
 int bar = 26;
diff --git a/testsuite/functions.sh b/testsuite/functions.sh
index 5e98725..a126029 100755
--- a/testsuite/functions.sh
+++ b/testsuite/functions.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 CC="${CC:-gcc} ${LINKOPTS}"
 CCLINK=${CCLINK:-${CC} -Wl,--dynamic-linker=`echo ./ld*.so.*[0-9]`}
 CXX="${CXX:-g++} ${LINKOPTS}"
diff --git a/testsuite/ifunc.h b/testsuite/ifunc.h
index 78ad86b..5762839 100644
--- a/testsuite/ifunc.h
+++ b/testsuite/ifunc.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #ifndef PICKNO
 # define PICKNO 1
 #endif
diff --git a/testsuite/ifunc1.c b/testsuite/ifunc1.c
index f5500df..6d5f7e0 100644
--- a/testsuite/ifunc1.c
+++ b/testsuite/ifunc1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "ifunc.h"
 
 static int bint11 (void) { return 1; }
diff --git a/testsuite/ifunc1.sh b/testsuite/ifunc1.sh
index 135014d..11f0243 100755
--- a/testsuite/ifunc1.sh
+++ b/testsuite/ifunc1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 $CCLINK -o ifunctest $srcdir/ifunctest.c -Wl,--rpath-link,. > /dev/null 2>&1 || exit 77
diff --git a/testsuite/ifunc1lib1.c b/testsuite/ifunc1lib1.c
index 27a3f03..79bcbe4 100644
--- a/testsuite/ifunc1lib1.c
+++ b/testsuite/ifunc1lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "ifunc.h"
 
 static int lib1t11 (void) { return 11; }
diff --git a/testsuite/ifunc1lib2.c b/testsuite/ifunc1lib2.c
index ca12e3d..f66c754 100644
--- a/testsuite/ifunc1lib2.c
+++ b/testsuite/ifunc1lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "ifunc.h"
 
 static int lib2t11 (void) { return 1; }
diff --git a/testsuite/ifunc2.sh b/testsuite/ifunc2.sh
index 3966e86..2717595 100755
--- a/testsuite/ifunc2.sh
+++ b/testsuite/ifunc2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 $CCLINK -o ifunctest $srcdir/ifunctest.c -Wl,--rpath-link,. > /dev/null 2>&1 || exit 77
diff --git a/testsuite/ifunc3.c b/testsuite/ifunc3.c
index 1f243d8..dab90c5 100644
--- a/testsuite/ifunc3.c
+++ b/testsuite/ifunc3.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "ifunc.h"
 
 static int bint11 (void) { return 1; }
diff --git a/testsuite/ifunc3.sh b/testsuite/ifunc3.sh
index 30fc893..c6e8dc6 100755
--- a/testsuite/ifunc3.sh
+++ b/testsuite/ifunc3.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 $CCLINK -o ifunctest $srcdir/ifunctest.c -Wl,--rpath-link,. > /dev/null 2>&1 || exit 77
diff --git a/testsuite/ifunc3lib1.c b/testsuite/ifunc3lib1.c
index 133b389..88a7019 100644
--- a/testsuite/ifunc3lib1.c
+++ b/testsuite/ifunc3lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "ifunc.h"
 
 static int lib1t11 (void) { return 11; }
diff --git a/testsuite/ifunctest.c b/testsuite/ifunctest.c
index 9ce7b1a..6b12e46 100644
--- a/testsuite/ifunctest.c
+++ b/testsuite/ifunctest.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "ifunc.h"
 
 static int foo1 (void) { return 1; }
diff --git a/testsuite/layout.C b/testsuite/layout.C
index 5047a34..eccbeee 100644
--- a/testsuite/layout.C
+++ b/testsuite/layout.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int main()
 {
 }
diff --git a/testsuite/layout1.sh b/testsuite/layout1.sh
index ee751ab..63c1891 100755
--- a/testsuite/layout1.sh
+++ b/testsuite/layout1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f prelink.cache
 rm -f layout1 layoutlib*.so layout1.log
diff --git a/testsuite/layout2.sh b/testsuite/layout2.sh
index 7d8504b..5378b0e 100755
--- a/testsuite/layout2.sh
+++ b/testsuite/layout2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f layout2 layout2lib*.so layout2.log
 i=1
diff --git a/testsuite/layoutlib.C b/testsuite/layoutlib.C
index 8162515..d699152 100644
--- a/testsuite/layoutlib.C
+++ b/testsuite/layoutlib.C
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 struct A
   {
     virtual int a();
diff --git a/testsuite/movelibs.sh b/testsuite/movelibs.sh
index 4357ee8..0655df5 100755
--- a/testsuite/movelibs.sh
+++ b/testsuite/movelibs.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # This script copies needed C and C++ libraries into the test directory
 echo 'int main() { }' > movelibs.C
diff --git a/testsuite/order.c b/testsuite/order.c
index 5e0ef43..08fdf43 100644
--- a/testsuite/order.c
+++ b/testsuite/order.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdio.h>
 #include "orderlib1.h"
 #include "orderlib.h"
diff --git a/testsuite/order.sh b/testsuite/order.sh
index ce0dbda..4725736 100755
--- a/testsuite/order.sh
+++ b/testsuite/order.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f order orderlib*.so order.log
 rm -f prelink.cache
diff --git a/testsuite/orderlib.c b/testsuite/orderlib.c
index 0a97e0a..2171de2 100644
--- a/testsuite/orderlib.c
+++ b/testsuite/orderlib.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "orderlib.h"
 #include "orderlib1.h"
 
diff --git a/testsuite/orderlib.h b/testsuite/orderlib.h
index a4f1eb0..cf693d5 100644
--- a/testsuite/orderlib.h
+++ b/testsuite/orderlib.h
@@ -1,2 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int value(void);
 int value1(void);
diff --git a/testsuite/orderlib1.c b/testsuite/orderlib1.c
index be4ebdc..4a8460e 100644
--- a/testsuite/orderlib1.c
+++ b/testsuite/orderlib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "orderlib.h"
 
 int value1(void)
diff --git a/testsuite/orderlib1.h b/testsuite/orderlib1.h
index 5763a36..12750ca 100644
--- a/testsuite/orderlib1.h
+++ b/testsuite/orderlib1.h
@@ -1 +1,2 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int orderlib1(void);
diff --git a/testsuite/orderlib2.c b/testsuite/orderlib2.c
index d1908ea..ec17e93 100644
--- a/testsuite/orderlib2.c
+++ b/testsuite/orderlib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "orderlib.h"
 
 int value(void)
diff --git a/testsuite/orderlib3.c b/testsuite/orderlib3.c
index f0ff8cd..285f29b 100644
--- a/testsuite/orderlib3.c
+++ b/testsuite/orderlib3.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "orderlib.h"
 
 int value(void)
diff --git a/testsuite/preload1.c b/testsuite/preload1.c
index d6ee489..8805956 100644
--- a/testsuite/preload1.c
+++ b/testsuite/preload1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdlib.h>
 #include "preload1.h"
 
diff --git a/testsuite/preload1.h b/testsuite/preload1.h
index 139bee0..f85bd3b 100644
--- a/testsuite/preload1.h
+++ b/testsuite/preload1.h
@@ -1,2 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int foo(int x, int y);
 
diff --git a/testsuite/preload1.sh b/testsuite/preload1.sh
index 8e1f4d0..2ac3105 100755
--- a/testsuite/preload1.sh
+++ b/testsuite/preload1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 check_one() {
   cnt=0
diff --git a/testsuite/preload1lib1.c b/testsuite/preload1lib1.c
index 0c1fa43..9be97fd 100644
--- a/testsuite/preload1lib1.c
+++ b/testsuite/preload1lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "preload1.h"
 
 int foo(int x, int y) {
diff --git a/testsuite/preload1lib2.c b/testsuite/preload1lib2.c
index 7ab50aa..19de490 100644
--- a/testsuite/preload1lib2.c
+++ b/testsuite/preload1lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "preload1.h"
 
 int foo(int x, int y) {
diff --git a/testsuite/quick1.c b/testsuite/quick1.c
index dc98441..5d6c9ef 100644
--- a/testsuite/quick1.c
+++ b/testsuite/quick1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/quick1.sh b/testsuite/quick1.sh
index 691b940..01d5172 100755
--- a/testsuite/quick1.sh
+++ b/testsuite/quick1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 check_one() {
   cnt=0
diff --git a/testsuite/quick1lib1.c b/testsuite/quick1lib1.c
index 41767ce..0c6deb7 100644
--- a/testsuite/quick1lib1.c
+++ b/testsuite/quick1lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int q1 (void)
 {
   return q2 () + 1;
diff --git a/testsuite/quick1lib2.c b/testsuite/quick1lib2.c
index b545086..bd718f8 100644
--- a/testsuite/quick1lib2.c
+++ b/testsuite/quick1lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 extern int q1 (void);
 
 int f1 (void)
diff --git a/testsuite/quick1lib3.c b/testsuite/quick1lib3.c
index 06760a3..40de8d6 100644
--- a/testsuite/quick1lib3.c
+++ b/testsuite/quick1lib3.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #ifndef D1
 #define D1(n) int qvar##n; int *qpvar##n = &qvar##n;
 #endif
diff --git a/testsuite/quick1lib4.c b/testsuite/quick1lib4.c
index 53e23d7..7a0e168 100644
--- a/testsuite/quick1lib4.c
+++ b/testsuite/quick1lib4.c
@@ -1,2 +1,3 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #define D1(n) int qvar##n;
 #include "quick1lib3.c"
diff --git a/testsuite/quick2.sh b/testsuite/quick2.sh
index 031a410..a8248df 100755
--- a/testsuite/quick2.sh
+++ b/testsuite/quick2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 check_one() {
   cnt=0
diff --git a/testsuite/quick3.sh b/testsuite/quick3.sh
index 1cdb523..f86d582 100755
--- a/testsuite/quick3.sh
+++ b/testsuite/quick3.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 check_one() {
   cnt=0
diff --git a/testsuite/reloc1.c b/testsuite/reloc1.c
index e679bed..e799f1f 100644
--- a/testsuite/reloc1.c
+++ b/testsuite/reloc1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/reloc1.h b/testsuite/reloc1.h
index 093dd3a..1287080 100644
--- a/testsuite/reloc1.h
+++ b/testsuite/reloc1.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 struct A
   {
     char a;
diff --git a/testsuite/reloc1.sh b/testsuite/reloc1.sh
index 5616d4e..a89163c 100755
--- a/testsuite/reloc1.sh
+++ b/testsuite/reloc1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f reloc1 reloc1lib*.so reloc1.log
 rm -f prelink.cache
diff --git a/testsuite/reloc10.c b/testsuite/reloc10.c
index 5720d33..5418a35 100644
--- a/testsuite/reloc10.c
+++ b/testsuite/reloc10.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdlib.h>
 
 extern int bar, baz, *barp, *bazp, dummy;
diff --git a/testsuite/reloc10.sh b/testsuite/reloc10.sh
index 03034c1..f9deb4a 100755
--- a/testsuite/reloc10.sh
+++ b/testsuite/reloc10.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f reloc10 reloc10lib*.so reloc10.log
 rm -f prelink.cache
diff --git a/testsuite/reloc10lib1.c b/testsuite/reloc10lib1.c
index 2ee06d2..f229bcf 100644
--- a/testsuite/reloc10lib1.c
+++ b/testsuite/reloc10lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int bar = 26;
 int baz = 28;
 
diff --git a/testsuite/reloc10lib2.c b/testsuite/reloc10lib2.c
index fc327fc..1e34aab 100644
--- a/testsuite/reloc10lib2.c
+++ b/testsuite/reloc10lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 extern int bar, baz, f1 (void), f2 (void);
 
 int f3 (void)
diff --git a/testsuite/reloc10lib3.c b/testsuite/reloc10lib3.c
index 2ec80ab..4db3b03 100644
--- a/testsuite/reloc10lib3.c
+++ b/testsuite/reloc10lib3.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 extern int bar, baz, f1 (void), f2 (void);
 
 int *barp = &bar, *bazp = &baz;
diff --git a/testsuite/reloc10lib4.c b/testsuite/reloc10lib4.c
index 4376249..dc7c0c6 100644
--- a/testsuite/reloc10lib4.c
+++ b/testsuite/reloc10lib4.c
@@ -1 +1,2 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int dummy = 24;
diff --git a/testsuite/reloc10lib5.c b/testsuite/reloc10lib5.c
index 19fd925..0986a4a 100644
--- a/testsuite/reloc10lib5.c
+++ b/testsuite/reloc10lib5.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int bar = 36;
 int baz = 38;
 
diff --git a/testsuite/reloc11.c b/testsuite/reloc11.c
index 923aff4..28ff119 100644
--- a/testsuite/reloc11.c
+++ b/testsuite/reloc11.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdlib.h>
 
 extern int dummy;
diff --git a/testsuite/reloc11.sh b/testsuite/reloc11.sh
index fa0eab9..dbfe6f8 100755
--- a/testsuite/reloc11.sh
+++ b/testsuite/reloc11.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f reloc11 reloc11lib*.so reloc11.log
 rm -f prelink.cache
diff --git a/testsuite/reloc11lib2.c b/testsuite/reloc11lib2.c
index 6a2191c..7f2e24f 100644
--- a/testsuite/reloc11lib2.c
+++ b/testsuite/reloc11lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int var = 24, var2 = 16;
 
 int varp1 (void)
diff --git a/testsuite/reloc11lib3.c b/testsuite/reloc11lib3.c
index 0cea7f3..0693304 100644
--- a/testsuite/reloc11lib3.c
+++ b/testsuite/reloc11lib3.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int var = 32;
 extern int var2;
 
diff --git a/testsuite/reloc12.c b/testsuite/reloc12.c
index cfa8888..71dce49 100644
--- a/testsuite/reloc12.c
+++ b/testsuite/reloc12.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc12.h"
 #include <stdlib.h>
 
diff --git a/testsuite/reloc12.h b/testsuite/reloc12.h
index 8e09405..b7fe27b 100644
--- a/testsuite/reloc12.h
+++ b/testsuite/reloc12.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 typedef struct
   {
     char a;
diff --git a/testsuite/reloc12.sh b/testsuite/reloc12.sh
index 74d1fa8..e65dcd2 100755
--- a/testsuite/reloc12.sh
+++ b/testsuite/reloc12.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f reloc12 reloc12lib*.so reloc12.log
 rm -f prelink.cache
diff --git a/testsuite/reloc12lib1.c b/testsuite/reloc12lib1.c
index db7e64f..4ee9d39 100644
--- a/testsuite/reloc12lib1.c
+++ b/testsuite/reloc12lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc12.h"
 
 char a(const A *d)
diff --git a/testsuite/reloc12lib2.c b/testsuite/reloc12lib2.c
index ffa60a0..cbe06cb 100644
--- a/testsuite/reloc12lib2.c
+++ b/testsuite/reloc12lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc12.h"
 
 A foo[] = {
diff --git a/testsuite/reloc1lib1.c b/testsuite/reloc1lib1.c
index 8aa0628..ac5e92b 100644
--- a/testsuite/reloc1lib1.c
+++ b/testsuite/reloc1lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 
 int bar = 26;
diff --git a/testsuite/reloc1lib2.c b/testsuite/reloc1lib2.c
index a338c1d..619c878 100644
--- a/testsuite/reloc1lib2.c
+++ b/testsuite/reloc1lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 
 int f1 (void)
diff --git a/testsuite/reloc2.c b/testsuite/reloc2.c
index 6c7fed5..97d0485 100644
--- a/testsuite/reloc2.c
+++ b/testsuite/reloc2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdlib.h>
 
 extern int f2 (int add);
diff --git a/testsuite/reloc2.sh b/testsuite/reloc2.sh
index 42bb63f..f495f64 100755
--- a/testsuite/reloc2.sh
+++ b/testsuite/reloc2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 SHFLAGS=
 case "`uname -m`" in
diff --git a/testsuite/reloc2lib1.c b/testsuite/reloc2lib1.c
index 3551704..6e234a4 100644
--- a/testsuite/reloc2lib1.c
+++ b/testsuite/reloc2lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int f1 (int dummy)
 {
   return 1;
diff --git a/testsuite/reloc2lib2.c b/testsuite/reloc2lib2.c
index 094daad..d3f8510 100644
--- a/testsuite/reloc2lib2.c
+++ b/testsuite/reloc2lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 extern int f1 (int dummy);
 
 int f2 (int add)
diff --git a/testsuite/reloc3.c b/testsuite/reloc3.c
index 2f455d7..8555d80 100644
--- a/testsuite/reloc3.c
+++ b/testsuite/reloc3.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/testsuite/reloc3.sh b/testsuite/reloc3.sh
index 5941798..d3c25d3 100755
--- a/testsuite/reloc3.sh
+++ b/testsuite/reloc3.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f reloc3 reloc3lib*.so reloc3.log
 rm -f prelink.cache
diff --git a/testsuite/reloc3lib1.c b/testsuite/reloc3lib1.c
index fd649c6..df4330a 100644
--- a/testsuite/reloc3lib1.c
+++ b/testsuite/reloc3lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 
 int baz[3] = { 28, 29, 30 };
diff --git a/testsuite/reloc4.c b/testsuite/reloc4.c
index cb3b17a..e9560d0 100644
--- a/testsuite/reloc4.c
+++ b/testsuite/reloc4.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdio.h>
 
 int main (void)
diff --git a/testsuite/reloc4.sh b/testsuite/reloc4.sh
index 992c33a..fbea2b8 100755
--- a/testsuite/reloc4.sh
+++ b/testsuite/reloc4.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # This test takes a lot of time, so skip it normally
 [ -z "$CHECK_ME_HARDER" ] && exit 77
diff --git a/testsuite/reloc4lib1.c b/testsuite/reloc4lib1.c
index f1297d8..8583bad 100644
--- a/testsuite/reloc4lib1.c
+++ b/testsuite/reloc4lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdio.h>
 
 int main (void)
diff --git a/testsuite/reloc4lib2.c b/testsuite/reloc4lib2.c
index 07aa721..8014a12 100644
--- a/testsuite/reloc4lib2.c
+++ b/testsuite/reloc4lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdio.h>
 
 int main (void)
diff --git a/testsuite/reloc4lib3.c b/testsuite/reloc4lib3.c
index 1f30817..615eb99 100644
--- a/testsuite/reloc4lib3.c
+++ b/testsuite/reloc4lib3.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdio.h>
 
 int main (void)
diff --git a/testsuite/reloc5.c b/testsuite/reloc5.c
index 123ad5d..a9c6b97 100644
--- a/testsuite/reloc5.c
+++ b/testsuite/reloc5.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include <stdio.h>
 
 int main (void)
diff --git a/testsuite/reloc5.sh b/testsuite/reloc5.sh
index b17cbff..9fe5efb 100755
--- a/testsuite/reloc5.sh
+++ b/testsuite/reloc5.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # This test takes a lot of time, so skip it normally
 [ -z "$CHECK_ME_HARDER" ] && exit 77
diff --git a/testsuite/reloc6.sh b/testsuite/reloc6.sh
index f2a5b17..5015c1e 100755
--- a/testsuite/reloc6.sh
+++ b/testsuite/reloc6.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f reloc6 reloc6lib*.so reloc6.log
 rm -f prelink.cache
diff --git a/testsuite/reloc7.c b/testsuite/reloc7.c
index c1f6dc8..c4c8a53 100644
--- a/testsuite/reloc7.c
+++ b/testsuite/reloc7.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 #include <stdio.h>
diff --git a/testsuite/reloc7.sh b/testsuite/reloc7.sh
index c7dab99..3b0d42b 100755
--- a/testsuite/reloc7.sh
+++ b/testsuite/reloc7.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f reloc7 reloc7lib*.so reloc7.log
 rm -f prelink.cache
diff --git a/testsuite/reloc8.sh b/testsuite/reloc8.sh
index 05195cf..179f411 100755
--- a/testsuite/reloc8.sh
+++ b/testsuite/reloc8.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # Disable this test under SELinux
 if test -x /usr/sbin/getenforce; then
diff --git a/testsuite/reloc9.sh b/testsuite/reloc9.sh
index e5ec292..a187fcb 100755
--- a/testsuite/reloc9.sh
+++ b/testsuite/reloc9.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # Disable this test under SELinux
 if test -x /usr/sbin/getenforce; then
diff --git a/testsuite/shuffle1.sh b/testsuite/shuffle1.sh
index 61e596f..4971854 100755
--- a/testsuite/shuffle1.sh
+++ b/testsuite/shuffle1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f shuffle1 shuffle1lib*.so shuffle1.log shuffle1.lds
 rm -f prelink.cache
diff --git a/testsuite/shuffle2.c b/testsuite/shuffle2.c
index 8c06942..8ecf168 100644
--- a/testsuite/shuffle2.c
+++ b/testsuite/shuffle2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/shuffle2.sh b/testsuite/shuffle2.sh
index 953cea3..3d7f7ae 100755
--- a/testsuite/shuffle2.sh
+++ b/testsuite/shuffle2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # Kernels before 2.4.10 are known not to work
 case "`uname -r`" in
diff --git a/testsuite/shuffle3.sh b/testsuite/shuffle3.sh
index 534d174..413f3d9 100755
--- a/testsuite/shuffle3.sh
+++ b/testsuite/shuffle3.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # Kernels before 2.4.10 are known not to work
 case "`uname -r`" in
diff --git a/testsuite/shuffle4.sh b/testsuite/shuffle4.sh
index 398972a..da2664d 100755
--- a/testsuite/shuffle4.sh
+++ b/testsuite/shuffle4.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # Kernels before 2.4.10 are known not to work
 case "`uname -r`" in
diff --git a/testsuite/shuffle5.sh b/testsuite/shuffle5.sh
index e8c0297..9543aa0 100755
--- a/testsuite/shuffle5.sh
+++ b/testsuite/shuffle5.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f shuffle5 shuffle5lib*.so shuffle5.log shuffle5.lds
 rm -f prelink.cache
diff --git a/testsuite/shuffle6.sh b/testsuite/shuffle6.sh
index cdd16a0..0c4442e 100755
--- a/testsuite/shuffle6.sh
+++ b/testsuite/shuffle6.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f shuffle6 shuffle6lib*.so shuffle6.log shuffle6.lds
 rm -f prelink.cache
diff --git a/testsuite/shuffle6lib1.c b/testsuite/shuffle6lib1.c
index 8053293..2e75a87 100644
--- a/testsuite/shuffle6lib1.c
+++ b/testsuite/shuffle6lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 
 int bar = 26;
diff --git a/testsuite/shuffle6lib2.c b/testsuite/shuffle6lib2.c
index ed18f6b..20ddf54 100644
--- a/testsuite/shuffle6lib2.c
+++ b/testsuite/shuffle6lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/shuffle7.sh b/testsuite/shuffle7.sh
index 4250b26..64332d0 100755
--- a/testsuite/shuffle7.sh
+++ b/testsuite/shuffle7.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f shuffle7 shuffle7lib*.so shuffle7.log shuffle7.lds
 rm -f prelink.cache
diff --git a/testsuite/shuffle8.c b/testsuite/shuffle8.c
index 4e80184..eeee490 100644
--- a/testsuite/shuffle8.c
+++ b/testsuite/shuffle8.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/shuffle8.sh b/testsuite/shuffle8.sh
index 7875673..8e99b04 100755
--- a/testsuite/shuffle8.sh
+++ b/testsuite/shuffle8.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f shuffle8 shuffle8lib*.so shuffle8.log shuffle8.lds
 rm -f prelink.cache
diff --git a/testsuite/shuffle9.c b/testsuite/shuffle9.c
index 201eabc..5c9a913 100644
--- a/testsuite/shuffle9.c
+++ b/testsuite/shuffle9.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "reloc1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/shuffle9.sh b/testsuite/shuffle9.sh
index c974708..5079acb 100755
--- a/testsuite/shuffle9.sh
+++ b/testsuite/shuffle9.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # Kernels before 2.4.10 are known not to work
 case "`uname -r`" in
diff --git a/testsuite/tls1.c b/testsuite/tls1.c
index 08bd26f..db87bf9 100644
--- a/testsuite/tls1.c
+++ b/testsuite/tls1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls1.h b/testsuite/tls1.h
index d627340..b550cf6 100644
--- a/testsuite/tls1.h
+++ b/testsuite/tls1.h
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 struct A
   {
     char a;
diff --git a/testsuite/tls1.sh b/testsuite/tls1.sh
index 585d179..4571fa4 100755
--- a/testsuite/tls1.sh
+++ b/testsuite/tls1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 rm -f tlstest
diff --git a/testsuite/tls1lib1.c b/testsuite/tls1lib1.c
index eb0734b..6fa1d07 100644
--- a/testsuite/tls1lib1.c
+++ b/testsuite/tls1lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls1lib2.c b/testsuite/tls1lib2.c
index eee03a9..c8d309a 100644
--- a/testsuite/tls1lib2.c
+++ b/testsuite/tls1lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls2.c b/testsuite/tls2.c
index 1246165..a8756e2 100644
--- a/testsuite/tls2.c
+++ b/testsuite/tls2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls2.sh b/testsuite/tls2.sh
index 6910c16..238f07b 100755
--- a/testsuite/tls2.sh
+++ b/testsuite/tls2.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 rm -f tlstest
diff --git a/testsuite/tls2lib1.c b/testsuite/tls2lib1.c
index 24b7555..df3c657 100644
--- a/testsuite/tls2lib1.c
+++ b/testsuite/tls2lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls3.sh b/testsuite/tls3.sh
index 951ee55..f9b3edf 100755
--- a/testsuite/tls3.sh
+++ b/testsuite/tls3.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 rm -f tlstest
diff --git a/testsuite/tls3lib2.c b/testsuite/tls3lib2.c
index ba485d3..5e50e86 100644
--- a/testsuite/tls3lib2.c
+++ b/testsuite/tls3lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls4.c b/testsuite/tls4.c
index 0882f07..0e4ced1 100644
--- a/testsuite/tls4.c
+++ b/testsuite/tls4.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls4.sh b/testsuite/tls4.sh
index e00e7cc..e61c041 100755
--- a/testsuite/tls4.sh
+++ b/testsuite/tls4.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 rm -f tlstest
diff --git a/testsuite/tls4lib1.c b/testsuite/tls4lib1.c
index a03af0b..202bbbb 100644
--- a/testsuite/tls4lib1.c
+++ b/testsuite/tls4lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls4lib2.c b/testsuite/tls4lib2.c
index 309504b..9284a30 100644
--- a/testsuite/tls4lib2.c
+++ b/testsuite/tls4lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls5.sh b/testsuite/tls5.sh
index 7282808..99a7812 100755
--- a/testsuite/tls5.sh
+++ b/testsuite/tls5.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 rm -f tlstest
diff --git a/testsuite/tls5lib1.c b/testsuite/tls5lib1.c
index 9677848..bf42fcf 100644
--- a/testsuite/tls5lib1.c
+++ b/testsuite/tls5lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls6.sh b/testsuite/tls6.sh
index 6a64f02..0f526a5 100755
--- a/testsuite/tls6.sh
+++ b/testsuite/tls6.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 rm -f tlstest
diff --git a/testsuite/tls6lib1.c b/testsuite/tls6lib1.c
index 5310c06..4ee7eb8 100644
--- a/testsuite/tls6lib1.c
+++ b/testsuite/tls6lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls7.c b/testsuite/tls7.c
index 4a3db24..a11adfb 100644
--- a/testsuite/tls7.c
+++ b/testsuite/tls7.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 #include "tls1.h"
 #include <stdlib.h>
 
diff --git a/testsuite/tls7.sh b/testsuite/tls7.sh
index ab93719..7431819 100755
--- a/testsuite/tls7.sh
+++ b/testsuite/tls7.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 # First check if __thread is supported by ld.so/gcc/ld/as:
 rm -f tlstest
diff --git a/testsuite/undo1.sh b/testsuite/undo1.sh
index 68eee1f..ac07fb8 100755
--- a/testsuite/undo1.sh
+++ b/testsuite/undo1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 rm -f undo1 undo1lib*.so undo1.log
 rm -f prelink.cache
diff --git a/testsuite/undosyslibs.sh b/testsuite/undosyslibs.sh
index 1ce136d..ef0b1e8 100755
--- a/testsuite/undosyslibs.sh
+++ b/testsuite/undosyslibs.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 LIBS=`cat syslib.list`
 comparelibs >> undosyslibs.log 2>&1 || exit 1
diff --git a/testsuite/unprel1.c b/testsuite/unprel1.c
index 0c8e9f9..8aebe96 100644
--- a/testsuite/unprel1.c
+++ b/testsuite/unprel1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 extern int bar ();
 
 int
diff --git a/testsuite/unprel1.sh b/testsuite/unprel1.sh
index 401f8bf..69a7081 100755
--- a/testsuite/unprel1.sh
+++ b/testsuite/unprel1.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0-only
 . `dirname $0`/functions.sh
 PRELINK=`echo $PRELINK \
 	 | sed -e 's, \./\(prelink\.\(cache\|conf\)\), unprel1.tree/etc/\1,g' \
diff --git a/testsuite/unprel1lib1.c b/testsuite/unprel1lib1.c
index 8f85da3..9ed43e5 100644
--- a/testsuite/unprel1lib1.c
+++ b/testsuite/unprel1lib1.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 int
 baz ()
 {
diff --git a/testsuite/unprel1lib2.c b/testsuite/unprel1lib2.c
index 4783123..7325d15 100644
--- a/testsuite/unprel1lib2.c
+++ b/testsuite/unprel1lib2.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
 extern int baz ();
 
 int
-- 
2.7.4


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

* Re: [OE-core] [prelink-cross] Bug 13529 add SPDX identifier
  2019-10-22  9:28     ` [yocto][prelink-cross] " Yann CARDAILLAC
@ 2019-10-22 20:46       ` Mark Hatle
  -1 siblings, 0 replies; 8+ messages in thread
From: Mark Hatle @ 2019-10-22 20:46 UTC (permalink / raw)
  To: Yann CARDAILLAC; +Cc: jakub, yocto, Romain Naour, mark.hatle, openembedded-core

I need to look through it further, but everything I looked at (and your comments
below) look good to me.

I'll try to get this merge soon.  (If you don't see it get merged, please ping
me.)  I'm preparing for ELC-E and am short on time right now.

--Mark

On 10/22/19 4:28 AM, Yann CARDAILLAC wrote:
> 
> 
> On Mon, Oct 21, 2019 at 4:35 PM Mark Hatle <mark.hatle@kernel.crashing.org
> <mailto:mark.hatle@kernel.crashing.org>> wrote:
> 
>     On 10/21/19 4:43 AM, Yann CARDAILLAC wrote:
>     > Hi Mark Hatle, Jakub Jelinek,
> 
>     Jakub is no longer supporting this code, but he may have valuable insights into
>     licensing.
> 
>     > I'm currently beginning the work on bug 13529:
>     >
>     > https://bugzilla.yoctoproject.org/show_bug.cgi?id=13529
>     >
>     > The purpose is to add SPDX identifier to scripts and sources.
>     >
>     > Most of the sources have licences on the sources, however some of them don't,
>     > and I've question about others :
>     >
>     > - src/sha.c do not shall it be GPLV2-or-later as most of the other?
> 
>     /* sha.c - Functions to compute the SHA1 hash (message-digest) of files
>        or blocks of memory.  Complies to the NIST specification FIPS-180-1.
> 
>        Copyright (C) 2000, 2001, 2003 Scott G. Miller
> 
>        Credits:
>           Robert Klep <robert@ilse.nl <mailto:robert@ilse.nl>>  -- Expansion
>     function fix
>        NOTE: The canonical source of this file is maintained in GNU coreutils.
>     */
> 
>     The last line is the key.  This apparently came from GNU coreutils.
> 
>     >From the SCM logs, sha.c was introduced in approx 2003-07-01 from what it looks
>     like.  So it's a pretty old version.  You will need to do some detective work,
>     and find older versions of coreutils until you find the one that corresponds to
>     the code that was checked in.  Start back in 2003 and work backwards as
>     necessary.  (The version that matches to the original 2003-07-01 should be the
>     reasonable license to use.)
> 
> 
> Ok I found it ! https://github.com/coreutils/coreutils/blob/v4.5.8/lib/sha.c
> 
> from : https://github.com/coreutils/coreutils/blob/v4.5.8/COPYING it looks like
> it's only GPLV2
> 
> 
>     > - how to licence m4/libelf.m4 ? I'd prefer you to tell me exactly what to
>     add in
>     > order to avoid errors
> 
>     The original version of the m4/libelf.m4 was introduced 2001-09-27.  It appears
>     to me that it was written as part of the prelinker, so would be under the
>     overall license of the prelinker.
> 
>     Based on this, my assumption is that it is GPL-2.0
> 
>     I do not see any 'or-later' clauses anywhere.
> 
> I have just add  "dnl SPDX-License-Identifier: GPL-2.0-only" bellow the "Written
> by" comment, however should it also be in the resulting template? 
> I can add it also at first line of the resulting file if necessary ?
> 
> 
>     > - what about *.C files ? They don't have licence header, they look like C file
>     > to me so I'd probably add :
>     > // SPDX-License-Identifier: GPL-2.0-or-later
> 
>     There are each simply test cases.  They would be covered by the overall
>     'COPYING' for the package.  Thus GPL-2.0
> 
>     > - what about testsuite/ files ?
> 
>     Same, no specifically stated license will be GPL-2.0.
> 
> Done ! 
> 
>     > Shall every thing just be GPL-2.0-or-later?
> 
>     Also just to be clear.  As I am NOT the original author of this work, I won't
>     accept a patch to remove any existing license text from the headers in this
>     software, but I will accept the SPDX-License-Identifier to be added in addition
>     to the existing license text.
>      
> 
>     If an existing file does not have any License text in it, then we will need to
>     assume that the COPYING file covers all software unless there is some indicator
>     it comes from another source with a different license.  For items w/o existing
>     licenses, just adding the SPDX-License-Identifier will be acceptable.
> 
>     So in a header similar to:
> 
>     /* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
>        Written by Jakub Jelinek <jakub@redhat.com <mailto:jakub@redhat.com>>, 2001.
> 
>        This program is free software; you can redistribute it and/or modify
>        it under the terms of the GNU General Public License as published by
>        the Free Software Foundation; either version 2, or (at your option)
>        any later version.
> 
>        This program is distributed in the hope that it will be useful,
>        but WITHOUT ANY WARRANTY; without even the implied warranty of
>        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>        GNU General Public License for more details.
> 
>        You should have received a copy of the GNU General Public License
>        along with this program; if not, write to the Free Software Foundation,
>        Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
> 
>     please add the header between the 'Written by' and the existing license text,
>     such as:
> 
>     /* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
>        Written by Jakub Jelinek <jakub@redhat.com <mailto:jakub@redhat.com>>, 2001.
> 
>        SPDX-License-Identifier: GPL-2.0-or-later
> 
>        This program is free software; you can redistribute it and/or modify
>        it under the terms of the GNU General Public License as published by
> 
> 
> Here's the first attempt of the patch, feel free to give me any advice on how to
> improve it!
> 
> Regards,
> 
> -- 
> SMILE <http://www.smile.eu/>
> 
> 20 rue des Jardins
> 92600 Asnières-sur-Seine
> 
> 	
> *Yann CARDAILLAC*
> Ingénieur Systèmes Embarqués
> 
> email yann.cardaillac@smile.fr <mailto:yann.cardaillac@smile.fr>
> url http://www.smile.eu
> 
> Twitter <https://twitter.com/GroupeSmile> Facebook
> <https://www.facebook.com/smileopensource> LinkedIn
> <https://www.linkedin.com/company/smile> Github <https://github.com/Smile-SA>
> 
> 
> 
> eco Pour la planète, n'imprimez ce mail que si c'est nécessaire


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

* Re: [yocto][prelink-cross] Bug 13529 add SPDX identifier
@ 2019-10-22 20:46       ` Mark Hatle
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Hatle @ 2019-10-22 20:46 UTC (permalink / raw)
  To: Yann CARDAILLAC; +Cc: jakub, yocto, Romain Naour, mark.hatle, openembedded-core

I need to look through it further, but everything I looked at (and your comments
below) look good to me.

I'll try to get this merge soon.  (If you don't see it get merged, please ping
me.)  I'm preparing for ELC-E and am short on time right now.

--Mark

On 10/22/19 4:28 AM, Yann CARDAILLAC wrote:
> 
> 
> On Mon, Oct 21, 2019 at 4:35 PM Mark Hatle <mark.hatle@kernel.crashing.org
> <mailto:mark.hatle@kernel.crashing.org>> wrote:
> 
>     On 10/21/19 4:43 AM, Yann CARDAILLAC wrote:
>     > Hi Mark Hatle, Jakub Jelinek,
> 
>     Jakub is no longer supporting this code, but he may have valuable insights into
>     licensing.
> 
>     > I'm currently beginning the work on bug 13529:
>     >
>     > https://bugzilla.yoctoproject.org/show_bug.cgi?id=13529
>     >
>     > The purpose is to add SPDX identifier to scripts and sources.
>     >
>     > Most of the sources have licences on the sources, however some of them don't,
>     > and I've question about others :
>     >
>     > - src/sha.c do not shall it be GPLV2-or-later as most of the other?
> 
>     /* sha.c - Functions to compute the SHA1 hash (message-digest) of files
>        or blocks of memory.  Complies to the NIST specification FIPS-180-1.
> 
>        Copyright (C) 2000, 2001, 2003 Scott G. Miller
> 
>        Credits:
>           Robert Klep <robert@ilse.nl <mailto:robert@ilse.nl>>  -- Expansion
>     function fix
>        NOTE: The canonical source of this file is maintained in GNU coreutils.
>     */
> 
>     The last line is the key.  This apparently came from GNU coreutils.
> 
>     >From the SCM logs, sha.c was introduced in approx 2003-07-01 from what it looks
>     like.  So it's a pretty old version.  You will need to do some detective work,
>     and find older versions of coreutils until you find the one that corresponds to
>     the code that was checked in.  Start back in 2003 and work backwards as
>     necessary.  (The version that matches to the original 2003-07-01 should be the
>     reasonable license to use.)
> 
> 
> Ok I found it ! https://github.com/coreutils/coreutils/blob/v4.5.8/lib/sha.c
> 
> from : https://github.com/coreutils/coreutils/blob/v4.5.8/COPYING it looks like
> it's only GPLV2
> 
> 
>     > - how to licence m4/libelf.m4 ? I'd prefer you to tell me exactly what to
>     add in
>     > order to avoid errors
> 
>     The original version of the m4/libelf.m4 was introduced 2001-09-27.  It appears
>     to me that it was written as part of the prelinker, so would be under the
>     overall license of the prelinker.
> 
>     Based on this, my assumption is that it is GPL-2.0
> 
>     I do not see any 'or-later' clauses anywhere.
> 
> I have just add  "dnl SPDX-License-Identifier: GPL-2.0-only" bellow the "Written
> by" comment, however should it also be in the resulting template? 
> I can add it also at first line of the resulting file if necessary ?
> 
> 
>     > - what about *.C files ? They don't have licence header, they look like C file
>     > to me so I'd probably add :
>     > // SPDX-License-Identifier: GPL-2.0-or-later
> 
>     There are each simply test cases.  They would be covered by the overall
>     'COPYING' for the package.  Thus GPL-2.0
> 
>     > - what about testsuite/ files ?
> 
>     Same, no specifically stated license will be GPL-2.0.
> 
> Done ! 
> 
>     > Shall every thing just be GPL-2.0-or-later?
> 
>     Also just to be clear.  As I am NOT the original author of this work, I won't
>     accept a patch to remove any existing license text from the headers in this
>     software, but I will accept the SPDX-License-Identifier to be added in addition
>     to the existing license text.
>      
> 
>     If an existing file does not have any License text in it, then we will need to
>     assume that the COPYING file covers all software unless there is some indicator
>     it comes from another source with a different license.  For items w/o existing
>     licenses, just adding the SPDX-License-Identifier will be acceptable.
> 
>     So in a header similar to:
> 
>     /* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
>        Written by Jakub Jelinek <jakub@redhat.com <mailto:jakub@redhat.com>>, 2001.
> 
>        This program is free software; you can redistribute it and/or modify
>        it under the terms of the GNU General Public License as published by
>        the Free Software Foundation; either version 2, or (at your option)
>        any later version.
> 
>        This program is distributed in the hope that it will be useful,
>        but WITHOUT ANY WARRANTY; without even the implied warranty of
>        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>        GNU General Public License for more details.
> 
>        You should have received a copy of the GNU General Public License
>        along with this program; if not, write to the Free Software Foundation,
>        Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
> 
>     please add the header between the 'Written by' and the existing license text,
>     such as:
> 
>     /* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
>        Written by Jakub Jelinek <jakub@redhat.com <mailto:jakub@redhat.com>>, 2001.
> 
>        SPDX-License-Identifier: GPL-2.0-or-later
> 
>        This program is free software; you can redistribute it and/or modify
>        it under the terms of the GNU General Public License as published by
> 
> 
> Here's the first attempt of the patch, feel free to give me any advice on how to
> improve it!
> 
> Regards,
> 
> -- 
> SMILE <http://www.smile.eu/>
> 
> 20 rue des Jardins
> 92600 Asnières-sur-Seine
> 
> 	
> *Yann CARDAILLAC*
> Ingénieur Systèmes Embarqués
> 
> email yann.cardaillac@smile.fr <mailto:yann.cardaillac@smile.fr>
> url http://www.smile.eu
> 
> Twitter <https://twitter.com/GroupeSmile> Facebook
> <https://www.facebook.com/smileopensource> LinkedIn
> <https://www.linkedin.com/company/smile> Github <https://github.com/Smile-SA>
> 
> 
> 
> eco Pour la planète, n'imprimez ce mail que si c'est nécessaire


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

end of thread, other threads:[~2019-10-22 20:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-21  9:43 [prelink-cross] Bug 13529 add SPDX identifier Yann CARDAILLAC
2019-10-21  9:43 ` [yocto][prelink-cross] " Yann CARDAILLAC
2019-10-21 14:35 ` [OE-core] [prelink-cross] " Mark Hatle
2019-10-21 14:35   ` [yocto][prelink-cross] " Mark Hatle
2019-10-22  9:28   ` [OE-core] [prelink-cross] " Yann CARDAILLAC
2019-10-22  9:28     ` [yocto][prelink-cross] " Yann CARDAILLAC
2019-10-22 20:46     ` [OE-core] [prelink-cross] " Mark Hatle
2019-10-22 20:46       ` [yocto][prelink-cross] " Mark Hatle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.