This is an archive of the discontinued LLVM Phabricator instance.

Split-stack support for cross-linking shared-libraries.
ClosedPublic

Authored by saugustine on Aug 6 2018, 5:30 PM.

Details

Event Timeline

saugustine created this revision.Aug 6 2018, 5:30 PM
grimar added a comment.EditedAug 7 2018, 12:57 AM
  • x86-64-split-stack-prologue-adjust-success.s differs only in a white space. Please revert.
  • It feels that x86-64-split-stack-prologue-adjust-shared.s can be simpler. Since you are testing the call of function from a shared library, I would expect one main file .s and one dso file with a single call from main .s perhaps. Can it be done in that way?
ELF/InputSection.cpp
920

You do not need curly braces here:

if (Defined *D = dyn_cast<Defined>(Rel.Sym))
  if (InputSection *IS = cast_or_null<InputSection>(D->Section))
    if (!IS || IS->getFile<ELFT>()->SplitStack)
      continue;
test/ELF/x86-64-split-stack-prologue-adjust-shared.s
20

Since this test case is new, I wonder if it really needs the duplicated and/or various calls,
I think this part was copy pasted and probably is excessive.

30

ldd -> lld

saugustine marked 3 inline comments as done.Aug 7 2018, 10:56 AM

Thanks for the feedback, please take another look if you would.

Cleanup test case.

grimar added inline comments.Aug 9 2018, 12:38 AM
test/ELF/x86-64-split-stack-prologue-adjust-shared.s
7

What I not understand is why do you need this file here?
You have a caller (x86-64-split-stack-prologue-adjust-shared.s) and a shared library (x86-64-split-stack-extra.s),
is not that enough for testing the call?

Also, why do you have to use -z notext below?

I was able to remove both the file and the option and test case still passed for me.
So could you please reduce it to minimal possible? That is the desired way to write the test cases we are trying to follow usually.

saugustine marked an inline comment as done.Aug 9 2018, 2:45 PM

Thanks for the review. I apologize for not producing something sufficiently minimal on the previous round.

saugustine updated this revision to Diff 160015.Aug 9 2018, 2:46 PM

Further minimize the test case.

grimar accepted this revision.Aug 9 2018, 11:36 PM

LGTM. Please wait for the Rui's opinion as well.

This revision is now accepted and ready to land.Aug 9 2018, 11:36 PM
ruiu accepted this revision.Aug 10 2018, 10:42 AM

LGTM