This is an archive of the discontinued LLVM Phabricator instance.

[ELF/AArch64] Accept -m aarch64linux.
ClosedPublic

Authored by ikudrin on Nov 19 2015, 10:33 AM.

Details

Summary

This option is passed by clang driver if the target triple is aarch64-unknown-linux.

Diff Detail

Repository
rL LLVM

Event Timeline

ikudrin updated this revision to Diff 40674.Nov 19 2015, 10:33 AM
ikudrin retitled this revision from to [ELF/AArch64] Accept -m aarch64linux..
ikudrin updated this object.
ikudrin added a reviewer: ruiu.
ikudrin added a project: lld.
ikudrin added a subscriber: llvm-commits.
ruiu edited edge metadata.Nov 19 2015, 10:35 AM

Do you know why the flag is so inconsistent? (Naturally I expected something like elf_aarch64.)

$ aarch64-linux-gnu-ld -V
GNU ld (GNU Binutils for Ubuntu) 2.25
  Supported emulations:
   aarch64linux
   aarch64elf
   aarch64elf32
   aarch64elf32b
   aarch64elfb
   armelf
   armelfb
   aarch64linuxb
   aarch64linux32
   aarch64linux32b
   armelfb_linux_eabi
   armelf_linux_eabi

As far as I know, "aarch64linux" is the only variant sent by clang. And if the triple is "aarch64-pc-freebsd" it doesn't pass "-m" switch at all.

ruiu accepted this revision.Nov 19 2015, 1:14 PM
ruiu edited edge metadata.

LGTM with a nti.

test/ELF/emulation.s
167–173 ↗(On Diff #40674)

Remove these lines as the other test cases doesn't test these fields.

This revision is now accepted and ready to land.Nov 19 2015, 1:14 PM
ikudrin added inline comments.Nov 19 2015, 5:44 PM
test/ELF/emulation.s
167–173 ↗(On Diff #40674)

As far as I can see, both X86-64 and PPC64 have the same lines, X86 has similar lines and only MIPS and MIPSEL miss them.

ruiu added inline comments.Nov 19 2015, 5:46 PM
test/ELF/emulation.s
167–173 ↗(On Diff #40674)

Then maybe we should remove from them too? I think the purpose of this test is to test is Machine field, so checking values of miscellaneous Size fields seem excessive.

ikudrin added inline comments.Nov 19 2015, 6:19 PM
test/ELF/emulation.s
167–173 ↗(On Diff #40674)

OK, but I don't think that cleaning the other cases is relevant to this patch.

ruiu added inline comments.Nov 19 2015, 6:20 PM
test/ELF/emulation.s
167–173 ↗(On Diff #40674)

Agreed. This should be done in another patch.

This revision was automatically updated to reflect the committed changes.