[PATCH] D22740: Move Dot variable from LinkerScript to ScriptConfig.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 24 18:09:15 PDT 2016


ruiu created this revision.
ruiu added reviewers: grimar, davide.
ruiu added a subscriber: llvm-commits.

The special variable "." is needed to evaluate expressions.
Currently we pass Dot variable to expressions as an argument.
But "." is actually not the only variable that needs to be passed
to expressions. SIZEOF_HEADERS is also need to be passed to
expressions in some way.

We could pass such variables as arguments. But if we do that way,
we'll end up having dozens of functions that takes many arguments.
Placing these varaibles in a shared place is probably a better way.

This patch moves Dot to ScriptConfig, so that it's accessible
both from LinkerScript and the expression evaluator.

https://reviews.llvm.org/D22740

Files:
  ELF/LinkerScript.cpp
  ELF/LinkerScript.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22740.65284.patch
Type: text/x-patch
Size: 9456 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160725/8ed51e10/attachment-0001.bin>


More information about the llvm-commits mailing list