+
+ if (!fp->ctf_syn_ext_strtab)
+ fp->ctf_syn_ext_strtab = ctf_dynhash_create (ctf_hash_integer,
+ ctf_hash_eq_integer,
+ NULL, NULL);
+ if (!fp->ctf_syn_ext_strtab)
+ {
+ ctf_set_errno (fp, ENOMEM);
+ return 0;
+ }
+
+ if (ctf_dynhash_insert (fp->ctf_syn_ext_strtab,
+ (void *) (uintptr_t)
+ atom->csa_external_offset,
+ (void *) atom->csa_str) < 0)
+ {
+ /* No need to bother freeing the syn_ext_strtab: it will get freed at
+ ctf_str_write_strtab time if unreferenced. */
+ ctf_set_errno (fp, ENOMEM);
+ return 0;
+ }
+