X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=ld%2Ftestplug3.c;h=928f4d68426a55842a81f706950827bd56d7dbe2;hb=1c912705af057b0d30ea51af46d8a00014a84034;hp=489bd7c2bf5d4c03287810c11a2f8822a82739a3;hpb=e3001fd92063282c55ad251d58f112b10a0cf7d6;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/testplug3.c b/ld/testplug3.c index 489bd7c2bf..928f4d6842 100644 --- a/ld/testplug3.c +++ b/ld/testplug3.c @@ -1,6 +1,6 @@ /* Test plugin for the GNU linker. Check non-object IR file and calling release_input_file from onclaim_file. - Copyright (C) 2015 Free Software Foundation, Inc. + Copyright (C) 2015-2020 Free Software Foundation, Inc. This file is part of the GNU Binutils. @@ -217,12 +217,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)