Seen in run-elflint-self.sh for size.o when build with --enable-gcov.
https://bugzilla.redhat.com/show_bug.cgi?id=1230798
Signed-off-by: Mark Wielaard <mjw(a)redhat.com>
---
libebl/ChangeLog | 5 +++++
libebl/eblcheckreloctargettype.c | 6 ++++--
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/libebl/ChangeLog b/libebl/ChangeLog
index 51ae60f..4305cf6 100644
--- a/libebl/ChangeLog
+++ b/libebl/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-12 Mark Wielaard <mjw(a)redhat.com>
+
+ * eblcheckreloctargettype.c (ebl_check_reloc_target_type): Allow
+ SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
+
2015-05-17 Mark Wielaard <mjw(a)redhat.com>
* eblobjnote.c (ebl_object_note): If allocation buf is large, then
diff --git a/libebl/eblcheckreloctargettype.c b/libebl/eblcheckreloctargettype.c
index e135f8a..dc6de92 100644
--- a/libebl/eblcheckreloctargettype.c
+++ b/libebl/eblcheckreloctargettype.c
@@ -1,5 +1,5 @@
/* Check whether a section type is a valid target for relocation.
- Copyright (C) 2014 Red Hat, Inc.
+ Copyright (C) 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
@@ -39,7 +39,9 @@ ebl_check_reloc_target_type (Ebl *ebl, Elf64_Word sh_type)
if (ebl->check_reloc_target_type (ebl, sh_type))
return true;
- if (sh_type == SHT_PROGBITS || sh_type == SHT_NOBITS)
+ if (sh_type == SHT_PROGBITS || sh_type == SHT_NOBITS
+ || sh_type == SHT_INIT_ARRAY || sh_type == SHT_FINI_ARRAY
+ || sh_type == SHT_PREINIT_ARRAY)
return true;
return false;
--
1.8.3.1