This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] Treat SHT_FINI_ARRAY and SHT_PREINIT_ARRAY as relocatable sections
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: binutils at sourceware dot org
- Date: Thu, 30 Aug 2018 06:45:30 -0700
- Subject: [PATCH] Treat SHT_FINI_ARRAY and SHT_PREINIT_ARRAY as relocatable sections
SHT_FINI_ARRAY and SHT_PREINIT_ARRAY sections are relocatable.
* readelf.c (process_section_headers): Treat SHT_FINI_ARRAY and
SHT_PREINIT_ARRAY as relocatable sections.
---
binutils/readelf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 194f1c3e0c..9c675ddf1e 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -6359,6 +6359,8 @@ process_section_headers (Filedata * filedata)
&& filedata->section_headers[section->sh_info].sh_type != SHT_NOBITS
&& filedata->section_headers[section->sh_info].sh_type != SHT_NOTE
&& filedata->section_headers[section->sh_info].sh_type != SHT_INIT_ARRAY
+ && filedata->section_headers[section->sh_info].sh_type != SHT_FINI_ARRAY
+ && filedata->section_headers[section->sh_info].sh_type != SHT_PREINIT_ARRAY
/* FIXME: Are other section types valid ? */
&& filedata->section_headers[section->sh_info].sh_type < SHT_LOOS))
{
--
2.17.1