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@redhat.com>
+2015-06-12 Mark Wielaard <mjw@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@redhat.com>
* eblobjnote.c (ebl_object_note): If allocation buf is large, then
/* 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
if (ebl->check_reloc_target_type (ebl, sh_type))
return true;
- if (sh_type == SHT_PROGBITS || sh_type == SHT_NOBITS)
- return true;
-
- return false;
+ switch (sh_type)
+ {
+ case SHT_PROGBITS:
+ case SHT_NOBITS:
+ case SHT_INIT_ARRAY:
+ case SHT_FINI_ARRAY:
+ case SHT_PREINIT_ARRAY:
+ return true;
+
+ default:
+ return false;
+ }
}