Hi,
This patch gets rid of warning generated by compiling elf/rtld.c on
s390-64:
In file included from dynamic-link.h:88:0,
from rtld.c:352:
../sysdeps/s390/s390-64/dl-machine.h: In function âelf_machine_relaâ:
../sysdeps/s390/s390-64/dl-machine.h:282:30: warning: unused variable
ârefsymâ [-Wunused-variable]
The refsym variable in the function elf_machine_rela is declared and
used in the following lines in dl-machine.h:
281:#ifndef RESOLVE_CONFLICT_FIND_MAP
282: const Elf64_Sym *const refsym = sym;
283:#endif
348: #ifndef RTLD_BOOTSTRAP
349: # ifndef RESOLVE_CONFLICT_FIND_MAP
356: if (__builtin_expect (sym->st_size > refsym->st_size, 0)
357: || (__builtin_expect (sym->st_size < refsym->st_size, 0)
365: RTLD_PROGNAME, strtab + refsym->st_name);
368: MIN (sym->st_size, refsym->st_size));
370:# endif
406:#endif
This patch adds the #if !defined RTLD_BOOTSTRAP around the variable
declaration.
This patch for s390-64 is equal to the patch for s390-32 with patch
"S/390: Get rid of unused variable warning in dl-machine.h"
(c5eebdd084b77b0b581a3aa02213fa7cc5851216 by Andreas Krebbel 2014-01-07
09:40:00).
Bye
Stefan
---
2014-10-07 Stefan Liebler <stli@linux.vnet.ibm.com>
* sysdeps/s390/s390-64/dl-machine.h (elf_machine_rela):
Gate the definition of refsym additionally with !RTLD_BOOTSTRAP
to get rid of unused variable warning.