mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 13:27:26 +08:00
Treat SHT_FINI_ARRAY and SHT_PREINIT_ARRAY as relocatable sections
Since SHT_FINI_ARRAY and SHT_PREINIT_ARRAY sections are relocatable, this patch fixes readelf and adds a testcase. binutils/ * readelf.c (process_section_headers): Treat SHT_FINI_ARRAY and SHT_PREINIT_ARRAY as relocatable sections. gas/ * testsuite/gas/elf/elf.exp: Run section14. * testsuite/gas/elf/section14.d: New file. * testsuite/gas/elf/section14.s: Likewise.
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
2018-08-30 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
* readelf.c (process_section_headers): Treat SHT_FINI_ARRAY and
|
||||
SHT_PREINIT_ARRAY as relocatable sections.
|
||||
|
||||
2018-08-30 Chenghua Xu <paul.hua.gm@gmail.com>
|
||||
|
||||
* MAINTAINERS: Add myself as a MIPS port maintainer.
|
||||
|
@ -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))
|
||||
{
|
||||
|
Reference in New Issue
Block a user