This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Do not create 4gb output when -obinary -Ttext and -omagic used together. (variant 2)
AbandonedPublic

Authored by grimar on Nov 29 2016, 4:33 AM.

Details

Reviewers
ruiu
rafael
Summary

This is the same like D27200 but uses a different approach.
D27200 eliminates the excessive PT_LOAD, but this one has less changes.
What does look better ?

Diff Detail

Event Timeline

grimar updated this revision to Diff 79539.Nov 29 2016, 4:33 AM
grimar retitled this revision from to [ELF] - Do not create 4gb output when -obinary -Ttext and -omagic used together. (variant 2).
grimar updated this object.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar, evgeny777, emaste.
emaste added inline comments.Nov 29 2016, 6:44 AM
ELF/Writer.cpp
1239

It seems a tad confusing. Could we avoid adding an empty PT_LOAD? To me, having the extra complexity in createPhdrs instead of here would make the overall operation more clear.

test/ELF/oformat-binary-ttext.s
7–9

If there's only one, use regular CHECK, CHECK-NEXT?

emaste added inline comments.Nov 29 2016, 6:46 AM
ELF/Writer.cpp
1239

Oh, now I understand, and will comment in D27200.

grimar added inline comments.Nov 29 2016, 6:46 AM
ELF/Writer.cpp
1239

That what I do in D27200 :)

test/ELF/oformat-binary-ttext.s
7–9

Ok.

grimar abandoned this revision.Dec 2 2016, 5:40 AM

I'll post different solution.