[PATCH] [lld] [LinkerScript] Implement semantics for simple sections mappings

Shankar Kalpathi Easwaran shankarke at gmail.com
Thu Mar 12 12:44:58 PDT 2015


================
Comment at: include/lld/ReaderWriter/LinkerScript.h:1186
@@ +1185,3 @@
+  /// to the same set of expressions because of wildcards rules.
+  std::vector<const SymbolAssignment *> getExprs(const SectionKey &key);
+
----------------
rafaelauler wrote:
> shankarke wrote:
> > Could we evaluate as and when the input section is appended to the output section ?
> Woudn't this be equivalent to evaluating once we append to segments? I mean, the algorithm I have in mind is exactly the same. Before adding a section to the output section, we gather all expressions and put it there. This is exactly the same as putting expressions once we attach an input section to a segment.
You cannot get all the expressions and evaluate them for a simple case like this :-
 
SECTIONS {
 
.text : {
__start_text_val = .;
. = . + 1000;
__end_text_val = .;
*(.text)
}
 
}

http://reviews.llvm.org/D8157

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list