Assemble calls to constant addresses.
Finally address this TODO in the assembler. This will help translate
non-IRT using programs (no ABI stability). The default scons testing
mode is non-IRT, so this helps with that. I haven't actually tested
this against scons yet, but I'm filling in the tests based on how
LLVM translates the same bitcode.
The filetype=asm is adjusted to omit the "*" and the "$".
The filetype=obj is adjusted to check for fixups with NullSymbols,
and also fill the assembler buffer at the instruction's immediate
field w/ the right constant.
The filetype=iasm is still TODO (hits an new assert in the Fixup's emit() function).
Reverts 7ad1bed99d058199a3ba246a5383458518596fbc:
"Allow stubbing of called constant addresses using command line argument."
since this is now handled (except for iasm).
BUG= https://code.google.com/p/nativeclient/issues/detail?id=4080
R=stichnot@chromium.org
Review URL: https://codereview.chromium.org/1017373002
diff --git a/src/IceELFObjectWriter.cpp b/src/IceELFObjectWriter.cpp
index 230848c..073163a 100644
--- a/src/IceELFObjectWriter.cpp
+++ b/src/IceELFObjectWriter.cpp
@@ -84,10 +84,7 @@
"Elf_Sym sizes cannot be derived from sizeof");
SymTab = createSection<ELFSymbolTableSection>(SymTabName, SHT_SYMTAB, 0,
SymTabAlign, SymTabEntSize);
- // The first entry in the symbol table should be a NULL entry.
- const IceString NullSymName("");
- SymTab->createDefinedSym(NullSymName, STT_NOTYPE, STB_LOCAL, NullSection, 0,
- 0);
+ SymTab->createNullSymbol(NullSection);
const IceString StrTabName(".strtab");
StrTab =