Do without ld ENABLE_PLUGINS
[deliverable/binutils-gdb.git] / ld / testplug3.c
index 05fdca02e25c7a6250091bfe1328068cbfaef5bd..3b0e9b3b35a16a4c3d9f34f95d5afa0f30b082b5 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "sysdep.h"
 #include "bfd.h"
+#if BFD_SUPPORTS_PLUGINS
 #include "plugin-api.h"
 #include "filenames.h"
 /* For ARRAY_SIZE macro only - we don't link the library itself.  */
@@ -217,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)
@@ -624,3 +628,4 @@ oncleanup (void)
   fflush (NULL);
   return cleanup_ret;
 }
+#endif /* BFD_SUPPORTS_PLUGINS */
This page took 0.023663 seconds and 4 git commands to generate.