[PATCH 3/4] elf: Avoid linker crash on corrupt .eh_frame section

H.J. Lu hjl.tools@gmail.com
Tue Sep 23 02:23:45 GMT 2025


Return false on corrupt .eh_frame section.  Cap the .eh_frame section
alignment to the larger of the section size and the pointer size.

PR ld/33453
* elf-bfd.h (ABI_64_P): New.
* elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Return false
on corrupt .eh_frame section.
* elf.c (_bfd_elf_make_section_from_shdr): Limit .eh_frame section
alignment.
* elfxx-mips.c (ABI_64_P): Removed.
* elfxx-sparc.c (ABI_64_P): Likewise.
* elfxx-tilegx.c (ABI_64_P): Likewise.
* elfxx-x86.h (ABI_64_P): Likewise.

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-elf-Avoid-linker-crash-on-corrupt-.eh_frame-section.patch
Type: text/x-patch
Size: 5145 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20250923/cae7baf4/attachment-0001.bin>


More information about the Binutils mailing list