Support of --noinhibit-exec flag implemented.
"A Twine is not intended for use directly and should not be stored, its implementation relies on the ability to store pointers to temporary stack objects which may be deallocated at the end of a statement" (http://llvm.org/docs/doxygen/html/classllvm_1_1Twine.html#details)
So make this an std::string rather than a Tiwne.
BTW, is this guaranteed to be safe? I think we currently do not expect any undefined symbols to appear in Writer because we abort early if such symbol exists. This patch changes that assumption.
In COFF, we overwrite undefined symbols with absolute symbols with value 0 if /force (Windows option for -no-inhibit-exec). Maybe we should do that?
Just a few fixes.
This should be fine from the writer perspective since we are already handling weak undefined symbols.
I think you can write this as
std::string Error = "undefined symbol: " + Sym.getName();
Error += " in " ...
Also run llvm-objdump -d to check what we produce.
You don't need this part
I tried to apply it but failed:
bool NoInhibitExec = false;
/Users/espindola/Downloads/D13138.diff.txt:21: trailing whitespace.
/Users/espindola/Downloads/D13138.diff.txt:22: trailing whitespace.
Config->NoInhibitExec = true;
/Users/espindola/Downloads/D13138.diff.txt:23: trailing whitespace.
/Users/espindola/Downloads/D13138.diff.txt:35: trailing whitespace.
error: patch failed: ELF/Config.h:24
error: ELF/Config.h: patch does not apply
Can you email me a git generated patch directly?