ObjectCache create_reader(string section_name, bool optional)
{
if (!bfd.HasSection (section_name)) {
if (optional)
return null;
throw new DwarfException (bfd, "Missing section '{0}'.", section_name);
}
return new ObjectCache (new ObjectCacheFunc (create_reader_func), section_name, 5);
}