https://sourceware.org/bugzilla/show_bug.cgi?id=34874
--- Comment #2 from Sourceware Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jan Beulich <[email protected]>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f6d98c0bc403261fafba98b233c985068cf78c05 commit f6d98c0bc403261fafba98b233c985068cf78c05 Author: Harshit Kumar <[email protected]> Date: Fri Nov 6 14:13:40 2026 +0100 ld: do not read ELF fields from a generic link hash table PR ld/34874 ldelf_after_open_output assumes that an ELF output BFD implies an ELF link hash table. A linker script can select an ELF flavour that uses the generic hash table, for example OUTPUT_FORMAT("elf64-nfp"). The hook then reads hash_table_id, which is past the end of the generic table (AddressSanitizer, heap-buffer-overflow, READ of size 4). Test is_elf_hash_table before reading the table, as other uses of link_info.hash in ld do. compatible_format in bfd/elflink.c does the same before it reads the ELF fields. Extend ld-x86-64/arch-confusion.exp to cover the generic hash table, using elf64-nfp and, when that is not built, elf32-little. Signed-off-by: Harshit Kumar <[email protected]> -- You are receiving this mail because: You are on the CC list for the bug.
