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

Rui Ueyama ruiu at google.com
Thu Feb 26 12:39:27 PST 2015


I don't understand why you needed to introduce the notion of "rule id" to sort sections in a specific order. What you are trying to do with this patch is to layout sections in an order specified using linker scripts, right? I understand that we need that much code for linker script evaluation because it's a small programming language, but I'm not convinced that attaching a "rule id" to each DefinedAtom helps implementing section ordering.

It seems that we can just have a simple renaming map, which is a map from-sections (e.g. foo.o:.foo) to to-sections (.text), and look up that map in the writer then the writer makes a final decision about which atoms need to be put in which section. At least it seems it should be enough to make the test that you wrote pass.


http://reviews.llvm.org/D7915

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






More information about the llvm-commits mailing list