loongarch: 'index' shadows global

Avoid an error when compiling with older versions of gcc.

	* elfnn-loongarch.c (loongarch_relax_align): Rename "index" to
	"sym_index".
This commit is contained in:
Alan Modra 2024-01-03 16:03:48 +10:30
parent 1826e070a0
commit 375beedfd3

View File

@ -4309,8 +4309,8 @@ loongarch_relax_align (bfd *abfd, asection *sec,
{
bfd_vma addend, max = 0, alignment = 1;
int index = ELFNN_R_SYM (rel->r_info);
if (index > 0)
int sym_index = ELFNN_R_SYM (rel->r_info);
if (sym_index > 0)
{
alignment = 1 << (rel->r_addend & 0xff);
max = rel->r_addend >> 8;