[patch ld/dlltool]: Allow empty LIBRARY statement in .def file

Kai Tietz ktietz70@googlemail.com
Thu Jul 26 13:53:00 GMT 2012


2012/7/26 nick clifton <nickc@redhat.com>:
> Hi Kai,
>
>
>> binutils/
>> 2012-07-25  Kai Tietz
>>
>>          * defparse.y (command): Call def_library only if name isn't
>> NULL and not empty.
>>
>> ld/
>>
>> 2012-07-25  Kai Tietz
>>
>>          * deffilep.y (command): Call def_image_name only if name isn't
>> NULL and not empty.
>>
>> Regression tested for x86_64-w64-mingw32, i686-w64-mingw32, and
>> i686-pc-cygwin.  ok for apply?
>
>
> Probably. :-)  You only included that patch to defparse.y in your posting,
> and missed out the patch to deffilep.y.  I do not see any problems with the
> patch so far, but please could you post the full thing so that I can check
> it over.
>
> Cheers
>   Nick

Ups, have I missed the ld part.  Here is the missing part of the patch.

Index: deffilep.y
===================================================================
RCS file: /cvs/src/src/ld/deffilep.y,v
retrieving revision 1.40
diff -u -r1.40 deffilep.y
--- deffilep.y  24 Feb 2012 14:20:19 -0000      1.40
+++ deffilep.y  25 Jul 2012 20:58:21 -0000
@@ -140,7 +140,11 @@

 command:
                NAME opt_name opt_base { def_image_name ($2, $3, 0); }
-       |       LIBRARY opt_name opt_base { def_image_name ($2, $3, 1); }
+       |       LIBRARY opt_name opt_base
+               {
+                 if ($2 && $2[0] != 0)
+                   def_image_name ($2, $3, 1);
+               }
        |       DESCRIPTION ID { def_description ($2);}
        |       STACKSIZE_K NUMBER opt_number { def_stacksize ($2, $3);}
        |       HEAPSIZE NUMBER opt_number { def_heapsize ($2, $3);}



More information about the Binutils mailing list