This seems like a really complicated way to do this. Why can't the linker script node just modify the input graph to add the extra nodes? Also this has the unrelated undef from shared lib changes. http://llvm-reviews.chandlerc.com/D2225