This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch binutils/11065] [DllTool] DLL name from DEF file is ignored when using --output-exp option


On 23/11/2010 14:54, Kai Tietz wrote:

>> this patch addresses the bug described at 
>> http://sourceware.org/bugzilla/show_bug.cgi?id=11065 report. The logic 
>> should be IMHO that if --dllname is specified, it shall be used in any 
>> case. If the exp_name is used for determine the DLL name, then just in 
>> case there is no DLL name specified in the .def file.

  That seems correct to me.

>>         * dlltool.c (dll_name_set_by_exp_name): New variable.
>>         (def_name): Allow setting of dll_name by .def file.
>>         (def_library): Likewise.
>>         (main): Set dll_name_set_by_exp_name, if dll_name is
>>         set indirect by exp_name.

  I can see one problem with this: it is *optional* to provide a name in a
LIBRARY or NAME def file directive, so you may end up discarding one set from
a def file when you zero out dll_name and then not having one from the
directive to replace it with.  Please add guards against that case.  (I can't
tell you off the top of my head if the name argument will be passed to
def_name/def_library as a NULL or as an empty string by the parser in the case
where no name is supplied, I'm afraid; don't suppose it would hurt to just
check for either.)

    cheers,
      DaveK


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]