[PATCH] D107748: [MC][ELF] Mark Solaris objects as ELFOSABI_SOLARIS
Rainer Orth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 12 04:45:52 PDT 2021
ro updated this revision to Diff 365967.
ro added a comment.
Herald added a subscriber: emaste.
Add testcase.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107748/new/
https://reviews.llvm.org/D107748
Files:
llvm/include/llvm/MC/MCELFObjectWriter.h
llvm/test/MC/ELF/osabi-solaris.s
Index: llvm/test/MC/ELF/osabi-solaris.s
===================================================================
--- /dev/null
+++ llvm/test/MC/ELF/osabi-solaris.s
@@ -0,0 +1,5 @@
+# REQUIRES: x86-registered-target
+# RUN: llvm-mc -filetype=obj -triple amd64-solaris %s | llvm-readobj -hS - | FileCheck %s
+# CHECK: OS/ABI: Solaris
+
+.text
Index: llvm/include/llvm/MC/MCELFObjectWriter.h
===================================================================
--- llvm/include/llvm/MC/MCELFObjectWriter.h
+++ llvm/include/llvm/MC/MCELFObjectWriter.h
@@ -78,6 +78,8 @@
case Triple::PS4:
case Triple::FreeBSD:
return ELF::ELFOSABI_FREEBSD;
+ case Triple::Solaris:
+ return ELF::ELFOSABI_SOLARIS;
default:
return ELF::ELFOSABI_NONE;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107748.365967.patch
Type: text/x-patch
Size: 780 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210812/61a73045/attachment.bin>
More information about the llvm-commits
mailing list