OSDN Git Service

Start writing out some relocation sections (text).
authorJan Voung <jvoung@chromium.org>
Tue, 13 Jan 2015 01:00:22 +0000 (17:00 -0800)
committerJan Voung <jvoung@chromium.org>
Tue, 13 Jan 2015 01:00:22 +0000 (17:00 -0800)
commitec27073120be04bf6234a0742e40ae3454ef9d3f
tree7110c9ccf3fef83ea7b24c871a86d130c7c1af75
parente34d79de478531fc07b6844c51bb7214cd5ed320
Start writing out some relocation sections (text).

Pass the full assembler pointer to the elf writer, so
that it has access to both the text buffer and the fixups.

Remove some child classes of AssemblerFixups. They didn't
really do much, and were pretty much identical to the
original AssemblerFixup class. Dart had a virtual method
for fixups to do necessary patching, but we currently
don't do the patching and just emit the relocations.
TODO see if patching is more efficient than writing out
relocations and letting the linker do the work.

This CL also makes AssemblerFixups POD.

Change the fixup kind to be a plain unsigned int, which
the target can fill w/ target/container-specific values.

Move the fwd declaration of Assembler to IceDefs and remove
the others. Do similar for fwd declaration refactoring for
ELFWriter.

Make the createAssembler method return a std::unique_ptr.

BUG=none
R=stichnot@chromium.org

Review URL: https://codereview.chromium.org/828873002
21 files changed:
Makefile.standalone
src/IceCfg.cpp
src/IceDefs.h
src/IceELFObjectWriter.cpp
src/IceELFObjectWriter.h
src/IceELFSection.cpp
src/IceELFSection.h
src/IceFixups.cpp [new file with mode: 0644]
src/IceFixups.h
src/IceGlobalContext.cpp
src/IceGlobalContext.h
src/IceInstX8632.cpp
src/IceTargetLowering.cpp
src/IceTargetLowering.h
src/IceTargetLoweringX8632.cpp
src/assembler.cpp
src/assembler.h
src/assembler_ia32.cpp
src/assembler_ia32.h
src/llvm2ice.cpp
tests_lit/llvm2ice_tests/elf_container.ll