This is an archive of the discontinued LLVM Phabricator instance.

[ELF][MIPS] Remove support for linking microMIPS 64-bit code
ClosedPublic

Authored by atanasyan on Jul 4 2018, 11:59 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

atanasyan created this revision.Jul 4 2018, 11:59 AM
grimar accepted this revision.Jul 5 2018, 2:28 AM

LGTM.

ELF/Arch/MipsArchTree.cpp
79 ↗(On Diff #154144)

This seems to be easier just to check all the files and inline, maybe?

 for (const FileFlags &F : Files) {
     if (Config->Is64 && F.Flags & EF_MIPS_MICROMIPS)
       error("linking microMIPS 64-bit files is unsupported: " + toString(F.File));
...

Up to you, though.

This revision is now accepted and ready to land.Jul 5 2018, 2:28 AM
atanasyan added inline comments.Jul 5 2018, 3:06 AM
ELF/Arch/MipsArchTree.cpp
79 ↗(On Diff #154144)

The loop iterates through all input files except the first one because initial purpose of the loop was to to check compatibility between files and the first file used as a reference. That's why I have to write the checking code before and inside the loop. But I think we can iterate through all the files including the first one. In that case we check compatibility between the first file and itself, but it's not a problem.

I'm going to commit this patch as is (thanks for review) and after that refactor this code.

grimar added inline comments.Jul 5 2018, 3:08 AM
ELF/Arch/MipsArchTree.cpp
79 ↗(On Diff #154144)

Yes, that is what I meant. Checking the first file with itself should not be a problem.

This revision was automatically updated to reflect the committed changes.
lld/trunk/test/ELF/mips-micro-got64.s