if (sect_syms == NULL)
return false;
elf_section_syms (abfd) = sect_syms;
+ elf_num_section_syms (abfd) = max_index;
for (idx = 0; idx < symcount; idx++)
{
indx = asym_ptr->section->output_section->index;
else
indx = asym_ptr->section->index;
- if (elf_section_syms (abfd)[indx])
+ if (indx < elf_num_section_syms (abfd)
+ && elf_section_syms (abfd)[indx] != NULL)
asym_ptr->udata.i = elf_section_syms (abfd)[indx]->udata.i;
}
# include <sys/procfs.h>
#endif
-/* Define offsetof for those systems which lack it. */
-
-#ifndef offsetof
-# define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
-#endif
-
/* FIXME: this is kinda wrong, but it's what gdb wants. */
static int
}
void
-bfd_elf_sprintf_vma (abfd, buf, value)
- bfd *abfd;
+_bfd_elf_sprintf_vma (abfd, buf, value)
+ bfd *abfd ATTRIBUTE_UNUSED;
char *buf;
bfd_vma value;
{
else
{
if (i_ehdrp->e_ident[EI_CLASS] == ELFCLASS64)
+ {
#if BFD_HOST_64BIT_LONG
- sprintf (buf, "%016lx", value);
+ sprintf (buf, "%016lx", value);
#else
- sprintf (buf, "%08lx%08lx", _bfd_int64_high (value),
- _bfd_int64_low (value));
+ sprintf (buf, "%08lx%08lx", _bfd_int64_high (value),
+ _bfd_int64_low (value));
#endif
+ }
else
sprintf (buf, "%08lx", (unsigned long) (value & 0xffffffff));
}
}
void
-bfd_elf_fprintf_vma (abfd, stream, value)
- bfd *abfd;
+_bfd_elf_fprintf_vma (abfd, stream, value)
+ bfd *abfd ATTRIBUTE_UNUSED;
PTR stream;
bfd_vma value;
{
else
{
if (i_ehdrp->e_ident[EI_CLASS] == ELFCLASS64)
+ {
#if BFD_HOST_64BIT_LONG
- fprintf ((FILE *) stream, "%016lx", value);
+ fprintf ((FILE *) stream, "%016lx", value);
#else
- fprintf ((FILE *) stream, "%08lx%08lx",
- _bfd_int64_high (value), _bfd_int64_low (value));
+ fprintf ((FILE *) stream, "%08lx%08lx",
+ _bfd_int64_high (value), _bfd_int64_low (value));
#endif
+ }
else
fprintf ((FILE *) stream, "%08lx",
(unsigned long) (value & 0xffffffff));