[llvm-dev] Need help with code generation

Rui Ueyama via llvm-dev llvm-dev at lists.llvm.org
Tue Mar 22 11:55:59 PDT 2016


On Tue, Mar 22, 2016 at 7:46 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> On 22 March 2016 at 14:36, Rui Ueyama via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > I have a question. If there is a ELF verifier function that walks every
> part
> > of an ELF file to verify that the file is sane, and if you can call that
> > before calling LLD's function, are you guys happy with that?
>
> The problem is defining what is sane.
>
> For example, if a comdat group is dropped, we never look into those
> sections and they can contain any garbage. Is that sane? Does it
> depend on where the .o is in the command line?
>
> If it is not sane, checking sanity will be a noticeable amount of
> extra work. If it is sane, it is a funny notion of sanity.
>

It involves a fairly large run-time cost, and certainly there are some
cases that it would be verifying some extra data. However, I think the
definition of "what is sane" is clear. If an object file has a broken
comdat section that happens to be not included into the result, the object
is still insane because that's just a coincidence. Even the same linker of
a new version would chose to read that for whatever reason.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160322/52e4f5eb/attachment.html>


More information about the llvm-dev mailing list