This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Allow specifying the stack size
ClosedPublic

Authored by phosek on Aug 15 2016, 6:15 PM.

Details

Summary

This option can be used to set the size of the initial stack by setting the size of the PT_GNU_STACK segment.

Diff Detail

Event Timeline

phosek updated this revision to Diff 68123.Aug 15 2016, 6:15 PM
phosek retitled this revision from to [ELF] Allow specifying the stack size.
phosek updated this object.
phosek added reviewers: ruiu, rafael.
phosek added a project: lld.
phosek added a subscriber: llvm-commits.
phosek updated this revision to Diff 68124.Aug 15 2016, 6:17 PM
ruiu accepted this revision.Aug 16 2016, 1:35 PM
ruiu edited edge metadata.

LGTM with nits.

ELF/Config.h
117

Sort.

ELF/Driver.cpp
260

getZOptionValue would be a better name because this function returns a value.

264–265

You can merge the two ifs.

413

Nit: remove {}.

test/ELF/zstack-size.s
11–47

These program headers are not relevant, so please remove.

This revision is now accepted and ready to land.Aug 16 2016, 1:35 PM
phosek updated this revision to Diff 68300.Aug 16 2016, 7:51 PM
phosek edited edge metadata.
phosek marked 4 inline comments as done.
phosek added inline comments.Aug 17 2016, 10:44 AM
ELF/Config.h
117

Isn't this already sorted (relative to other Z fields)?

ruiu added a comment.Aug 17 2016, 11:37 AM

LGTM wtih this change.

ELF/Config.h
117

But other members are sorted by type, too. See ImageBase below.

phosek updated this revision to Diff 68399.Aug 17 2016, 12:35 PM
phosek added inline comments.
ELF/Config.h
117

I missed the sorting by type.

This revision was automatically updated to reflect the committed changes.