* loongarch: 'index' shadows global
@ 2024-01-05 2:32 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2024-01-05 2:32 UTC (permalink / raw)
To: binutils
Avoid an error when compiling with older versions of gcc.
* elfnn-loongarch.c (loongarch_relax_align): Rename "index" to
"sym_index".
diff --git a/bfd/elfnn-loongarch.c b/bfd/elfnn-loongarch.c
index 2f1c78ab4f8..0987628098e 100644
--- a/bfd/elfnn-loongarch.c
+++ b/bfd/elfnn-loongarch.c
@@ -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;
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-05 2:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-05 2:32 loongarch: 'index' shadows global Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).