[PATCH] D24041: [ELF] Linkerscript: allow .eh_frame_hdr to go before .eh_frame

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 11:01:42 PDT 2016


Not exactly.
You can have --eh-frame-hdr, and empty .eh_frame at the same time.

2016-08-30 20:53 GMT+03:00 Rafael EspĂ­ndola <rafael.espindola at gmail.com>:

> >
> >    for (OutputSectionBase<ELFT> *Sec : OutputSections)
> > -    if (Sec != Out<ELFT>::Opd)
> > +    if (Sec != Out<ELFT>::Opd && Sec != Out<ELFT>::EhFrameHdr)
> >        Sec->writeTo(Buf + Sec->getFileOff());
> > +
> > +  if (!Out<ELFT>::EhFrame->empty() && Out<ELFT>::EhFrameHdr)
> > +    Out<ELFT>::EhFrameHdr->writeTo(Buf + Out<ELFT>::EhFrameHdr->
> getFileOff());
>
>
> The second if can be just
>
> if (Out<ELFT>::EhFrameHdr)
>
> no?
>
> LGTM.
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160830/bfe4335e/attachment.html>


More information about the llvm-commits mailing list