Commit fe0382b2 authored by strauman's avatar strauman
Browse files

- elfdlmap.c, elfsyms.c, xsyms.c: silenced compiler warnings.

parent 2460c186
......@@ -44,10 +44,10 @@ ElfW(Dyn) *dyn, *dyns;
ElfW(Addr) off = info->dlpi_addr;
ElfW(Addr) uoff;
ElfW(Sym) *symtab;
const char *strtab;
void *hash;
void *gnu_hash;
ElfW(Sym) *symtab = 0; /* silence compiler warning */
const char *strtab = 0; /* silence compiler warning */
void *hash = 0; /* silence compiler warning */
void *gnu_hash = 0; /* silence compiler warning */
Elf_GnuHashHdr hhdr;
unsigned long ndsyms;
int i;
......@@ -221,6 +221,8 @@ unsigned msk;
}
#endif
ndsyms = 0;
/* find the last chain and follow it to the end */
for ( i = hhdr.nbuckets - 1; i >=0 && 0 == (ndsyms = ((Elf32_Word*)gnu_hash)[i]); i--)
/* nothing else to do */;
......
......@@ -69,6 +69,7 @@
#include <pmbfd.h>
#undef HAVE_ELF_BFD_H
#else
#include <libiberty.h>
#include <bfd.h>
#endif
......@@ -119,7 +120,6 @@ Elf_Shdr *symsh, *strsh;
Pmelf_Shtab shtab = 0;
Pmelf_Symtab symtab = 0;
int rval = -1, i;
char buf[BUFSIZ];
int elf64 = 0;
/* Do it the ELF way... */
......@@ -378,7 +378,7 @@ const char *sname = ( BSF_SECTION_SYM & ps->flags ) ?
*pstripped = strdup(sname);
#ifdef LINKER_VERSION_SEPARATOR
if ( chpt = strchr(*pstripped, LINKER_VERSION_SEPARATOR) ) {
if ( (chpt = strchr(*pstripped, LINKER_VERSION_SEPARATOR)) ) {
*chpt = 0;
}
#endif
......@@ -418,9 +418,12 @@ int i;
int
main(int argc, char **argv)
{
bfd *obfd=0,*ibfd=0;
bfd *ibfd=0;
FILE *ofeil=0;
#ifndef _PMBFD_
bfd *obfd=0;
const bfd_arch_info_type *arch;
#endif
int i,nsyms;
asymbol **isyms=0, **osyms=0;
int rval=1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment