[PATCH] D29963: Apply different tokenization rules to linker script expressions.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 15 01:07:12 PST 2017


grimar added a comment.

:) I think that approach implements exactly what I had in mind when wrote 
in "[llvm-dev] Linking Linux kernel with LLD" thread:

> "I was thinking about entering some special parser state for 
>  extracting sub tokens from tokens transparently when
>  we are inside code that evaluates the expression."

Looks good for me.



================
Comment at: lld/test/ELF/linkerscript/operators.s:13
 # RUN:  .mul : { *(.mul) } \
-# RUN:  . = 0x10000 + (0x1000 + 0x1000) * 0x2; \
+# RUN:  . = 0x10000+(0x1000+0x1000)*0x2; \
 # RUN:  .bracket : { *(.bracket) } \
----------------
I would add another sub-case, which tests all operators you support in patch.


https://reviews.llvm.org/D29963





More information about the llvm-commits mailing list