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]: Make sure that $ characters are prefixed by backslash


On Mon, Jan 05, 2009 at 09:12:28AM +0100, Andreas Schwab wrote:
> Michael Hennebry <hennebry@web.cs.ndsu.nodak.edu> writes:
> 
> > On Sun, 4 Jan 2009, Dave Korn wrote:
> >
> >> Kai Tietz wrote:
> >>>
> >>> Thanks for catching this.
> >>> Updated patch ok for apply?
> >>
> >>  Also, I think you don't need to escape the ones inside single-quotes:
> >>
> >> @@ -1636,7 +1636,7 @@ gld_${EMULATION_NAME}_place_orphan (asec
> >>
> >>   /* Look through the script to see where to place this section.  */
> >>   if (!link_info.relocatable
> >> -      && (dollar = strchr (secname, '$')) != NULL)
> >> +      && (dollar = strchr (secname, '\$')) != NULL)
> >
> > I'm pretty sure that, in C, a dollar sign may not be escaped by a slash.
> 
> This is part of a big (unquoted) sh here document.

That's right.  Backslash itself also ought to be quoted.  Bash seems
to be quite forgiving.

The patch is OK to apply.

-- 
Alan Modra
Australia Development Lab, IBM


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