<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">No worries. Thanks!<br>
--Vassil<br>
On 13/03/16 11:38, Jacques Pienaar wrote:<br>
</div>
<blockquote
cite="mid:CAM4W+YcJa_L3hof8rub8Pcn6FUbBdee1ZmTC15EXVr3HmfVOpQ@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,
<div><br>
</div>
<div>My apologies I didn't see this till now as I was traveling.
I see Eric fixed this in r263319.</div>
<div><br>
</div>
<div>Jacques</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Mar 10, 2016 at 8:19 AM, Vassil
Vassilev <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:v.g.vassilev@gmail.com" target="_blank">v.g.vassilev@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
This broke the llvm selfhost module build (even more?).
Could you add this fix please:<br>
diff --git a/include/llvm/module.modulema<wbr>p
b/include/llvm/module.modulema<wbr>p<br>
index 708d33c..aa7d469 100644<br>
--- a/include/llvm/module.modulema<wbr>p<br>
+++ b/include/llvm/module.modulema<wbr>p<br>
@@ -208,6 +208,7 @@ module LLVM_Utils {<br>
textual header "Support/ELFRelocs/SystemZ.def<wbr>"<br>
textual header "Support/ELFRelocs/x86_64.def"<br>
textual header "Support/ELFRelocs/WebAssembly<wbr>.def"<br>
+ textual header "Support/ELFRelocs/Lanai.def"<br>
}<br>
<br>
// This part of the module is usable from both C and C++
code.<span class="HOEnZb"><font color="#888888"><br>
<br>
--Vassil</font></span>
<div class="HOEnZb">
<div class="h5"><br>
On 01/03/16 22:21, Jacques Pienaar via llvm-commits
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Author: jpienaar<br>
Date: Tue Mar 1 15:21:42 2016<br>
New Revision: 262394<br>
<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project?rev=262394&view=rev"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject?rev=262394&view=rev</a><br>
Log:<br>
[lanai] Add ELF enum value and relocations.<br>
<br>
Add ELF enum value and relocations for Lanai backed.<br>
<br>
General Lanai backend discussion on llvm-dev thread
"[RFC] Lanai backend" (<a moz-do-not-send="true"
href="http://lists.llvm.org/pipermail/llvm-dev/2016-February/095118.html"
rel="noreferrer" target="_blank">http://lists.llvm.org/piperma<wbr>il/llvm-dev/2016-February/<wbr>095118.html</a>).<br>
<br>
Differential Revision: <a moz-do-not-send="true"
href="http://reviews.llvm.org/D17008"
rel="noreferrer" target="_blank">http://reviews.llvm.org/D17008</a><br>
<br>
<br>
Added:<br>
llvm/trunk/include/llvm/Suppo<wbr>rt/ELFRelocs/Lanai.def<br>
llvm/trunk/test/DebugInfo/Inp<wbr>uts/lanai-processes-relocation<wbr>s.elf
(with props)<br>
llvm/trunk/test/DebugInfo/Lan<wbr>ai/<br>
llvm/trunk/test/DebugInfo/Lan<wbr>ai/lit.local.cfg<br>
llvm/trunk/test/DebugInfo/Lan<wbr>ai/processes-relocations.ll<br>
llvm/trunk/test/Object/Lanai/<br>
llvm/trunk/test/Object/Lanai/<wbr>lit.local.cfg<br>
llvm/trunk/test/Object/Lanai/<wbr>yaml2obj-elf-lanai-rel.yaml<br>
llvm/trunk/test/tools/llvm-re<wbr>adobj/Inputs/relocs.obj.elf-la<wbr>nai
(with props)<br>
llvm/trunk/test/tools/llvm-re<wbr>adobj/Inputs/trivial.obj.elf-<wbr>lanai
(with props)<br>
Modified:<br>
llvm/trunk/include/llvm/Objec<wbr>t/ELFObjectFile.h<br>
llvm/trunk/include/llvm/Objec<wbr>t/RelocVisitor.h<br>
llvm/trunk/include/llvm/Suppo<wbr>rt/ELF.h<br>
llvm/trunk/lib/MC/MCObjectFil<wbr>eInfo.cpp<br>
llvm/trunk/lib/Object/ELF.cpp<br>
llvm/trunk/test/tools/llvm-re<wbr>adobj/Inputs/relocs.py<br>
llvm/trunk/test/tools/llvm-re<wbr>adobj/file-headers.test<br>
llvm/trunk/test/tools/llvm-re<wbr>adobj/reloc-types.test<br>
llvm/trunk/tools/llvm-<wbr>objdump/llvm-objdump.cpp<br>
llvm/trunk/tools/llvm-<wbr>readobj/ELFDumper.cpp<br>
<br>
Modified: llvm/trunk/include/llvm/Object<wbr>/ELFObjectFile.h<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/ELFObjectFile.h?rev=262394&r1=262393&r2=262394&view=diff"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/include/llvm/<wbr>Object/ELFObjectFile.h?rev=<wbr>262394&r1=262393&r2=262394&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/include/llvm/Object<wbr>/ELFObjectFile.h
(original)<br>
+++ llvm/trunk/include/llvm/Object<wbr>/ELFObjectFile.h
Tue Mar 1 15:21:42 2016<br>
@@ -835,6 +835,8 @@ StringRef
ELFObjectFile<ELFT>::getFileFo<br>
return "ELF32-avr";<br>
case ELF::EM_HEXAGON:<br>
return "ELF32-hexagon";<br>
+ case ELF::EM_LANAI:<br>
+ return "ELF32-lanai";<br>
case ELF::EM_MIPS:<br>
return "ELF32-mips";<br>
case ELF::EM_PPC:<br>
@@ -891,6 +893,8 @@ unsigned
ELFObjectFile<ELFT>::getArch()<br>
return Triple::avr;<br>
case ELF::EM_HEXAGON:<br>
return Triple::hexagon;<br>
+ case ELF::EM_LANAI:<br>
+ return Triple::lanai;<br>
case ELF::EM_MIPS:<br>
switch (EF.getHeader()->e_ident[ELF::<wbr>EI_CLASS])
{<br>
case ELF::ELFCLASS32:<br>
<br>
Modified: llvm/trunk/include/llvm/Object<wbr>/RelocVisitor.h<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/RelocVisitor.h?rev=262394&r1=262393&r2=262394&view=diff"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/include/llvm/<wbr>Object/RelocVisitor.h?rev=<wbr>262394&r1=262393&r2=262394&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/include/llvm/Object<wbr>/RelocVisitor.h
(original)<br>
+++ llvm/trunk/include/llvm/Object<wbr>/RelocVisitor.h
Tue Mar 1 15:21:42 2016<br>
@@ -175,6 +175,14 @@ private:<br>
case llvm::ELF::R_ARM_ABS32:<br>
return visitELF_ARM_ABS32(R, Value);<br>
}<br>
+ case Triple::lanai:<br>
+ switch (RelocType) {<br>
+ case llvm::ELF::R_LANAI_32:<br>
+ return visitELF_Lanai_32(R, Value);<br>
+ default:<br>
+ HasError = true;<br>
+ return RelocToApply();<br>
+ }<br>
case Triple::mipsel:<br>
case Triple::mips:<br>
switch (RelocType) {<br>
@@ -309,6 +317,13 @@ private:<br>
int64_t Addend = getELFAddend(R);<br>
uint32_t Res = (Value + Addend) &
0xFFFFFFFF;<br>
return RelocToApply(Res, 4);<br>
+ }<br>
+<br>
+ /// Lanai ELF<br>
+ RelocToApply visitELF_Lanai_32(RelocationRe<wbr>f
R, uint64_t Value) {<br>
+ int64_t Addend = getELFAddend(R);<br>
+ uint32_t Res = (Value + Addend) & 0xFFFFFFFF;<br>
+ return RelocToApply(Res, 4);<br>
}<br>
/// MIPS ELF<br>
<br>
Modified: llvm/trunk/include/llvm/Suppor<wbr>t/ELF.h<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ELF.h?rev=262394&r1=262393&r2=262394&view=diff"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/include/llvm/<wbr>Support/ELF.h?rev=262394&r1=<wbr>262393&r2=262394&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/include/llvm/Suppor<wbr>t/ELF.h
(original)<br>
+++ llvm/trunk/include/llvm/Suppor<wbr>t/ELF.h Tue
Mar 1 15:21:42 2016<br>
@@ -315,6 +315,11 @@ enum {<br>
// such numbers for an official value for
WebAssembly. As soon as one is<br>
// allocated, this enum will be updated to use it.<br>
EM_WEBASSEMBLY = 0x4157, // WebAssembly
architecture<br>
+<br>
+ // A request has been made to the maintainer of the
official registry for<br>
+ // an official value for Lanai. As soon as one is
allocated, this enum will be<br>
+ // updated to use it.<br>
+ EM_LANAI = 0x8123, // Lanai 32-bit
processor<br>
};<br>
// Object file classes.<br>
@@ -589,6 +594,11 @@ enum {<br>
#include "ELFRelocs/Hexagon.def"<br>
};<br>
+// ELF Relocation type for Lanai.<br>
+enum {<br>
+#include "ELFRelocs/Lanai.def"<br>
+};<br>
+<br>
// ELF Relocation types for S390/zSeries<br>
enum {<br>
#include "ELFRelocs/SystemZ.def"<br>
<br>
Added: llvm/trunk/include/llvm/Suppor<wbr>t/ELFRelocs/Lanai.def<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/ELFRelocs/Lanai.def?rev=262394&view=auto"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/include/llvm/<wbr>Support/ELFRelocs/Lanai.def?<wbr>rev=262394&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/include/llvm/Suppor<wbr>t/ELFRelocs/Lanai.def
(added)<br>
+++ llvm/trunk/include/llvm/Suppor<wbr>t/ELFRelocs/Lanai.def
Tue Mar 1 15:21:42 2016<br>
@@ -0,0 +1,19 @@<br>
+<br>
+#ifndef ELF_RELOC<br>
+#error "ELF_RELOC must be defined"<br>
+#endif<br>
+<br>
+// No relocation<br>
+ELF_RELOC(R_LANAI_NONE, 0)<br>
+// 21-bit symbol relocation<br>
+ELF_RELOC(R_LANAI_21, 1)<br>
+// 21-bit symbol relocation with last two bits masked
to 0<br>
+ELF_RELOC(R_LANAI_21_F, 2)<br>
+// 25-bit branch targets<br>
+ELF_RELOC(R_LANAI_25, 3)<br>
+// General 32-bit relocation<br>
+ELF_RELOC(R_LANAI_32, 4)<br>
+// Upper 16-bits of a symbolic relocation<br>
+ELF_RELOC(R_LANAI_HI16, 5)<br>
+// Lower 16-bits of a symbolic relocation<br>
+ELF_RELOC(R_LANAI_LO16, 6)<br>
<br>
Modified: llvm/trunk/lib/MC/MCObjectFile<wbr>Info.cpp<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectFileInfo.cpp?rev=262394&r1=262393&r2=262394&view=diff"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/lib/MC/MCObje<wbr>ctFileInfo.cpp?rev=262394&r1=<wbr>262393&r2=262394&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/MC/MCObjectFile<wbr>Info.cpp
(original)<br>
+++ llvm/trunk/lib/MC/MCObjectFile<wbr>Info.cpp Tue
Mar 1 15:21:42 2016<br>
@@ -356,6 +356,11 @@ void
MCObjectFileInfo::initELFMCObj<wbr>ectFi<br>
TTypeEncoding = dwarf::DW_EH_PE_absptr;<br>
}<br>
break;<br>
+ case Triple::lanai:<br>
+ LSDAEncoding = dwarf::DW_EH_PE_absptr;<br>
+ PersonalityEncoding = dwarf::DW_EH_PE_absptr;<br>
+ TTypeEncoding = dwarf::DW_EH_PE_absptr;<br>
+ break;<br>
case Triple::mips:<br>
case Triple::mipsel:<br>
case Triple::mips64:<br>
<br>
Modified: llvm/trunk/lib/Object/ELF.cpp<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/ELF.cpp?rev=262394&r1=262393&r2=262394&view=diff"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/lib/Object/EL<wbr>F.cpp?rev=262394&r1=262393&r2=<wbr>262394&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/lib/Object/ELF.cpp (original)<br>
+++ llvm/trunk/lib/Object/ELF.cpp Tue Mar 1 15:21:42
2016<br>
@@ -61,6 +61,13 @@ StringRef
getELFRelocationTypeName(uint3<br>
break;<br>
}<br>
break;<br>
+ case ELF::EM_LANAI:<br>
+ switch (Type) {<br>
+#include "llvm/Support/ELFRelocs/Lanai.<wbr>def"<br>
+ default:<br>
+ break;<br>
+ }<br>
+ break;<br>
case ELF::EM_PPC:<br>
switch (Type) {<br>
#include "llvm/Support/ELFRelocs/PowerP<wbr>C.def"<br>
<br>
Added: llvm/trunk/test/DebugInfo/Inpu<wbr>ts/lanai-processes-relocations<wbr>.elf<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Inputs/lanai-processes-relocations.elf?rev=262394&view=auto"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/DebugInf<wbr>o/Inputs/lanai-processes-<wbr>relocations.elf?rev=262394&<wbr>view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
Binary file - no diff available.<br>
<br>
Propchange: llvm/trunk/test/DebugInfo/Inpu<wbr>ts/lanai-processes-relocations<wbr>.elf<br>
------------------------------<wbr>------------------------------<wbr>------------------<br>
svn:mime-type = application/octet-stream<br>
<br>
Added: llvm/trunk/test/DebugInfo/Lana<wbr>i/lit.local.cfg<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Lanai/lit.local.cfg?rev=262394&view=auto"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/DebugInf<wbr>o/Lanai/lit.local.cfg?rev=<wbr>262394&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/DebugInfo/Lana<wbr>i/lit.local.cfg
(added)<br>
+++ llvm/trunk/test/DebugInfo/Lana<wbr>i/lit.local.cfg
Tue Mar 1 15:21:42 2016<br>
@@ -0,0 +1,2 @@<br>
+if not 'Lanai' in config.root.targets:<br>
+ config.unsupported = True<br>
<br>
Added: llvm/trunk/test/DebugInfo/Lana<wbr>i/processes-relocations.ll<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Lanai/processes-relocations.ll?rev=262394&view=auto"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/DebugInf<wbr>o/Lanai/processes-relocations.<wbr>ll?rev=262394&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/DebugInfo/Lana<wbr>i/processes-relocations.ll
(added)<br>
+++ llvm/trunk/test/DebugInfo/Lana<wbr>i/processes-relocations.ll
Tue Mar 1 15:21:42 2016<br>
@@ -0,0 +1,19 @@<br>
+; RUN: llvm-dwarfdump %p/Inputs/lanai-processes-relo<wbr>cations.elf
2>&1 | FileCheck %s<br>
+<br>
+; FIXME: Use llc with this file as input instead of
binary file.<br>
+; NOTE: this test is currently not using llc, but
using a binary input as the<br>
+; rest of the backend is not yet in tree. Once the
Lanai backend is in tree,<br>
+; the binary file will be removed and this test will
use llc.<br>
+<br>
+; CHECK-NOT: failed to compute relocation<br>
+<br>
+!<a moz-do-not-send="true" href="http://llvm.dbg.cu"
rel="noreferrer" target="_blank">llvm.dbg.cu</a> =
!{!0}<br>
+!llvm.module.flags = !{!3, !4}<br>
+!llvm.ident = !{!5}<br>
+<br>
+!0 = !{i32 786449, !1, i32 12, !"clang version 3.6.0
", i1 false, !"", i32 0, !2, !2, !2, !2, !2, !"", i32
1} ; [ DW_TAG_compile_unit ] [/a/empty.c]
[DW_LANG_C99]<br>
+!1 = !{!"empty.c", !"/a"}<br>
+!2 = !{}<br>
+!3 = !{i32 2, !"Dwarf Version", i32 4}<br>
+!4 = !{i32 2, !"Debug Info Version", i32 3}<br>
+!5 = !{!"clang version 3.6.0 "}<br>
<br>
Added: llvm/trunk/test/Object/Lanai/l<wbr>it.local.cfg<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Lanai/lit.local.cfg?rev=262394&view=auto"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/Object/<wbr>Lanai/lit.local.cfg?rev=<wbr>262394&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/Object/Lanai/l<wbr>it.local.cfg
(added)<br>
+++ llvm/trunk/test/Object/Lanai/l<wbr>it.local.cfg
Tue Mar 1 15:21:42 2016<br>
@@ -0,0 +1,2 @@<br>
+if not 'Lanai' in config.root.targets:<br>
+ config.unsupported = True<br>
<br>
Added: llvm/trunk/test/Object/Lanai/y<wbr>aml2obj-elf-lanai-rel.yaml<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/Lanai/yaml2obj-elf-lanai-rel.yaml?rev=262394&view=auto"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/Object/<wbr>Lanai/yaml2obj-elf-lanai-rel.<wbr>yaml?rev=262394&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/Object/Lanai/y<wbr>aml2obj-elf-lanai-rel.yaml
(added)<br>
+++ llvm/trunk/test/Object/Lanai/y<wbr>aml2obj-elf-lanai-rel.yaml
Tue Mar 1 15:21:42 2016<br>
@@ -0,0 +1,66 @@<br>
+# RUN: yaml2obj -format=elf %s > %t<br>
+# RUN: llvm-readobj -r %t | FileCheck %s<br>
+<br>
+# CHECK : Relocations [<br>
+# CHECK-NEXT: Section (2) .rel.text {<br>
+# CHECK-NEXT: 0x0 R_LANAI_32 main 0x0<br>
+# CHECK-NEXT: 0x4 R_LANAI_NONE - 0x0<br>
+# CHECK-NEXT: 0x8 R_LANAI_21 - 0x0<br>
+# CHECK-NEXT: 0xC R_LANAI_21_F - 0x0<br>
+# CHECK-NEXT: 0x10 R_LANAI_25 - 0x0<br>
+# CHECK-NEXT: 0x14 R_LANAI_HI16 - 0x0<br>
+# CHECK-NEXT: 0x18 R_LANAI_LO16 - 0x0<br>
+# CHECK-NEXT: }<br>
+# CHECK-NEXT: ]<br>
+<br>
+FileHeader:<br>
+ Class: ELFCLASS32<br>
+ Data: ELFDATA2LSB<br>
+ Type: ET_REL<br>
+ Machine: EM_LANAI<br>
+Sections:<br>
+ - Type: SHT_PROGBITS<br>
+ Name: .text<br>
+ Flags: [ SHF_ALLOC, SHF_EXECINSTR ]<br>
+ AddressAlign: 0x04<br>
+ Content: 0000000000000000<br>
+ - Type: SHT_REL<br>
+ Name: .rel.text<br>
+ Link: .symtab<br>
+ Info: .text<br>
+ AddressAlign: 0x04<br>
+ Relocations:<br>
+ - Offset: 0x0<br>
+ Symbol: main<br>
+ Type: R_LANAI_32<br>
+ - Offset: 0x4<br>
+ Symbol: a<br>
+ Type: R_LANAI_NONE<br>
+ - Offset: 0x8<br>
+ Symbol: b<br>
+ Type: R_LANAI_21<br>
+ - Offset: 0xC<br>
+ Symbol: c<br>
+ Type: R_LANAI_21_F<br>
+ - Offset: 0x10<br>
+ Symbol: d<br>
+ Type: R_LANAI_25<br>
+ - Offset: 0x14<br>
+ Symbol: e<br>
+ Type: R_LANAI_HI16<br>
+ - Offset: 0x18<br>
+ Symbol: f<br>
+ Type: R_LANAI_LO16<br>
+<br>
+<br>
+Symbols:<br>
+ Local:<br>
+ - Name: .text<br>
+ Type: STT_SECTION<br>
+ Section: .text<br>
+<br>
+ Global:<br>
+ - Name: main<br>
+ Type: STT_FUNC<br>
+ Section: .text<br>
+ Size: 0x08<br>
<br>
Added: llvm/trunk/test/tools/llvm-rea<wbr>dobj/Inputs/relocs.obj.elf-lan<wbr>ai<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/Inputs/relocs.obj.elf-lanai?rev=262394&view=auto"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/tools/ll<wbr>vm-readobj/Inputs/relocs.obj.<wbr>elf-lanai?rev=262394&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
Binary file - no diff available.<br>
<br>
Propchange: llvm/trunk/test/tools/llvm-rea<wbr>dobj/Inputs/relocs.obj.elf-lan<wbr>ai<br>
------------------------------<wbr>------------------------------<wbr>------------------<br>
svn:mime-type = application/octet-stream<br>
<br>
Modified: llvm/trunk/test/tools/llvm-rea<wbr>dobj/Inputs/relocs.py<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/Inputs/relocs.py?rev=262394&r1=262393&r2=262394&view=diff"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/tools/ll<wbr>vm-readobj/Inputs/relocs.py?re<wbr>v=262394&r1=262393&r2=262394&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/tools/llvm-rea<wbr>dobj/Inputs/relocs.py
(original)<br>
+++ llvm/trunk/test/tools/llvm-rea<wbr>dobj/Inputs/relocs.py
Tue Mar 1 15:21:42 2016<br>
@@ -991,6 +991,14 @@ class Relocs_Elf_Hexagon(Enum):<br>
R_HEX_TPREL_16_X = 84<br>
R_HEX_TPREL_11_X = 85<br>
+class Relocs_Elf_Lanai(Enum):<br>
+ R_LANAI_NONE = 0<br>
+ R_LANAI_21 = 1<br>
+ R_LANAI_21_F = 2<br>
+ R_LANAI_25 = 3<br>
+ R_LANAI_32 = 4<br>
+ R_LANAI_HI16 = 5<br>
+ R_LANAI_LO16 = 6<br>
class Relocs_Coff_i386(Enum):<br>
IMAGE_REL_I386_ABSOLUTE = 0x0000<br>
@@ -1103,6 +1111,7 @@ craftElf("relocs.obj.elf-arm",<wbr>
"arm<br>
craftElf("relocs.obj.elf-mips"<wbr>,
"mips-unknown-linux",
Relocs_Elf_Mips.entries(), "lui $2, %hi(sym)")<br>
craftElf("relocs.obj.elf-mips6<wbr>4el",
"mips64el-unknown-linux",
Relocs_Elf_Mips.entries(), "lui $2, %hi(sym)")<br>
#craftElf("relocs.obj.elf-hexa<wbr>gon",
"hexagon-unknown-unknown",
Relocs_Elf_Hexagon.entries(), ...)<br>
+#craftElf("relocs.obj.elf-lan<wbr>ai",
"lanai-unknown-unknown",
Relocs_Elf_Lanai.entries(), "mov hi(x), %r4")<br>
craftCoff("relocs.obj.coff-i38<wbr>6",
"i386-pc-win32", Relocs_Coff_i386.entries(), "mov
foo@imgrel(%ebx, %ecx, 4), %eax")<br>
craftCoff("relocs.obj.coff-x86<wbr>_64",
"x86_64-pc-win32", Relocs_Coff_X86_64.entries(), "mov
foo@imgrel(%ebx, %ecx, 4), %eax")<br>
<br>
Added: llvm/trunk/test/tools/llvm-rea<wbr>dobj/Inputs/trivial.obj.elf-<wbr>lanai<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/Inputs/trivial.obj.elf-lanai?rev=262394&view=auto"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/tools/ll<wbr>vm-readobj/Inputs/trivial.obj.<wbr>elf-lanai?rev=262394&view=auto</a><br>
==============================<wbr>==============================<wbr>==================<br>
Binary file - no diff available.<br>
<br>
Propchange: llvm/trunk/test/tools/llvm-rea<wbr>dobj/Inputs/trivial.obj.elf-<wbr>lanai<br>
------------------------------<wbr>------------------------------<wbr>------------------<br>
svn:mime-type = application/octet-stream<br>
<br>
Modified: llvm/trunk/test/tools/llvm-rea<wbr>dobj/file-headers.test<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/file-headers.test?rev=262394&r1=262393&r2=262394&view=diff"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/tools/ll<wbr>vm-readobj/file-headers.test?<wbr>rev=262394&r1=262393&r2=262394<wbr>&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/tools/llvm-rea<wbr>dobj/file-headers.test
(original)<br>
+++ llvm/trunk/test/tools/llvm-rea<wbr>dobj/file-headers.test
Tue Mar 1 15:21:42 2016<br>
@@ -24,6 +24,8 @@ RUN: llvm-readobj -h
%p/Inputs/magic.cof<br>
RUN: | FileCheck %s -check-prefix COFF-UNKNOWN<br>
RUN: llvm-readobj -h %p/Inputs/magic.coff-importlib
\<br>
RUN: | FileCheck %s -check-prefix COFF-IMPORTLIB<br>
+RUN: llvm-readobj -h %p/Inputs/trivial.obj.elf-lana<wbr>i
\<br>
+RUN: | FileCheck %s -check-prefix ELF-LANAI<br>
COFF-ARM: File:
{{(.*[/\\])?}}trivial.obj.coff<wbr>-arm<br>
COFF-ARM-NEXT: Format: COFF-ARM<br>
@@ -335,3 +337,33 @@ COFF-IMPORTLIB-NEXT: Type: code<br>
COFF-IMPORTLIB-NEXT: Name type: noprefix<br>
COFF-IMPORTLIB-NEXT: Symbol: __imp__func<br>
COFF-IMPORTLIB-NEXT: Symbol: _func<br>
+<br>
+ELF-LANAI: Format: ELF32-lanai<br>
+ELF-LANAI-NEXT: Arch: lanai<br>
+ELF-LANAI-NEXT: AddressSize: 32bit<br>
+ELF-LANAI-NEXT: LoadName:<br>
+ELF-LANAI-NEXT: ElfHeader {<br>
+ELF-LANAI-NEXT: Ident {<br>
+ELF-LANAI-NEXT: Magic: (7F 45 4C 46)<br>
+ELF-LANAI-NEXT: Class: 32-bit (0x1)<br>
+ELF-LANAI-NEXT: DataEncoding: BigEndian (0x2)<br>
+ELF-LANAI-NEXT: FileVersion: 1<br>
+ELF-LANAI-NEXT: OS/ABI: SystemV (0x0)<br>
+ELF-LANAI-NEXT: ABIVersion: 0<br>
+ELF-LANAI-NEXT: Unused: (00 00 00 00 00 00 00)<br>
+ELF-LANAI-NEXT: }<br>
+ELF-LANAI-NEXT: Type: Relocatable (0x1)<br>
+ELF-LANAI-NEXT: Machine: EM_LANAI (0x8123)<br>
+ELF-LANAI-NEXT: Version: 1<br>
+ELF-LANAI-NEXT: Entry: 0x0<br>
+ELF-LANAI-NEXT: ProgramHeaderOffset: 0x0<br>
+ELF-LANAI-NEXT: SectionHeaderOffset: 0x1A0<br>
+ELF-LANAI-NEXT: Flags [ (0x0)<br>
+ELF-LANAI-NEXT: ]<br>
+ELF-LANAI-NEXT: HeaderSize: 52<br>
+ELF-LANAI-NEXT: ProgramHeaderEntrySize: 0<br>
+ELF-LANAI-NEXT: ProgramHeaderCount: 0<br>
+ELF-LANAI-NEXT: SectionHeaderEntrySize: 40<br>
+ELF-LANAI-NEXT: SectionHeaderCount: 8<br>
+ELF-LANAI-NEXT: StringTableSectionIndex: 1<br>
+ELF-LANAI-NEXT: }<br>
<br>
Modified: llvm/trunk/test/tools/llvm-rea<wbr>dobj/reloc-types.test<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/reloc-types.test?rev=262394&r1=262393&r2=262394&view=diff"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/test/tools/ll<wbr>vm-readobj/reloc-types.test?re<wbr>v=262394&r1=262393&r2=262394&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/test/tools/llvm-rea<wbr>dobj/reloc-types.test
(original)<br>
+++ llvm/trunk/test/tools/llvm-rea<wbr>dobj/reloc-types.test
Tue Mar 1 15:21:42 2016<br>
@@ -7,6 +7,7 @@ RUN: llvm-readobj -r -expand-relocs
%p/I<br>
RUN: llvm-readobj -r -expand-relocs
%p/Inputs/relocs.obj.elf-x86_6<wbr>4 | FileCheck %s
-check-prefix ELF-64<br>
RUN: llvm-readobj -r -expand-relocs
%p/Inputs/relocs.obj.elf-aarch<wbr>64 | FileCheck %s
-check-prefix ELF-AARCH64<br>
RUN: llvm-readobj -r -expand-relocs
%p/Inputs/relocs.obj.elf-arm | FileCheck %s
-check-prefix ELF-ARM<br>
+RUN: llvm-readobj -r -expand-relocs
%p/Inputs/relocs.obj.elf-<wbr>lanai | FileCheck %s
-check-prefix ELF-LANAI<br>
RUN: llvm-readobj -r -expand-relocs
%p/Inputs/relocs.obj.elf-mips | FileCheck %s
-check-prefix ELF-MIPS<br>
RUN: llvm-readobj -r -expand-relocs
%p/Inputs/relocs.obj.elf-mips6<wbr>4el | FileCheck %s
-check-prefix ELF-MIPS64EL<br>
RUN: llvm-readobj -r -expand-relocs
%p/Inputs/relocs.obj.elf-<wbr>ppc64 | FileCheck %s
-check-prefix ELF-PPC64<br>
@@ -405,6 +406,14 @@ ELF-ARM: Type:
R_ARM_THM_TLS_DESCSEQ16 (<br>
ELF-ARM: Type: R_ARM_THM_TLS_DESCSEQ32 (130)<br>
ELF-ARM: Type: R_ARM_IRELATIVE (160)<br>
+ELF-LANAI: Type: R_LANAI_NONE (0)<br>
+ELF-LANAI: Type: R_LANAI_21 (1)<br>
+ELF-LANAI: Type: R_LANAI_21_F (2)<br>
+ELF-LANAI: Type: R_LANAI_25 (3)<br>
+ELF-LANAI: Type: R_LANAI_32 (4)<br>
+ELF-LANAI: Type: R_LANAI_HI16 (5)<br>
+ELF-LANAI: Type: R_LANAI_LO16 (6)<br>
+<br>
ELF-MIPS: Type: R_MIPS_NONE (0)<br>
ELF-MIPS: Type: R_MIPS_16 (1)<br>
ELF-MIPS: Type: R_MIPS_32 (2)<br>
<br>
Modified: llvm/trunk/tools/llvm-objdump/<wbr>llvm-objdump.cpp<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp?rev=262394&r1=262393&r2=262394&view=diff"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/tools/llvm-ob<wbr>jdump/llvm-objdump.cpp?rev=262<wbr>394&r1=262393&r2=262394&view=<wbr>diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/tools/llvm-objdump/<wbr>llvm-objdump.cpp
(original)<br>
+++ llvm/trunk/tools/llvm-objdump/<wbr>llvm-objdump.cpp
Tue Mar 1 15:21:42 2016<br>
@@ -476,6 +476,7 @@ static std::error_code
getRelocationValu<br>
res = "Unknown";<br>
}<br>
break;<br>
+ case ELF::EM_LANAI:<br>
case ELF::EM_AARCH64: {<br>
std::string fmtbuf;<br>
raw_string_ostream fmt(fmtbuf);<br>
<br>
Modified: llvm/trunk/tools/llvm-readobj/<wbr>ELFDumper.cpp<br>
URL: <a moz-do-not-send="true"
href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/ELFDumper.cpp?rev=262394&r1=262393&r2=262394&view=diff"
rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-pr<wbr>oject/llvm/trunk/tools/llvm-re<wbr>adobj/ELFDumper.cpp?rev=262394<wbr>&r1=262393&r2=262394&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- llvm/trunk/tools/llvm-readobj/<wbr>ELFDumper.cpp
(original)<br>
+++ llvm/trunk/tools/llvm-readobj/<wbr>ELFDumper.cpp
Tue Mar 1 15:21:42 2016<br>
@@ -769,7 +769,8 @@ static const
EnumEntry<unsigned> ElfMach<br>
ENUM_ENT(EM_78KOR, "EM_78KOR"),<br>
ENUM_ENT(EM_56800EX, "EM_56800EX"),<br>
ENUM_ENT(EM_AMDGPU, "EM_AMDGPU"),<br>
- ENUM_ENT(EM_WEBASSEMBLY, "EM_WEBASSEMBLY")<br>
+ ENUM_ENT(EM_WEBASSEMBLY, "EM_WEBASSEMBLY"),<br>
+ ENUM_ENT(EM_LANAI, "EM_LANAI"),<br>
};<br>
static const EnumEntry<unsigned>
ElfSymbolBindings[] = {<br>
<br>
<br>
______________________________<wbr>_________________<br>
llvm-commits mailing list<br>
<a moz-do-not-send="true"
href="mailto:llvm-commits@lists.llvm.org"
target="_blank">llvm-commits@lists.llvm.org</a><br>
<a moz-do-not-send="true"
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits"
rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-commits</a><br>
</blockquote>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>