]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
dlltool: respect use-nul-prefixed-import-tables option for delaylib
authorJeremy Drake <sourceware-bugzilla@jdrake.com>
Fri, 13 Jun 2025 05:53:07 +0000 (07:53 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 13 Jun 2025 05:53:07 +0000 (07:53 +0200)
Noticed the extra zeros while inspecting the output.

Signed-off-by: Jeremy Drake <sourceware-bugzilla@jdrake.com>
binutils/dlltool.c

index 4b08638f792dd1aec26fdeecadaba5565e7b0644..99c651f7f9b23568e4fe93184f0676df67cb8366 100644 (file)
@@ -2827,20 +2827,25 @@ make_delay_head (void)
   if (!no_idata5)
     {
       fprintf (f, "\t.section\t.didat$5\n");
-      /* NULL terminating list.  */
-      if (create_for_pep)
-       fprintf (f, "\t%s\t0\n\t%s\t0\n", ASM_LONG, ASM_LONG);
-      else
-       fprintf (f, "\t%s\t0\n", ASM_LONG);
+      if (use_nul_prefixed_import_tables)
+       {
+         if (create_for_pep)
+           fprintf (f, "\t%s\t0\n\t%s\t0\n", ASM_LONG, ASM_LONG);
+         else
+           fprintf (f, "\t%s\t0\n", ASM_LONG);
+       }
       fprintf (f, "__IAT_%s:\n", imp_name_lab);
     }
 
   if (!no_idata4)
     {
       fprintf (f, "\t.section\t.didat$4\n");
-      fprintf (f, "\t%s\t0\n", ASM_LONG);
-      if (create_for_pep)
-       fprintf (f, "\t%s\t0\n", ASM_LONG);
+      if (use_nul_prefixed_import_tables)
+       {
+         fprintf (f, "\t%s\t0\n", ASM_LONG);
+         if (create_for_pep)
+           fprintf (f, "\t%s\t0\n", ASM_LONG);
+       }
       fprintf (f, "__INT_%s:\n", imp_name_lab);
     }