Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Issue 678533005: Subzero: Add basic ELFObjectWriter (text section, symtab, strtab, headers) (Closed)

Created:
6 years, 2 months ago by jvoung (off chromium)
Modified:
6 years ago
Reviewers:
kschimpf, Jim Stichnoth
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Visibility:
Public.

Description

Subzero: Add basic ELFObjectWriter (text section, symtab, strtab, headers). Able to write out the ELF file header w/ a text section, a symbol table, and string table. Write text buffer directly to file after translating each CFG. This means that the header is written out early w/ fake data and then we seek back and write the real header at the very end. Does not yet handle relocations, data, rodata, constant pools, bss, or -ffunction-sections, more than 64K sections or more than 2^24 symbols. Numbers w/ current NOASSERT=1 build on 176.gcc: w/out -elf-writer: 0.233771 (21.1%): [ 1287] emit 28MB .s file w/ -elf-writer: 0.051056 ( 5.6%): [ 1287] emit 2.4MB .o file BUG=none R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=08c3bcd66dc0101720da78c1d5f49230f4521c75

Patch Set 1 #

Patch Set 2 : elf_container.ll, fix OSABI #

Patch Set 3 : write to file as we go #

Patch Set 4 : align the section too #

Patch Set 5 : cleanup #

Total comments: 1

Patch Set 6 : stuff #

Total comments: 46

Patch Set 7 : part of review #

Patch Set 8 : rest of review -- one line #

Patch Set 9 : comment fix #

Patch Set 10 : rebase for llvm 3.5 #

Patch Set 11 : minor cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1601 lines, -227 lines) Patch
M Makefile.standalone View 1 2 3 4 5 6 7 8 9 3 chunks +29 lines, -3 lines 0 comments Download
M src/IceCfg.cpp View 1 2 3 4 5 6 2 chunks +15 lines, -4 lines 0 comments Download
M src/IceClFlags.h View 1 2 3 4 5 1 chunk +7 lines, -6 lines 0 comments Download
M src/IceDefs.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -0 lines 0 comments Download
A src/IceELFObjectWriter.h View 1 2 3 4 5 6 7 8 1 chunk +125 lines, -0 lines 0 comments Download
A src/IceELFObjectWriter.cpp View 1 2 3 4 5 6 1 chunk +347 lines, -0 lines 0 comments Download
A src/IceELFSection.h View 1 2 3 4 5 6 1 chunk +324 lines, -0 lines 0 comments Download
A src/IceELFSection.cpp View 1 2 3 4 5 6 1 chunk +159 lines, -0 lines 0 comments Download
A src/IceELFStreamer.h View 1 2 3 4 5 6 1 chunk +84 lines, -0 lines 0 comments Download
M src/IceGlobalContext.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +5 lines, -2 lines 0 comments Download
M src/IceGlobalContext.cpp View 1 2 3 4 5 1 chunk +6 lines, -3 lines 0 comments Download
D src/IceMemoryRegion.h View 1 1 chunk +0 lines, -90 lines 0 comments Download
D src/IceMemoryRegion.cpp View 1 1 chunk +0 lines, -33 lines 0 comments Download
M src/IceTargetLowering.h View 1 2 3 4 5 6 7 8 9 2 chunks +0 lines, -4 lines 0 comments Download
M src/IceTargetLoweringX8632.h View 1 2 3 4 5 1 chunk +0 lines, -5 lines 0 comments Download
M src/IceTargetLoweringX8632.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M src/IceTranslator.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +7 lines, -2 lines 0 comments Download
M src/IceTypes.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/IceTypes.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M src/IceTypes.def View 1 2 3 4 5 6 1 chunk +12 lines, -7 lines 0 comments Download
M src/assembler.h View 1 2 3 4 5 chunks +12 lines, -11 lines 0 comments Download
M src/assembler.cpp View 1 2 3 4 3 chunks +5 lines, -20 lines 0 comments Download
M src/assembler_ia32.h View 1 2 3 chunks +9 lines, -10 lines 0 comments Download
M src/assembler_ia32.cpp View 1 2 3 4 5 3 chunks +16 lines, -8 lines 0 comments Download
M src/llvm2ice.cpp View 1 2 3 4 5 6 7 8 9 7 chunks +55 lines, -16 lines 0 comments Download
A tests_lit/llvm2ice_tests/elf_container.ll View 1 2 3 4 5 1 chunk +242 lines, -0 lines 0 comments Download
A unittest/IceELFSectionTest.cpp View 1 2 3 4 5 6 7 1 chunk +134 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (12 generated)
jvoung (off chromium)
https://codereview.chromium.org/678533005/diff/280001/src/IceMemoryRegion.h File src/IceMemoryRegion.h (left): https://codereview.chromium.org/678533005/diff/280001/src/IceMemoryRegion.h#oldcode61 src/IceMemoryRegion.h:61: void CopyFrom(size_t offset, const MemoryRegion &from) const; Ended up ...
6 years, 1 month ago (2014-11-21 00:11:55 UTC) #13
Jim Stichnoth
https://codereview.chromium.org/678533005/diff/320001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/678533005/diff/320001/src/IceCfg.cpp#newcode457 src/IceCfg.cpp:457: // Transfer remaining fixups too. They may need their ...
6 years, 1 month ago (2014-11-21 21:32:23 UTC) #14
jvoung (off chromium)
Thanks! https://codereview.chromium.org/678533005/diff/320001/src/IceCfg.cpp File src/IceCfg.cpp (right): https://codereview.chromium.org/678533005/diff/320001/src/IceCfg.cpp#newcode457 src/IceCfg.cpp:457: // Transfer remaining fixups too. They may need ...
6 years ago (2014-11-24 21:35:47 UTC) #15
jvoung (off chromium)
ping
6 years ago (2014-12-01 19:04:36 UTC) #16
Jim Stichnoth
LGTM. (And sorry for losing track of this.) https://codereview.chromium.org/678533005/diff/320001/src/IceELFObjectWriter.cpp File src/IceELFObjectWriter.cpp (right): https://codereview.chromium.org/678533005/diff/320001/src/IceELFObjectWriter.cpp#newcode80 src/IceELFObjectWriter.cpp:80: isELF64(Ctx.getTargetArch()) ...
6 years ago (2014-12-01 22:41:06 UTC) #17
jvoung (off chromium)
6 years ago (2014-12-02 01:55:21 UTC) #18
Message was sent while issue was closed.
Committed patchset #11 (id:420001) manually as
08c3bcd66dc0101720da78c1d5f49230f4521c75 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698