Hi Dmitry,
thanks, applied and pushed.
best regards
Waldemar
Dmitry Chestnykh wrote,
Here is the warning:
ldso/ldso/dl-elf.c: In function '_dl_fixup':
./ldso/include/dl-elf.h:259:37: warning: declaration of 'reloc_addr' shadows a
previous local [-Wshadow]
259 | ElfW(Addr) *reloc_addr = 0; \
| ^~~~~~~~~~
./ldso/include/dl-elf.h:290:33: note: in expansion of macro
'DL_DO_RELOCATE_RELR'
290 | DL_DO_RELOCATE_RELR(dyn->loadaddr, relr_start,
relr_end); \
| ^~~~~~~~~~~~~~~~~~~
ldso/ldso/dl-elf.c:1032:9: note: in expansion of macro 'DL_RELOCATE_RELR'
1032 | DL_RELOCATE_RELR(tpnt);
| ^~~~~~~~~~~~~~~~
In file included from ldso/ldso/ldso.c:1462:
ldso/ldso/dl-elf.c:1012:20: note: shadowed declaration is here
1012 | ElfW(Addr) reloc_addr
Signed-off-by: Dmitry Chestnykh <dm.chestnykh(a)gmail.com>
---
ldso/include/dl-elf.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/ldso/include/dl-elf.h b/ldso/include/dl-elf.h
index 7d514c0f5..7143b572c 100644
--- a/ldso/include/dl-elf.h
+++ b/ldso/include/dl-elf.h
@@ -256,22 +256,22 @@ unsigned int __dl_parse_dynamic_info(ElfW(Dyn) *dpnt, unsigned long
dynamic_info
#define DL_DO_RELOCATE_RELR(load_addr, relr_start, relr_end) \
do { \
const ElfW(Relr) *relr = 0; \
- ElfW(Addr) *reloc_addr = 0; \
+ ElfW(Addr) *relr_reloc_addr = 0; \
for (relr = relr_start; relr < relr_end; relr++) { \
ElfW(Relr) relr_entry = *relr; \
if (!(relr_entry & 1)) \
{ \
- reloc_addr = (ElfW(Addr) *)DL_RELOC_ADDR(load_addr, relr_entry); \
- *reloc_addr = (ElfW(Addr))DL_RELOC_ADDR(load_addr, reloc_addr); \
- reloc_addr++; \
+ relr_reloc_addr = (ElfW(Addr) *)DL_RELOC_ADDR(load_addr, relr_entry); \
+ *relr_reloc_addr = (ElfW(Addr))DL_RELOC_ADDR(load_addr, relr_reloc_addr); \
+ relr_reloc_addr++; \
} \
else \
{ \
for (long int i = 0; (relr_entry >>= 1) != 0; ++i) { \
if ((relr_entry & 1) != 0) \
- reloc_addr[i] = (ElfW(Addr))DL_RELOC_ADDR(load_addr, reloc_addr[i]); \
+ relr_reloc_addr[i] = (ElfW(Addr))DL_RELOC_ADDR(load_addr, relr_reloc_addr[i]); \
} \
- reloc_addr += CHAR_BIT * sizeof(ElfW(Relr)) - 1; \
+ relr_reloc_addr += CHAR_BIT * sizeof(ElfW(Relr)) - 1; \
} \
} \
} while (0);
--
2.43.2
_______________________________________________
devel mailing list -- devel(a)uclibc-ng.org
To unsubscribe send an email to devel-leave(a)uclibc-ng.org