- if (t->o->build_id.after_write_object_contents != NULL)
- return (*t->o->build_id.after_write_object_contents) (abfd);
+ if (t->o->build_id.after_write_object_contents != NULL
+ && !(*t->o->build_id.after_write_object_contents) (abfd))
+ return false;
+ if (t->o->package_metadata.after_write_object_contents != NULL
+ && !(*t->o->package_metadata.after_write_object_contents) (abfd))
+ return false;