[PATCH 3/3] bfd: elf: add handling in bfd_section_from_shdr
Indu Bhagat
indu.bhagat@oracle.com
Mon Jul 7 06:10:59 GMT 2025
Although the default handling for (sh_type >= SHT_LOOS && sh_type <=
SHT_HIOS) is sufficient when SHT_GNU_SFRAME is in that range, it makes
sense to add it as a case of its own.
As such, this change is not strictly necessary.
TBD:
- Do this or skip it ? This is necessary to do only if the new
section type is not SHT_LOOS/SHT_HIOS range.
bfd/
* elf.c (bfd_section_from_shdr): Add case for SHT_GNU_SFRAME.
---
bfd/elf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/bfd/elf.c b/bfd/elf.c
index 07b2d0e5a2d..05ff34a2b61 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2476,6 +2476,7 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex)
case SHT_PREINIT_ARRAY: /* .preinit_array section. */
case SHT_GNU_LIBLIST: /* .gnu.liblist section. */
case SHT_GNU_HASH: /* .gnu.hash section. */
+ case SHT_GNU_SFRAME: /* .sframe section. */
ret = _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex);
goto success;
--
2.43.0
More information about the Binutils
mailing list