aboutsummaryrefslogtreecommitdiff
path: root/ld/pdb.c
diff options
context:
space:
mode:
authorMark Harmstone <mark@harmstone.com>2022-12-26 20:47:50 +0000
committerAlan Modra <amodra@gmail.com>2022-12-31 19:26:23 +1030
commit5c9e42e0e9a8f881f8e1ac6b1133de148b26bb30 (patch)
treee185805171b73c0d60beb656ebcf05717e4f70bb /ld/pdb.c
parentfdf591c4c6d065d29461e7966809e97bcaea7e8b (diff)
downloadbinutils-5c9e42e0e9a8f881f8e1ac6b1133de148b26bb30.zip
binutils-5c9e42e0e9a8f881f8e1ac6b1133de148b26bb30.tar.gz
binutils-5c9e42e0e9a8f881f8e1ac6b1133de148b26bb30.tar.bz2
ld: Handle LF_VFTABLE types in PDBs
Diffstat (limited to 'ld/pdb.c')
-rw-r--r--ld/pdb.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/ld/pdb.c b/ld/pdb.c
index 60e9980..3934a92 100644
--- a/ld/pdb.c
+++ b/ld/pdb.c
@@ -3297,6 +3297,26 @@ handle_type (uint8_t *data, struct type_entry **map, uint32_t type_num,
/* Does not reference any types, nothing to be done. */
break;
+ case LF_VFTABLE:
+ {
+ struct lf_vftable *vft = (struct lf_vftable *) data;
+
+ if (size < offsetof (struct lf_vftable, names))
+ {
+ einfo (_("%P: warning: truncated CodeView type record"
+ " LF_VFTABLE\n"));
+ return false;
+ }
+
+ if (!remap_type (&vft->type, map, type_num, num_types))
+ return false;
+
+ if (!remap_type (&vft->base_vftable, map, type_num, num_types))
+ return false;
+
+ break;
+ }
+
case LF_STRING_ID:
{
struct lf_string_id *str = (struct lf_string_id *) data;