[PATCH] D16668: ELF: Remove fatal() and add the second parameter to the linker's entry point.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 2 13:40:02 PST 2016


> (FWIW, I think that's still going to be a transient point - we'll eventually
> want an actual API that doesn't crash. The equivalent to LLVM here is that
> in-memory files may be trusted (in the same way that in-memory IR can be
> trusted/assumed to be verifier clean) but API users may still want/need to
> call into lld and not crash on uncontrolled inputs (files off disk) - in the
> "integrate with the clang driver" example, the clang driver may be driving
> the linker on unknown object files the user provided & a hard stop/exit
> within the API may still be problematic (perhaps some object files were
> provided and some source files - source files are compiled into object
> files, then the linker is run - linker hard stops on one of the user
> provided object files (or one of the generated object files is corrupted
> between write and read) and the compiler still needs to cleanup its
> temporary object files))


That is not what is being worked on at the moment. I don't think we
should do it unless we use a solution that provides it isolated of the
rest of the code (fork). We definitely should not do it now before the
cost of that feature in code complexity and performance can be fully
understood.

Cheers,
Rafael


More information about the llvm-commits mailing list