This is an archive of the discontinued LLVM Phabricator instance.

Don't create a dummy ELF to process a binary file
ClosedPublic

Authored by rafael on Oct 26 2016, 2:15 PM.

Details

Reviewers
ruiu
Summary

Now that it is easy to create input section and symbols, this is simple.

Diff Detail

Event Timeline

rafael updated this revision to Diff 75950.Oct 26 2016, 2:15 PM
rafael retitled this revision from to Don't create a dummy ELF to process a binary file.
rafael updated this object.
rafael added a reviewer: ruiu.
rafael added a subscriber: llvm-commits.
ruiu added inline comments.Oct 26 2016, 2:24 PM
ELF/Config.h
72 ↗(On Diff #75950)

Do we still need this FirstELF?

ELF/InputFiles.cpp
802–805

Do you think you can move the logic to inferMachineType in Driver.cpp?

824–827

Nice!

ELF/InputSection.h
239–240

If you add a new constructor, can you remove this instead?

ELF/SymbolTable.h
77–78

Is there any way to reduce the number of overloaded functions here? I want to avoid having a bunch of functions that do basically the same thing.

rafael updated this revision to Diff 76010.Oct 27 2016, 5:44 AM
emaste added a subscriber: emaste.Oct 27 2016, 5:53 AM

Love this change.

rafael updated this revision to Diff 76021.Oct 27 2016, 7:16 AM
ruiu accepted this revision.Oct 27 2016, 9:39 AM
ruiu edited edge metadata.

LGTM

This revision is now accepted and ready to land.Oct 27 2016, 9:39 AM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in rL285322.

ELF/CMakeLists.txt