elf: Set has_local_dynsyms for forced local symbol

bfd_elf_link_record_dynamic_symbol may be called by mips backend after
a global symbol has been forced to local.  Set has_local_dynsyms to true
in this case.

bfd/

	PR ld/33793
	* elflink.c (bfd_elf_link_record_dynamic_symbol): Set
	has_local_dynsyms to true for forced local symbol.

ld/

	PR ld/33793
	* testsuite/ld-mips-elf/mips-elf.exp: Run pr33793.
	* testsuite/ld-mips-elf/pr33793.d: New file.
	* testsuite/ld-mips-elf/pr33793.s: Likewise.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
4 files changed