[llvm-dev] Need help with code generation

David Chisnall via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 23 04:00:08 PDT 2016


On 22 Mar 2016, at 19:57, Rui Ueyama via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> ELF is a documented file format so if you are not sure if something should be considered valid, you can take a look at the spec to determine whether it is valid or not. File validity is an independent concept from LLD and I think we can determine it according to the spec.

Some folk in Cambridge (including Stephen Kell, who I think you met at dinner on Friday) are working on a formal model for ELF and of linker semantics.  From what I’ve seen of their work, I’d echo Raphael’s comment: determining that a file is a valid ELF file is a long way from being trivial.  I wouldn’t be surprised if it took longer to run than lld, and I’d rather see a linker that ran in 10 seconds on valid input and crashed on invalid than one that ran in 30 seconds on valid input and took 20 seconds to produce an error message telling me in what way my ELF file is invalid on invalid input.

Hopefully, one of the outcomes of their research will be a tool that allows you to get this diagnostic if you’ve run a linker and had it crash.  They’re also hoping to be able to validate that the output from a linker is a valid linking of the input, though that’s a bit further away as yet.

David



More information about the llvm-dev mailing list