libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] list of input files if max_cmd_len exceeded


From: Ralf Wildenhues
Subject: Re: [patch] list of input files if max_cmd_len exceeded
Date: Thu, 14 Apr 2005 18:44:50 +0200
User-agent: Mutt/1.4.1i

* David Edelsohn wrote on Thu, Apr 14, 2005 at 04:59:20PM CEST:
> >>>>> Ralf Wildenhues writes:
> 
> Ralf> What would the linker do with special characters in file names?
> 
>       AIX allows file globbing on the list, so '*' and '?' are allowed,
> but libtool does not need that capability.  Any other characters would be
> considered part of a filename and would cause the link to fail if the file
> did not exist.

Great.  That means we could use object files with names like `foo$bar.o'.

> Ralf> Also, your patch does not remove $output before using, so a
> Ralf> second link would have a wrong list.
> 
>       I do not understand the latter comment about removing the $output
> file.  My patch adds
> 
>             delfiles="$delfiles $output"
>             output=\"$file_list_spec$filelist\"
> 
> which sets delfiles to the linker script before output is redefined to the
> spec that references the linker script.  The existing libtool algorithm
> includes:
*snip*
> which will remove the linker script file.

Yes, but what I meant was removing _before_ your changes.  Your patch had

| +           output=${output_objdir}/${output_la}.lnk
| +           func_echo "creating linker input file list: $output"
| +           for obj in $save_libobjs
| +           do
| +             $ECHO $obj >> $output
| +           done
| +           delfiles="$delfiles $output"
| +           output=\"$file_list_spec$filelist\"

and if $output existed before, you would feed garbage to the linker.

Nit below.  No need to resend for this, though.  I'd like to discuss the
other point first.

Regards,
Ralf

> Index: config/ltmain.m4sh
> ===================================================================
> RCS file: /cvsroot/libtool/libtool/config/ltmain.m4sh,v
> retrieving revision 1.60
> diff -c -p -r1.60 ltmain.m4sh
> *** config/ltmain.m4sh        7 Apr 2005 17:58:26 -0000       1.60
> --- config/ltmain.m4sh        14 Apr 2005 14:57:15 -0000
> *************** EOF
> *** 5124,5134 ****
>           output=${output_objdir}/${output_la}.lnkscript
>           func_echo "creating GNU ld script: $output"
>           $ECHO 'INPUT (' > $output
> !         for obj in $save_libobjs
> !         do
> !           $ECHO \""$obj"\" >> $output
> !         done
>           $ECHO ')' >> $output
>         else
>           func_echo "creating reloadable object files..."
>           output=$output_objdir/$output_la-${k}.$objext
> --- 5124,5138 ----
>           output=${output_objdir}/${output_la}.lnkscript
>           func_echo "creating GNU ld script: $output"
>           $ECHO 'INPUT (' > $output
> !         $ECHO "X$save_libobjs" | $Xsed | $SP2NL > $output

Now you removed the quoting from the GNU ld script.  I showed how to
keep it.

>           $ECHO ')' >> $output
> +         delfiles="$delfiles $output"
> +       elif test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; 
> then
> +         output=${output_objdir}/${output_la}.lnk
> +         func_echo "creating linker input file list: $output"
> +         $ECHO "X$save_libobjs" | $Xsed | $SP2NL > $output
> +         delfiles="$delfiles $output"
> +         output=\"$file_list_spec$filelist\"
>         else
>           func_echo "creating reloadable object files..."
>           output=$output_objdir/$output_la-${k}.$objext




reply via email to

[Prev in Thread] Current Thread [Next in Thread]