X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Ftestplug.c;h=c126f0360736b8a13e12bd1c4026c42a167c3f45;hb=ebe2334ee6cb065d2a86688bc9558d62320dd459;hp=684fc41383904f10ede65d52b19da0aaa77817fa;hpb=ace667e59aede65c400381f1cff704b61e8ccb0b;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/testplug.c b/ld/testplug.c index 684fc41383..c126f03607 100644 --- a/ld/testplug.c +++ b/ld/testplug.c @@ -1,5 +1,5 @@ /* Test plugin for the GNU linker. - Copyright (C) 2010-2016 Free Software Foundation, Inc. + Copyright (C) 2010-2020 Free Software Foundation, Inc. This file is part of the GNU Binutils. @@ -239,12 +239,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)