Skip to content
Commit 87cb95ba authored by mengqinggang's avatar mengqinggang Committed by liuzhensong
Browse files

LoongArch: ld: Fix hidden ifunc symbol linker error bug.

For hidden ifunc symbols, it not have GOT entry, only have gotplt entry. When
process R_LARCH_SOP_PUSH_GPREL, the offset is gotplt entry address minus GOT
address. When call bfd_put_NN(got->contents + offset), the absolute value of
offset is grather than got size, and other memory not belonging to GOT is be
overwritten.

bfd/ChangeLog:

	* elfnn-loongarch.c (loongarch_elf_relocate_section): If hidden ifunc
	symbol, don't call bfd_put_NN.
parent 9d131130
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment