[PATCH] D28559: [ELF] - Do not crash if user section has name equal to one of synthetic sections.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 11 12:30:26 PST 2017


On Wed, Jan 11, 2017 at 11:45 AM, Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:

> Rui Ueyama via Phabricator <reviews at reviews.llvm.org> writes:
>
> > ruiu added inline comments.
> >
> >
> > ================
> > Comment at: ELF/InputSection.cpp:38-41
> > +  // File can absent if section is synthetic.
> > +  if (!Sec->getFile())
> > +    return ("'" + Sec->Name + "'").str();
> >    return (Sec->getFile()->getName() + ":(" + Sec->Name + ")").str();
> > ----------------
> > If a section is a synthetic section, it's output will be something like
> >
> >   'foo'
> >
> > while if it is not, it will be something like
> >
> >   bar.o:(foo)
> >
> > So, apparently they are inconsistent in quoting style. That's not good.
>
> Would you prefer
>
> (foo)
>
> and
> bar.o:(foo)
>
> I think so.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170111/accd56a1/attachment.html>


More information about the llvm-commits mailing list