https://sourceware.org/bugzilla/show_bug.cgi?id=27719
--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Alan Modra <[email protected]>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=fc304b889106f6d1bd720e969b95615992bf1961 commit fc304b889106f6d1bd720e969b95615992bf1961 Author: Alan Modra <[email protected]> Date: Sun Apr 11 23:34:21 2021 +0930 PR27719, lang_mark_undefineds trashes memory It's not enough to test that the output is ELF before casting bfd_link_hash_entry to elf_link_hash_entry. Some ELF targets (d30v, dlx, pj, s12z, xgate) use the generic linker support in bfd/linker.c and thus their symbols are of type generic_link_hash_entry. Not all of the places this patch touches can result in wrong accesses, but I thought it worth ensuring that all occurrences of elf_link_hash_entry in ld/ were obviously correct. PR 27719 * ldlang.c (lang_mark_undefineds, undef_start_stop): Test that the symbol hash table is the correct type before accessing elf_link_hash_entry symbols. * plugin.c (is_visible_from_outside): Likewise. * emultempl/armelf.em (ld${EMULATION_NAME}_finish): Likewise. * emultempl/solaris2.em (elf_solaris2_before_allocation): Likewise. -- You are receiving this mail because: You are on the CC list for the bug.
