[llvm-dev] LTO, ifuncs, and lld

Peter Collingbourne via llvm-dev llvm-dev at lists.llvm.org
Wed Nov 28 21:16:24 PST 2018


https://reviews.llvm.org/D55046 fixes your reproducer here. Let me know if
that works for you.

Note that I had to rebuild one of your bitcode files to be a regular object
file, this is because LTO doesn't want the .eh_frame terminator to live in
a bitcode file.

$ mv ./usr/lib/crtendS.o ./usr/lib/crtendS.o.bak
$ ~/l4/ra/bin/llc -o ./usr/lib/crtendS.o ./usr/lib/crtendS.o.bak
-filetype=obj -relocation-model=pic

Peter

On Wed, Nov 28, 2018 at 5:35 PM Shawn Webb <shawn.webb at hardenedbsd.org>
wrote:

> Hey Peter,
>
> Here you go!
>
> https://hardenedbsd.org/~shawn/2018-11-28_reproduce-01.tar
>
> Thanks,
>
> --
> Shawn Webb
> Cofounder and Security Engineer
> HardenedBSD
>
> Tor-ified Signal:    +1 443-546-8752
> Tor+XMPP+OTR:        lattera at is.a.hacker.sx
> GPG Key ID:          0x6A84658F52456EEE
> GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE
>
> On Wed, Nov 28, 2018 at 05:30:57PM -0800, Peter Collingbourne wrote:
> > Hi Shawn,
> >
> > Can you please create a reproducer tarball (using ld.lld --reproduce) so
> > that we don't need to install HardenedBSD in order to reproduce?
> >
> > Peter
> >
> > On Wed, Nov 28, 2018 at 5:16 PM Shawn Webb via llvm-dev <
> > llvm-dev at lists.llvm.org> wrote:
> >
> > > Hey LLVM folks,
> > >
> > > I've run into an interesting assertion. In one of HardenedBSD's
> > > feature branches, we're working on integration llvm's Cross-DSO CFI
> > > implementation. Using Cross-DSO CFI requires building libs with LTO,
> > > which causes clang to emit LLVM IR intermediate object files rather
> > > than ELF intermediate object files.
> > >
> > > I've found that with lld, attempting to link LLVM IR intermediate
> > > object files hits an assert in lld. I've created a reproduction test
> > > case in this tiny little repo: https://github.com/lattera/ifunc_repro
> > >
> > > The assertion I hit is detailed in the commit message of the initial
> > > commit:
> > >
> > >
> https://github.com/lattera/ifunc_repro/commit/0be98f9e81a1c91e80b135da6bb8d073d7a0c6f7
> > >
> > > HardenedBSD's Cross-DSO CFI feature branch uses clang/llvm/lld 7.0.1.
> > > I'm more than happy to test out patches to help address this issue.
> > >
> > > Please let me know if you have any questions, comments, or concerns.
> > >
> > > Thanks,
> > >
> > > --
> > > Shawn Webb
> > > Cofounder and Security Engineer
> > > HardenedBSD
> > >
> > > Tor-ified Signal:    +1 443-546-8752
> > > Tor+XMPP+OTR:        lattera at is.a.hacker.sx
> > > GPG Key ID:          0x6A84658F52456EEE
> > > GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE
> > > _______________________________________________
> > > LLVM Developers mailing list
> > > llvm-dev at lists.llvm.org
> > > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> > >
> >
> >
> > --
> > --
> > Peter
>


-- 
-- 
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181128/743b19fe/attachment.html>


More information about the llvm-dev mailing list