asection *asec;
struct bfd_link_order *link_order = NULL;
unsigned char *contents;
- bfd_size_type size;
bfd_size_type build_id_size;
unsigned char *build_id;
const char *pdb_base_name = NULL;
if (t->build_id.sec->contents == NULL)
t->build_id.sec->contents = (unsigned char *) xmalloc (t->build_id.sec->size);
contents = t->build_id.sec->contents;
- size = t->build_id.sec->size;
build_id_size = compute_build_id_size (t->build_id.style);
build_id = xmalloc (build_id_size);
if (bfd_seek (abfd, asec->filepos + link_order->offset, SEEK_SET) != 0)
return 0;
- if (bfd_bwrite (contents, size, abfd) != size)
+ if (bfd_bwrite (contents, sizeof (*ext), abfd) != sizeof (*ext))
return 0;
if (pdb)
+ sizeof (CV_INFO_PDB70) + 1;
if (pdb_name)
- s->size += strlen (pdb_name);
+ s->size += strlen (lbasename (pdb_name));
return true;
}
asection *asec;
struct bfd_link_order *link_order = NULL;
unsigned char *contents;
- bfd_size_type size;
bfd_size_type build_id_size;
unsigned char *build_id;
const char *pdb_base_name = NULL;
if (t->build_id.sec->contents == NULL)
t->build_id.sec->contents = (unsigned char *) xmalloc (t->build_id.sec->size);
contents = t->build_id.sec->contents;
- size = t->build_id.sec->size;
build_id_size = compute_build_id_size (t->build_id.style);
build_id = xmalloc (build_id_size);
if (bfd_seek (abfd, asec->filepos + link_order->offset, SEEK_SET) != 0)
return 0;
- if (bfd_bwrite (contents, size, abfd) != size)
+ if (bfd_bwrite (contents, sizeof (*ext), abfd) != sizeof (*ext))
return 0;
if (pdb)
+ sizeof (CV_INFO_PDB70) + 1;
if (pdb_name)
- s->size += strlen (pdb_name);
+ s->size += strlen (lbasename (pdb_name));
return true;
}
Contents of section .data:
0000 2dba2ef1 01000000 00000000 10000000 -...............
0010 20000060 00000000 00000000 00000000 ..`............
- 0020 02000000 00000000 44000000 40000040 ........D...@..@
+ 0020 02000000 00000000 3d000000 40000040 ........=...@..@
0030 00000000 00000000 00000000 01000000 ................
0040 10000000 10000000 20000060 01000000 ........ ..`....
0050 00000000 00000000 04000000 00000000 ................