public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] libebl: Allow SHT_NOTE as relocation target type.
@ 2018-02-21 15:36 Mark Wielaard
  2018-02-22 12:17 ` Mark Wielaard
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Wielaard @ 2018-02-21 15:36 UTC (permalink / raw)
  To: elfutils-devel; +Cc: Nick Clifton, Mark Wielaard

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                 | 5 +++++
 libebl/eblcheckreloctargettype.c | 1 +
 2 files changed, 6 insertions(+)

diff --git a/libebl/ChangeLog b/libebl/ChangeLog
index 3ecd732..de325ab 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 e0d57c1..068ad8f 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:
-- 
1.8.3.1

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

* Re: [PATCH] libebl: Allow SHT_NOTE as relocation target type.
  2018-02-21 15:36 [PATCH] libebl: Allow SHT_NOTE as relocation target type Mark Wielaard
@ 2018-02-22 12:17 ` Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2018-02-22 12:17 UTC (permalink / raw)
  To: elfutils-devel; +Cc: Nick Clifton

On Wed, 2018-02-21 at 16:36 +0100, Mark Wielaard wrote:
> 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.

Nick agreed with me, so I pushed this to master.

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

end of thread, other threads:[~2018-02-22 12:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-21 15:36 [PATCH] libebl: Allow SHT_NOTE as relocation target type Mark Wielaard
2018-02-22 12:17 ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).