Page MenuHomePhabricator

[mips][microMIPS] Relocate with symbol for micromips function symbols
ClosedPublic

Authored by zoran.jovanovic on Dec 29 2014, 7:44 AM.

Details

Summary

Section name is not marked as microMIPS, thus for function symbols relocations should use symbol - not section name.

Diff Detail

Repository
rL LLVM

Event Timeline

zoran.jovanovic retitled this revision from to [mips][microMIPS] Relocate with symbol for micromips function symbols.
zoran.jovanovic updated this object.
zoran.jovanovic edited the test plan for this revision. (Show Details)
zoran.jovanovic added a reviewer: sstankovic.
zoran.jovanovic added a subscriber: Unknown Object (MLST).

Labels also relocated with the symbol.

sstankovic added inline comments.Dec 30 2014, 5:35 AM
test/MC/Mips/micromips-func-addr.s
11 ↗(On Diff #17714)

You can reorder instructions and rename foo to L1 so that it is more obvious that two symbols in the test are function and label. For example (I also marked .4byte directives with .data):

  .set    micromips
  .type   bar,@function
bar:
L1:
  nop

  .data
  .4byte bar
  .4byte L1

Test case modified according to review.

sstankovic edited edge metadata.Dec 30 2014, 7:22 AM

LGTM, with a change.

lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
14 ↗(On Diff #17717)

Place MCELF.h before MCELFObjectWriter.h because it precedes in alphabetical order.

sstankovic accepted this revision.Dec 30 2014, 7:23 AM
sstankovic edited edge metadata.
This revision is now accepted and ready to land.Dec 30 2014, 7:23 AM
This revision was automatically updated to reflect the committed changes.