X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Ftestplug4.c;h=ca899b11da1da0f8bc8e06b5a07563e04f7640ba;hb=1ee1a363454d88a87ad2ade7530b2a7fb670021e;hp=86bad65cba6bce40ec986d9437329ed31f69cd6e;hpb=bf6f87e726c7e585402575a0976c717c6edd9817;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/testplug4.c b/ld/testplug4.c index 86bad65cba..ca899b11da 100644 --- a/ld/testplug4.c +++ b/ld/testplug4.c @@ -1,6 +1,6 @@ /* Test plugin for the GNU linker. Check non-object IR file as well as get_input_file, get_view, release_input_file and get_symbols interfaces. - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2020 Free Software Foundation, Inc. This file is part of the GNU Binutils. @@ -218,12 +218,15 @@ parse_symdefstr (const char *str, struct ld_plugin_symbol *sym) /* Finally we'll use sscanf to parse the numeric fields, then we'll split out the strings which we need to allocate separate storage for anyway so that we can add nul termination. */ - n = sscanf (colon2 + 1, "%i:%i:%lli", &sym->def, &sym->visibility, &size); + n = sscanf (colon2 + 1, "%hhi:%i:%lli", &sym->def, &sym->visibility, &size); if (n != 3) return LDPS_ERR; /* Parsed successfully, so allocate strings and fill out fields. */ sym->size = size; + sym->unused = 0; + sym->section_kind = 0; + sym->symbol_type = 0; sym->resolution = LDPR_UNKNOWN; sym->name = malloc (colon1 - str + 1); if (!sym->name)