diff options
author | Mark Harmstone <mark@harmstone.com> | 2022-12-26 20:47:50 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-12-31 19:26:23 +1030 |
commit | 5c9e42e0e9a8f881f8e1ac6b1133de148b26bb30 (patch) | |
tree | e185805171b73c0d60beb656ebcf05717e4f70bb /ld/pdb.c | |
parent | fdf591c4c6d065d29461e7966809e97bcaea7e8b (diff) | |
download | binutils-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.c | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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; |