From b87be6c327c325e736c97f54677bbb7f357e1a7f Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Tue, 2 Feb 2016 23:45:54 +0000 Subject: [PATCH] ELF: Write about the current policy to README. llvm-svn: 259606 --- lld/ELF/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lld/ELF/README.md b/lld/ELF/README.md index 49b8167bbfe0..a7188021fb0c 100644 --- a/lld/ELF/README.md +++ b/lld/ELF/README.md @@ -19,3 +19,16 @@ Achieving good performance is one of our goals. It's too early to reach a conclusion, but we are optimistic about that as it currently seems to be faster than GNU gold. It will be interesting to compare when we are close to feature parity. + +Library Use +----------- + +You can embed LLD to your program by linking against it and calling the linker's +entry point function lld::elf2::link. + +The current policy is that it is your reponsibility to give trustworthy object +files. The function is guaranteed to return as long as you do not pass corrupted +or malicious object files. A corrupted file could cause a fatal error or SEGV. +That being said, you don't need to worry too much about it if you create object +files in a usual way and give them to the linker (it is naturally expected to +work, or otherwise it's a linker's bug.)