}
ctfsect.cts_name = _CTF_SECTION;
- ctfsect.cts_type = SHT_PROGBITS;
- ctfsect.cts_flags = 0;
ctfsect.cts_entsize = 1;
- ctfsect.cts_offset = 0;
ctfsect.cts_size = bfd_section_size (abfd, ctf_asect);
ctfsect.cts_data = contents;
later. */
ctf_archive_t *
-ctf_bfdopen_ctfsect (struct bfd *abfd, const ctf_sect_t *ctfsect, int *errp)
+ctf_bfdopen_ctfsect (struct bfd *abfd _libctf_unused_,
+ const ctf_sect_t *ctfsect, int *errp)
{
struct ctf_archive *arc = NULL;
ctf_archive_t *arci;
const char *bfderrstr = NULL;
int is_archive;
+#ifdef HAVE_BFD_ELF
asection *sym_asect;
ctf_sect_t symsect, strsect;
/* TODO: handle SYMTAB_SHNDX. */
}
strsect.cts_data = contents;
strsect.cts_name = (char *) strsect.cts_data + strhdr->sh_name;
- strsect.cts_type = strhdr->sh_type;
- strsect.cts_flags = strhdr->sh_flags;
+ strsect.cts_size = bfd_section_size (abfd, str_asect);
strsect.cts_entsize = strhdr->sh_size;
- strsect.cts_offset = strhdr->sh_offset;
strsectp = &strsect;
if (!bfd_malloc_and_get_section (abfd, sym_asect, &contents))
}
symsect.cts_name = (char *) strsect.cts_data + symhdr->sh_name;
- symsect.cts_type = symhdr->sh_type;
- symsect.cts_flags = symhdr->sh_flags;
symsect.cts_entsize = symhdr->sh_size;
+ symsect.cts_size = bfd_section_size (abfd, sym_asect);
symsect.cts_data = contents;
- symsect.cts_offset = symhdr->sh_offset;
symsectp = &symsect;
}
}
+#endif
if (ctfsect->cts_size > sizeof (uint64_t) &&
((*(uint64_t *) ctfsect->cts_data) == CTFA_MAGIC))
if (arci)
return arci;
err_free_sym:
+#ifdef HAVE_BFD_ELF
free ((void *) symsect.cts_data);
err_free_str:
free ((void *) strsect.cts_data);
+#endif
err: _libctf_unused_;
if (bfderrstr)
{