summaryrefslogtreecommitdiff
path: root/libebl
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2018-02-21 16:31:44 +0100
committerMark Wielaard <mark@klomp.org>2018-02-22 13:16:46 +0100
commitebc1768e4451e30b19c8e1644515e66de8da4b4d (patch)
treebb158f67300129d9aa9279f37dcd5011c2dc6c3b /libebl
parent8e5e78927ee319816eb7a74f870671d21e762bfc (diff)
downloadelfutils-ebc1768e4451e30b19c8e1644515e66de8da4b4d.tar.gz
libebl: Allow SHT_NOTE as relocation target type.
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>
Diffstat (limited to 'libebl')
-rw-r--r--libebl/ChangeLog5
-rw-r--r--libebl/eblcheckreloctargettype.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/libebl/ChangeLog b/libebl/ChangeLog
index 3ecd7328..de325ab2 100644
--- a/libebl/ChangeLog
+++ b/libebl/ChangeLog
@@ -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
diff --git a/libebl/eblcheckreloctargettype.c b/libebl/eblcheckreloctargettype.c
index e0d57c14..068ad8f1 100644
--- a/libebl/eblcheckreloctargettype.c
+++ b/libebl/eblcheckreloctargettype.c
@@ -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: