This is an archive of the discontinued LLVM Phabricator instance.

[wip][mips] Correct jal expansion for local symbols in .local directives.
ClosedPublic

Authored by dsanders on Aug 15 2016, 2:00 AM.

Details

Reviewers
seanbruno
Summary

(off-list for now since it doesn't work correctly when -save-temps or
-via-file-asm are used. I'm not sure how to fix that yet.)

This patch corrects the behaviour of code such as:

  .local foo
  jal foo
foo:

to use the correct jal expansion but only when writing ELF files and not when
emitting assembly. The problem lies in the behaviour of MCAsmStreamer vs
MCELFStreamer. MCAsmStreamer emits a '.local foo' directive but doesn't update
the symbol in any way, while MCELFStreamer marks the symbol not-external and
sets the binding to STB_LOCAL.

Diff Detail

Event Timeline

dsanders updated this revision to Diff 68005.Aug 15 2016, 2:00 AM
dsanders retitled this revision from to [wip][mips] Correct jal expansion for local symbols in .local directives..
dsanders updated this object.
dsanders added subscribers: seanbruno, sdardis.

I'll give this a spin today.

seanbruno accepted this revision.Aug 15 2016, 7:00 AM
seanbruno added a reviewer: seanbruno.

In combination with other FreeBSD specific patches, this looks good to me.

This revision is now accepted and ready to land.Aug 15 2016, 7:00 AM

I'm content with this, do you want this to land?

I'll take a look at this and see if I can resolve the issue Daniel mentioned.

sdardis closed this revision.Sep 19 2016, 5:24 AM

D24722 contains the updated version of this patch and posts it to the list.