[llvm-dev] Linking Linux kernel with LLD

Rui Ueyama via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 23 13:16:08 PST 2017


Our tokenizer recognize

  [A-Za-z0-9_.$/\\~=+[]*?\-:!<>]+

as a token. gold uses more complex rules to tokenize. I don't think we need
that much complex rules, but there seems to be room to improve our
tokenizer. In particular, I believe we can parse the Linux's linker script
by changing the tokenizer rules as follows.

  [A-Za-z_.$/\\~=+[]*?\-:!<>][A-Za-z0-9_.$/\\~=+[]*?\-:!<>]*

or

  [0-9]+

On Mon, Jan 23, 2017 at 9:25 AM, George Rimar via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> >I'm not sure if it is easy, but I think that it's clear that the
> linkerscript lexer needs to be improved. I think that is the source of the
> >problems with `*(.apicdrivers);` as well. This is not the first bug
> related to lexing that we have run into (e.g. lexing `.=` as a single
> >token is the cause of https://llvm.org/bugs/show_bug.cgi?id=31128 ).
> >
> >-- Sean Silva
>
> PR31128​ seems to be not an issue. Both gold and bfd do not accept '.='.
> So it seems the only known issue we have is about math expressions like "x
> = 5*4",
> I am going to look again how to fix that.
>
> George.​
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170123/8f7ac775/attachment.html>


More information about the llvm-dev mailing list