]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libebl: Allow SHT_NOTE as relocation target type.
authorMark Wielaard <mark@klomp.org>
Wed, 21 Feb 2018 15:31:44 +0000 (16:31 +0100)
committerMark Wielaard <mark@klomp.org>
Thu, 22 Feb 2018 12:16:46 +0000 (13:16 +0100)
eu-elflint uses ebl_check_reloc_target_type to determine whether a section
is a valid relocation target. In Fedora rawhide there are new ELF notes
(annobin) which have relocations against them in ET_REL files. eu-elflint
currently flags these as invalid. It looks like that is not correct.
I cannot find any reason an SHT_NOTE section cannot have relocations
against it. So this patch allows them.

Signed-off-by: Mark Wielaard <mark@klomp.org>
libebl/ChangeLog
libebl/eblcheckreloctargettype.c

index 3ecd7328b3bbfccbb4c17005a00d0370c1e6d844..de325ab2e769cac8a448423ab7494e934ea15127 100644 (file)
@@ -1,3 +1,8 @@
+2018-02-21  Mark Wielaard  <mark@klomp.org>
+
+       * eblcheckreloctargettype.c (ebl_check_reloc_target_type): Accept
+       SHT_NOTE.
+
 2018-02-09  Joshua Watt  <JPEWhacker@gmail.com>
 
        * eblobjnote.c (ebl_object_note): Use FALLTHROUGH macro instead of
index e0d57c1443c82fd8b0d4f4f57f2ddf8ddde523c6..068ad8f1c08e365852332e88d607211436e4464b 100644 (file)
@@ -46,6 +46,7 @@ ebl_check_reloc_target_type (Ebl *ebl, Elf64_Word sh_type)
       case SHT_INIT_ARRAY:
       case SHT_FINI_ARRAY:
       case SHT_PREINIT_ARRAY:
+      case SHT_NOTE:
        return true;
 
       default: