[llvm] r353062 - [WebAssembly] Rename relocations from R_WEBASSEMBLY_ to R_WASM_
Sam Clegg via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 4 09:28:46 PST 2019
Author: sbc
Date: Mon Feb 4 09:28:46 2019
New Revision: 353062
URL: http://llvm.org/viewvc/llvm-project?rev=353062&view=rev
Log:
[WebAssembly] Rename relocations from R_WEBASSEMBLY_ to R_WASM_
See https://github.com/WebAssembly/tool-conventions/pull/95.
This is less typing and IMHO more readable, and it also fits with
our naming around the binary format which tends to use the short name.
e.g.
include/llvm/BinaryFormat/Wasm.h
tools/llvm-objdump/WasmDump.cpp
etc..
Differential Revision: https://reviews.llvm.org/D57611
Modified:
llvm/trunk/include/llvm/BinaryFormat/WasmRelocs.def
llvm/trunk/include/llvm/Object/RelocVisitor.h
llvm/trunk/lib/MC/WasmObjectWriter.cpp
llvm/trunk/lib/Object/WasmObjectFile.cpp
llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp
llvm/trunk/test/MC/WebAssembly/assembler-binary.ll
llvm/trunk/test/MC/WebAssembly/comdat.ll
llvm/trunk/test/MC/WebAssembly/debug-info.ll
llvm/trunk/test/MC/WebAssembly/event-section.ll
llvm/trunk/test/MC/WebAssembly/external-data.ll
llvm/trunk/test/MC/WebAssembly/external-func-address.ll
llvm/trunk/test/MC/WebAssembly/func-address.ll
llvm/trunk/test/MC/WebAssembly/global-ctor-dtor.ll
llvm/trunk/test/MC/WebAssembly/reloc-code.ll
llvm/trunk/test/MC/WebAssembly/reloc-data.ll
llvm/trunk/test/MC/WebAssembly/stack-ptr.ll
llvm/trunk/test/MC/WebAssembly/unnamed-data.ll
llvm/trunk/test/MC/WebAssembly/weak-alias.ll
llvm/trunk/test/Object/objdump-relocations.test
llvm/trunk/test/ObjectYAML/wasm/code_section.yaml
llvm/trunk/test/ObjectYAML/wasm/data_section.yaml
llvm/trunk/test/ObjectYAML/wasm/event_section.yaml
llvm/trunk/test/tools/llvm-objdump/WebAssembly/relocations.test
llvm/trunk/test/tools/llvm-readobj/relocations.test
llvm/trunk/tools/llvm-objdump/WasmDump.cpp
llvm/trunk/tools/llvm-readobj/WasmDumper.cpp
llvm/trunk/tools/yaml2obj/yaml2wasm.cpp
Modified: llvm/trunk/include/llvm/BinaryFormat/WasmRelocs.def
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BinaryFormat/WasmRelocs.def?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/include/llvm/BinaryFormat/WasmRelocs.def (original)
+++ llvm/trunk/include/llvm/BinaryFormat/WasmRelocs.def Mon Feb 4 09:28:46 2019
@@ -2,14 +2,14 @@
#error "WASM_RELOC must be defined"
#endif
-WASM_RELOC(R_WEBASSEMBLY_FUNCTION_INDEX_LEB, 0)
-WASM_RELOC(R_WEBASSEMBLY_TABLE_INDEX_SLEB, 1)
-WASM_RELOC(R_WEBASSEMBLY_TABLE_INDEX_I32, 2)
-WASM_RELOC(R_WEBASSEMBLY_MEMORY_ADDR_LEB, 3)
-WASM_RELOC(R_WEBASSEMBLY_MEMORY_ADDR_SLEB, 4)
-WASM_RELOC(R_WEBASSEMBLY_MEMORY_ADDR_I32, 5)
-WASM_RELOC(R_WEBASSEMBLY_TYPE_INDEX_LEB, 6)
-WASM_RELOC(R_WEBASSEMBLY_GLOBAL_INDEX_LEB, 7)
-WASM_RELOC(R_WEBASSEMBLY_FUNCTION_OFFSET_I32, 8)
-WASM_RELOC(R_WEBASSEMBLY_SECTION_OFFSET_I32, 9)
-WASM_RELOC(R_WEBASSEMBLY_EVENT_INDEX_LEB, 10)
+WASM_RELOC(R_WASM_FUNCTION_INDEX_LEB, 0)
+WASM_RELOC(R_WASM_TABLE_INDEX_SLEB, 1)
+WASM_RELOC(R_WASM_TABLE_INDEX_I32, 2)
+WASM_RELOC(R_WASM_MEMORY_ADDR_LEB, 3)
+WASM_RELOC(R_WASM_MEMORY_ADDR_SLEB, 4)
+WASM_RELOC(R_WASM_MEMORY_ADDR_I32, 5)
+WASM_RELOC(R_WASM_TYPE_INDEX_LEB, 6)
+WASM_RELOC(R_WASM_GLOBAL_INDEX_LEB, 7)
+WASM_RELOC(R_WASM_FUNCTION_OFFSET_I32, 8)
+WASM_RELOC(R_WASM_SECTION_OFFSET_I32, 9)
+WASM_RELOC(R_WASM_EVENT_INDEX_LEB, 10)
Modified: llvm/trunk/include/llvm/Object/RelocVisitor.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/RelocVisitor.h?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/RelocVisitor.h (original)
+++ llvm/trunk/include/llvm/Object/RelocVisitor.h Mon Feb 4 09:28:46 2019
@@ -336,17 +336,17 @@ private:
uint64_t visitWasm(uint32_t Rel, RelocationRef R, uint64_t Value) {
if (ObjToVisit.getArch() == Triple::wasm32) {
switch (Rel) {
- case wasm::R_WEBASSEMBLY_FUNCTION_INDEX_LEB:
- case wasm::R_WEBASSEMBLY_TABLE_INDEX_SLEB:
- case wasm::R_WEBASSEMBLY_TABLE_INDEX_I32:
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_LEB:
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_SLEB:
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_I32:
- case wasm::R_WEBASSEMBLY_TYPE_INDEX_LEB:
- case wasm::R_WEBASSEMBLY_GLOBAL_INDEX_LEB:
- case wasm::R_WEBASSEMBLY_FUNCTION_OFFSET_I32:
- case wasm::R_WEBASSEMBLY_SECTION_OFFSET_I32:
- case wasm::R_WEBASSEMBLY_EVENT_INDEX_LEB:
+ case wasm::R_WASM_FUNCTION_INDEX_LEB:
+ case wasm::R_WASM_TABLE_INDEX_SLEB:
+ case wasm::R_WASM_TABLE_INDEX_I32:
+ case wasm::R_WASM_MEMORY_ADDR_LEB:
+ case wasm::R_WASM_MEMORY_ADDR_SLEB:
+ case wasm::R_WASM_MEMORY_ADDR_I32:
+ case wasm::R_WASM_TYPE_INDEX_LEB:
+ case wasm::R_WASM_GLOBAL_INDEX_LEB:
+ case wasm::R_WASM_FUNCTION_OFFSET_I32:
+ case wasm::R_WASM_SECTION_OFFSET_I32:
+ case wasm::R_WASM_EVENT_INDEX_LEB:
// For wasm section, its offset at 0 -- ignoring Value
return 0;
}
Modified: llvm/trunk/lib/MC/WasmObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/WasmObjectWriter.cpp?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/lib/MC/WasmObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/WasmObjectWriter.cpp Mon Feb 4 09:28:46 2019
@@ -150,11 +150,11 @@ struct WasmRelocationEntry {
bool hasAddend() const {
switch (Type) {
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_LEB:
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_SLEB:
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_I32:
- case wasm::R_WEBASSEMBLY_FUNCTION_OFFSET_I32:
- case wasm::R_WEBASSEMBLY_SECTION_OFFSET_I32:
+ case wasm::R_WASM_MEMORY_ADDR_LEB:
+ case wasm::R_WASM_MEMORY_ADDR_SLEB:
+ case wasm::R_WASM_MEMORY_ADDR_I32:
+ case wasm::R_WASM_FUNCTION_OFFSET_I32:
+ case wasm::R_WASM_SECTION_OFFSET_I32:
return true;
default:
return false;
@@ -519,8 +519,8 @@ void WasmObjectWriter::recordRelocation(
// Absolute offset within a section or a function.
// Currently only supported for for metadata sections.
// See: test/MC/WebAssembly/blockaddress.ll
- if (Type == wasm::R_WEBASSEMBLY_FUNCTION_OFFSET_I32 ||
- Type == wasm::R_WEBASSEMBLY_SECTION_OFFSET_I32) {
+ if (Type == wasm::R_WASM_FUNCTION_OFFSET_I32 ||
+ Type == wasm::R_WASM_SECTION_OFFSET_I32) {
if (!FixupSection.getKind().isMetadata())
report_fatal_error("relocations for function or section offsets are "
"only supported in metadata sections");
@@ -538,9 +538,9 @@ void WasmObjectWriter::recordRelocation(
SymA = cast<MCSymbolWasm>(SectionSymbol);
}
- // Relocation other than R_WEBASSEMBLY_TYPE_INDEX_LEB are required to be
+ // Relocation other than R_WASM_TYPE_INDEX_LEB are required to be
// against a named symbol.
- if (Type != wasm::R_WEBASSEMBLY_TYPE_INDEX_LEB) {
+ if (Type != wasm::R_WASM_TYPE_INDEX_LEB) {
if (SymA->getName().empty())
report_fatal_error("relocations against un-named temporaries are not yet "
"supported by wasm");
@@ -578,33 +578,33 @@ static const MCSymbolWasm *ResolveSymbol
uint32_t
WasmObjectWriter::getProvisionalValue(const WasmRelocationEntry &RelEntry) {
switch (RelEntry.Type) {
- case wasm::R_WEBASSEMBLY_TABLE_INDEX_SLEB:
- case wasm::R_WEBASSEMBLY_TABLE_INDEX_I32: {
+ case wasm::R_WASM_TABLE_INDEX_SLEB:
+ case wasm::R_WASM_TABLE_INDEX_I32: {
// Provisional value is table address of the resolved symbol itself
const MCSymbolWasm *Sym = ResolveSymbol(*RelEntry.Symbol);
assert(Sym->isFunction());
return TableIndices[Sym];
}
- case wasm::R_WEBASSEMBLY_TYPE_INDEX_LEB:
+ case wasm::R_WASM_TYPE_INDEX_LEB:
// Provisional value is same as the index
return getRelocationIndexValue(RelEntry);
- case wasm::R_WEBASSEMBLY_FUNCTION_INDEX_LEB:
- case wasm::R_WEBASSEMBLY_GLOBAL_INDEX_LEB:
- case wasm::R_WEBASSEMBLY_EVENT_INDEX_LEB:
+ case wasm::R_WASM_FUNCTION_INDEX_LEB:
+ case wasm::R_WASM_GLOBAL_INDEX_LEB:
+ case wasm::R_WASM_EVENT_INDEX_LEB:
// Provisional value is function/global/event Wasm index
if (!WasmIndices.count(RelEntry.Symbol))
report_fatal_error("symbol not found in wasm index space: " +
RelEntry.Symbol->getName());
return WasmIndices[RelEntry.Symbol];
- case wasm::R_WEBASSEMBLY_FUNCTION_OFFSET_I32:
- case wasm::R_WEBASSEMBLY_SECTION_OFFSET_I32: {
+ case wasm::R_WASM_FUNCTION_OFFSET_I32:
+ case wasm::R_WASM_SECTION_OFFSET_I32: {
const auto &Section =
static_cast<const MCSectionWasm &>(RelEntry.Symbol->getSection());
return Section.getSectionOffset() + RelEntry.Addend;
}
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_LEB:
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_I32:
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_SLEB: {
+ case wasm::R_WASM_MEMORY_ADDR_LEB:
+ case wasm::R_WASM_MEMORY_ADDR_I32:
+ case wasm::R_WASM_MEMORY_ADDR_SLEB: {
// Provisional value is address of the global
const MCSymbolWasm *Sym = ResolveSymbol(*RelEntry.Symbol);
// For undefined symbols, use zero
@@ -660,7 +660,7 @@ static void addData(SmallVectorImpl<char
uint32_t
WasmObjectWriter::getRelocationIndexValue(const WasmRelocationEntry &RelEntry) {
- if (RelEntry.Type == wasm::R_WEBASSEMBLY_TYPE_INDEX_LEB) {
+ if (RelEntry.Type == wasm::R_WASM_TYPE_INDEX_LEB) {
if (!TypeIndices.count(RelEntry.Symbol))
report_fatal_error("symbol not found in type index space: " +
RelEntry.Symbol->getName());
@@ -684,21 +684,21 @@ void WasmObjectWriter::applyRelocations(
uint32_t Value = getProvisionalValue(RelEntry);
switch (RelEntry.Type) {
- case wasm::R_WEBASSEMBLY_FUNCTION_INDEX_LEB:
- case wasm::R_WEBASSEMBLY_TYPE_INDEX_LEB:
- case wasm::R_WEBASSEMBLY_GLOBAL_INDEX_LEB:
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_LEB:
- case wasm::R_WEBASSEMBLY_EVENT_INDEX_LEB:
+ case wasm::R_WASM_FUNCTION_INDEX_LEB:
+ case wasm::R_WASM_TYPE_INDEX_LEB:
+ case wasm::R_WASM_GLOBAL_INDEX_LEB:
+ case wasm::R_WASM_MEMORY_ADDR_LEB:
+ case wasm::R_WASM_EVENT_INDEX_LEB:
WritePatchableLEB(Stream, Value, Offset);
break;
- case wasm::R_WEBASSEMBLY_TABLE_INDEX_I32:
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_I32:
- case wasm::R_WEBASSEMBLY_FUNCTION_OFFSET_I32:
- case wasm::R_WEBASSEMBLY_SECTION_OFFSET_I32:
+ case wasm::R_WASM_TABLE_INDEX_I32:
+ case wasm::R_WASM_MEMORY_ADDR_I32:
+ case wasm::R_WASM_FUNCTION_OFFSET_I32:
+ case wasm::R_WASM_SECTION_OFFSET_I32:
WriteI32(Stream, Value, Offset);
break;
- case wasm::R_WEBASSEMBLY_TABLE_INDEX_SLEB:
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_SLEB:
+ case wasm::R_WASM_TABLE_INDEX_SLEB:
+ case wasm::R_WASM_MEMORY_ADDR_SLEB:
WritePatchableSLEB(Stream, Value, Offset);
break;
default:
@@ -1481,8 +1481,8 @@ uint64_t WasmObjectWriter::writeObject(M
// Functions referenced by a relocation need to put in the table. This is
// purely to make the object file's provisional values readable, and is
// ignored by the linker, which re-calculates the relocations itself.
- if (Rel.Type != wasm::R_WEBASSEMBLY_TABLE_INDEX_I32 &&
- Rel.Type != wasm::R_WEBASSEMBLY_TABLE_INDEX_SLEB)
+ if (Rel.Type != wasm::R_WASM_TABLE_INDEX_I32 &&
+ Rel.Type != wasm::R_WASM_TABLE_INDEX_SLEB)
return;
assert(Rel.Symbol->isFunction());
const MCSymbolWasm &WS = *ResolveSymbol(*Rel.Symbol);
Modified: llvm/trunk/lib/Object/WasmObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/WasmObjectFile.cpp?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/lib/Object/WasmObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/WasmObjectFile.cpp Mon Feb 4 09:28:46 2019
@@ -719,43 +719,43 @@ Error WasmObjectFile::parseRelocSection(
PreviousOffset = Reloc.Offset;
Reloc.Index = readVaruint32(Ctx);
switch (Reloc.Type) {
- case wasm::R_WEBASSEMBLY_FUNCTION_INDEX_LEB:
- case wasm::R_WEBASSEMBLY_TABLE_INDEX_SLEB:
- case wasm::R_WEBASSEMBLY_TABLE_INDEX_I32:
+ case wasm::R_WASM_FUNCTION_INDEX_LEB:
+ case wasm::R_WASM_TABLE_INDEX_SLEB:
+ case wasm::R_WASM_TABLE_INDEX_I32:
if (!isValidFunctionSymbol(Reloc.Index))
return make_error<GenericBinaryError>("Bad relocation function index",
object_error::parse_failed);
break;
- case wasm::R_WEBASSEMBLY_TYPE_INDEX_LEB:
+ case wasm::R_WASM_TYPE_INDEX_LEB:
if (Reloc.Index >= Signatures.size())
return make_error<GenericBinaryError>("Bad relocation type index",
object_error::parse_failed);
break;
- case wasm::R_WEBASSEMBLY_GLOBAL_INDEX_LEB:
+ case wasm::R_WASM_GLOBAL_INDEX_LEB:
if (!isValidGlobalSymbol(Reloc.Index))
return make_error<GenericBinaryError>("Bad relocation global index",
object_error::parse_failed);
break;
- case wasm::R_WEBASSEMBLY_EVENT_INDEX_LEB:
+ case wasm::R_WASM_EVENT_INDEX_LEB:
if (!isValidEventSymbol(Reloc.Index))
return make_error<GenericBinaryError>("Bad relocation event index",
object_error::parse_failed);
break;
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_LEB:
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_SLEB:
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_I32:
+ case wasm::R_WASM_MEMORY_ADDR_LEB:
+ case wasm::R_WASM_MEMORY_ADDR_SLEB:
+ case wasm::R_WASM_MEMORY_ADDR_I32:
if (!isValidDataSymbol(Reloc.Index))
return make_error<GenericBinaryError>("Bad relocation data index",
object_error::parse_failed);
Reloc.Addend = readVarint32(Ctx);
break;
- case wasm::R_WEBASSEMBLY_FUNCTION_OFFSET_I32:
+ case wasm::R_WASM_FUNCTION_OFFSET_I32:
if (!isValidFunctionSymbol(Reloc.Index))
return make_error<GenericBinaryError>("Bad relocation function index",
object_error::parse_failed);
Reloc.Addend = readVarint32(Ctx);
break;
- case wasm::R_WEBASSEMBLY_SECTION_OFFSET_I32:
+ case wasm::R_WASM_SECTION_OFFSET_I32:
if (!isValidSectionSymbol(Reloc.Index))
return make_error<GenericBinaryError>("Bad relocation section index",
object_error::parse_failed);
@@ -771,10 +771,10 @@ Error WasmObjectFile::parseRelocSection(
// also shouldn't overlap a function/element boundary, but we don't bother
// to check that.
uint64_t Size = 5;
- if (Reloc.Type == wasm::R_WEBASSEMBLY_TABLE_INDEX_I32 ||
- Reloc.Type == wasm::R_WEBASSEMBLY_MEMORY_ADDR_I32 ||
- Reloc.Type == wasm::R_WEBASSEMBLY_SECTION_OFFSET_I32 ||
- Reloc.Type == wasm::R_WEBASSEMBLY_FUNCTION_OFFSET_I32)
+ if (Reloc.Type == wasm::R_WASM_TABLE_INDEX_I32 ||
+ Reloc.Type == wasm::R_WASM_MEMORY_ADDR_I32 ||
+ Reloc.Type == wasm::R_WASM_SECTION_OFFSET_I32 ||
+ Reloc.Type == wasm::R_WASM_FUNCTION_OFFSET_I32)
Size = 4;
if (Reloc.Offset + Size > EndOffset)
return make_error<GenericBinaryError>("Bad relocation offset",
@@ -1419,7 +1419,7 @@ uint64_t WasmObjectFile::getRelocationOf
symbol_iterator WasmObjectFile::getRelocationSymbol(DataRefImpl Ref) const {
const wasm::WasmRelocation &Rel = getWasmRelocation(Ref);
- if (Rel.Type == wasm::R_WEBASSEMBLY_TYPE_INDEX_LEB)
+ if (Rel.Type == wasm::R_WASM_TYPE_INDEX_LEB)
return symbol_end();
DataRefImpl Sym;
Sym.d.a = 1;
Modified: llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp Mon Feb 4 09:28:46 2019
@@ -99,31 +99,31 @@ unsigned WebAssemblyWasmObjectWriter::ge
switch (unsigned(Fixup.getKind())) {
case WebAssembly::fixup_code_sleb128_i32:
if (IsFunction)
- return wasm::R_WEBASSEMBLY_TABLE_INDEX_SLEB;
- return wasm::R_WEBASSEMBLY_MEMORY_ADDR_SLEB;
+ return wasm::R_WASM_TABLE_INDEX_SLEB;
+ return wasm::R_WASM_MEMORY_ADDR_SLEB;
case WebAssembly::fixup_code_sleb128_i64:
llvm_unreachable("fixup_sleb128_i64 not implemented yet");
case WebAssembly::fixup_code_uleb128_i32:
if (IsGlobalType(Target))
- return wasm::R_WEBASSEMBLY_GLOBAL_INDEX_LEB;
+ return wasm::R_WASM_GLOBAL_INDEX_LEB;
if (IsFunctionType(Target))
- return wasm::R_WEBASSEMBLY_TYPE_INDEX_LEB;
+ return wasm::R_WASM_TYPE_INDEX_LEB;
if (IsFunction)
- return wasm::R_WEBASSEMBLY_FUNCTION_INDEX_LEB;
+ return wasm::R_WASM_FUNCTION_INDEX_LEB;
if (IsEventType(Target))
- return wasm::R_WEBASSEMBLY_EVENT_INDEX_LEB;
- return wasm::R_WEBASSEMBLY_MEMORY_ADDR_LEB;
+ return wasm::R_WASM_EVENT_INDEX_LEB;
+ return wasm::R_WASM_MEMORY_ADDR_LEB;
case FK_Data_4:
if (IsFunction)
- return wasm::R_WEBASSEMBLY_TABLE_INDEX_I32;
+ return wasm::R_WASM_TABLE_INDEX_I32;
if (auto Section = static_cast<const MCSectionWasm *>(
GetFixupSection(Fixup.getValue()))) {
if (Section->getKind().isText())
- return wasm::R_WEBASSEMBLY_FUNCTION_OFFSET_I32;
+ return wasm::R_WASM_FUNCTION_OFFSET_I32;
else if (!Section->isWasmData())
- return wasm::R_WEBASSEMBLY_SECTION_OFFSET_I32;
+ return wasm::R_WASM_SECTION_OFFSET_I32;
}
- return wasm::R_WEBASSEMBLY_MEMORY_ADDR_I32;
+ return wasm::R_WASM_MEMORY_ADDR_I32;
case FK_Data_8:
llvm_unreachable("FK_Data_8 not implemented yet");
default:
Modified: llvm/trunk/test/MC/WebAssembly/assembler-binary.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/assembler-binary.ll?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/assembler-binary.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/assembler-binary.ll Mon Feb 4 09:28:46 2019
@@ -68,7 +68,7 @@ entry:
; CHECK-NEXT: FunctionTypes: [ 0 ]
; CHECK-NEXT: - Type: CODE
; CHECK-NEXT: Relocations:
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB
+; CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB
; CHECK-NEXT: Index: 1
; CHECK-NEXT: Offset: 0x00000004
; CHECK-NEXT: Functions:
Modified: llvm/trunk/test/MC/WebAssembly/comdat.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/comdat.ll?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/comdat.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/comdat.ll Mon Feb 4 09:28:46 2019
@@ -52,7 +52,7 @@ define linkonce_odr i32 @sharedFn() #1 c
; CHECK-NEXT: FunctionTypes: [ 0, 0, 0 ]
; CHECK-NEXT: - Type: CODE
; CHECK-NEXT: Relocations:
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB
+; CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB
; CHECK-NEXT: Index: 1
; CHECK-NEXT: Offset: 0x00000004
; CHECK-NEXT: Functions:
Modified: llvm/trunk/test/MC/WebAssembly/debug-info.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/debug-info.ll?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/debug-info.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/debug-info.ll Mon Feb 4 09:28:46 2019
@@ -133,32 +133,32 @@
; CHECK-NEXT:]
; CHECK-NEXT:Relocations [
; CHECK-NEXT: Section (6) DATA {
-; CHECK-NEXT: 0x6 R_WEBASSEMBLY_MEMORY_ADDR_I32 myextern 0
-; CHECK-NEXT: 0xF R_WEBASSEMBLY_TABLE_INDEX_I32 f2
+; CHECK-NEXT: 0x6 R_WASM_MEMORY_ADDR_I32 myextern 0
+; CHECK-NEXT: 0xF R_WASM_TABLE_INDEX_I32 f2
; CHECK-NEXT: }
; CHECK-NEXT: Section (9) .debug_info {
-; CHECK-NEXT: 0x6 R_WEBASSEMBLY_SECTION_OFFSET_I32 .debug_abbrev 0
-; CHECK-NEXT: 0xC R_WEBASSEMBLY_SECTION_OFFSET_I32 .debug_str 0
-; CHECK-NEXT: 0x12 R_WEBASSEMBLY_SECTION_OFFSET_I32 .debug_str 55
-; CHECK-NEXT: 0x16 R_WEBASSEMBLY_SECTION_OFFSET_I32 .debug_line 0
-; CHECK-NEXT: 0x1A R_WEBASSEMBLY_SECTION_OFFSET_I32 .debug_str 62
-; CHECK-NEXT: 0x1E R_WEBASSEMBLY_FUNCTION_OFFSET_I32 f2 0
-; CHECK-NEXT: 0x27 R_WEBASSEMBLY_SECTION_OFFSET_I32 .debug_str 105
-; CHECK-NEXT: 0x33 R_WEBASSEMBLY_MEMORY_ADDR_I32 foo 0
-; CHECK-NEXT: 0x3D R_WEBASSEMBLY_SECTION_OFFSET_I32 .debug_str 109
-; CHECK-NEXT: 0x44 R_WEBASSEMBLY_SECTION_OFFSET_I32 .debug_str 113
-; CHECK-NEXT: 0x50 R_WEBASSEMBLY_MEMORY_ADDR_I32 ptr2 0
-; CHECK-NEXT: 0x5B R_WEBASSEMBLY_FUNCTION_OFFSET_I32 f2 0
-; CHECK-NEXT: 0x63 R_WEBASSEMBLY_SECTION_OFFSET_I32 .debug_str 118
+; CHECK-NEXT: 0x6 R_WASM_SECTION_OFFSET_I32 .debug_abbrev 0
+; CHECK-NEXT: 0xC R_WASM_SECTION_OFFSET_I32 .debug_str 0
+; CHECK-NEXT: 0x12 R_WASM_SECTION_OFFSET_I32 .debug_str 55
+; CHECK-NEXT: 0x16 R_WASM_SECTION_OFFSET_I32 .debug_line 0
+; CHECK-NEXT: 0x1A R_WASM_SECTION_OFFSET_I32 .debug_str 62
+; CHECK-NEXT: 0x1E R_WASM_FUNCTION_OFFSET_I32 f2 0
+; CHECK-NEXT: 0x27 R_WASM_SECTION_OFFSET_I32 .debug_str 105
+; CHECK-NEXT: 0x33 R_WASM_MEMORY_ADDR_I32 foo 0
+; CHECK-NEXT: 0x3D R_WASM_SECTION_OFFSET_I32 .debug_str 109
+; CHECK-NEXT: 0x44 R_WASM_SECTION_OFFSET_I32 .debug_str 113
+; CHECK-NEXT: 0x50 R_WASM_MEMORY_ADDR_I32 ptr2 0
+; CHECK-NEXT: 0x5B R_WASM_FUNCTION_OFFSET_I32 f2 0
+; CHECK-NEXT: 0x63 R_WASM_SECTION_OFFSET_I32 .debug_str 118
; CHECK-NEXT: }
; CHECK-NEXT: Section (11) .debug_pubnames {
-; CHECK-NEXT: 0x6 R_WEBASSEMBLY_SECTION_OFFSET_I32 .debug_info 0
+; CHECK-NEXT: 0x6 R_WASM_SECTION_OFFSET_I32 .debug_info 0
; CHECK-NEXT: }
; CHECK-NEXT: Section (12) .debug_pubtypes {
-; CHECK-NEXT: 0x6 R_WEBASSEMBLY_SECTION_OFFSET_I32 .debug_info 0
+; CHECK-NEXT: 0x6 R_WASM_SECTION_OFFSET_I32 .debug_info 0
; CHECK-NEXT: }
; CHECK-NEXT: Section (13) .debug_line {
-; CHECK-NEXT: 0x2B R_WEBASSEMBLY_FUNCTION_OFFSET_I32 f2 0
+; CHECK-NEXT: 0x2B R_WASM_FUNCTION_OFFSET_I32 f2 0
; CHECK-NEXT: }
; CHECK-NEXT:]
; CHECK-NEXT:Symbols [
Modified: llvm/trunk/test/MC/WebAssembly/event-section.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/event-section.ll?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/event-section.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/event-section.ll Mon Feb 4 09:28:46 2019
@@ -35,10 +35,10 @@ define i32 @test_throw1(i8* %p) {
; CHECK-NEXT: - Type: CODE
; CHECK-NEXT: Relocations:
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_EVENT_INDEX_LEB
+; CHECK-NEXT: - Type: R_WASM_EVENT_INDEX_LEB
; CHECK-NEXT: Index: 1
; CHECK-NEXT: Offset: 0x00000006
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_EVENT_INDEX_LEB
+; CHECK-NEXT: - Type: R_WASM_EVENT_INDEX_LEB
; CHECK-NEXT: Index: 1
; CHECK-NEXT: Offset: 0x00000011
Modified: llvm/trunk/test/MC/WebAssembly/external-data.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/external-data.ll?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/external-data.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/external-data.ll Mon Feb 4 09:28:46 2019
@@ -12,7 +12,7 @@ target triple = "wasm32-unknown-unknown"
; CHECK: - Type: DATA
; CHECK-NEXT: Relocations:
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_I32
+; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_I32
; CHECK-NEXT: Index: 2
; CHECK-NEXT: Offset: 0x00000013
; CHECK-NEXT: Segments:
Modified: llvm/trunk/test/MC/WebAssembly/external-func-address.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/external-func-address.ll?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/external-func-address.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/external-func-address.ll Mon Feb 4 09:28:46 2019
@@ -60,6 +60,6 @@ define void @call(i32) {
; CHECK-NEXT: Functions: [ 1, 2 ]
; CHECK: - Type: DATA
; CHECK-NEXT: Relocations:
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_TABLE_INDEX_I32
+; CHECK-NEXT: - Type: R_WASM_TABLE_INDEX_I32
; CHECK-NEXT: Index: 3
; CHECK-NEXT: Offset: 0x00000006
Modified: llvm/trunk/test/MC/WebAssembly/func-address.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/func-address.ll?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/func-address.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/func-address.ll Mon Feb 4 09:28:46 2019
@@ -30,22 +30,22 @@ entry:
; CHECK: Relocations [
; CHECK-NEXT: Section (5) CODE {
; CHECK-NEXT: Relocation {
-; CHECK-NEXT: Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB (0)
+; CHECK-NEXT: Type: R_WASM_FUNCTION_INDEX_LEB (0)
; CHECK-NEXT: Offset: 0x4
; CHECK-NEXT: Symbol: import1
; CHECK-NEXT: }
; CHECK-NEXT: Relocation {
-; CHECK-NEXT: Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB (0)
+; CHECK-NEXT: Type: R_WASM_FUNCTION_INDEX_LEB (0)
; CHECK-NEXT: Offset: 0xB
; CHECK-NEXT: Symbol: import2
; CHECK-NEXT: }
; CHECK-NEXT: Relocation {
-; CHECK-NEXT: Type: R_WEBASSEMBLY_GLOBAL_INDEX_LEB (7)
+; CHECK-NEXT: Type: R_WASM_GLOBAL_INDEX_LEB (7)
; CHECK-NEXT: Offset: 0x15
; CHECK-NEXT: Symbol: __stack_pointer
; CHECK-NEXT: }
; CHECK-NEXT: Relocation {
-; CHECK-NEXT: Type: R_WEBASSEMBLY_TABLE_INDEX_SLEB (1)
+; CHECK-NEXT: Type: R_WASM_TABLE_INDEX_SLEB (1)
; CHECK-NEXT: Offset: 0x1E
; CHECK-NEXT: Symbol: import3
; CHECK-NEXT: }
Modified: llvm/trunk/test/MC/WebAssembly/global-ctor-dtor.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/global-ctor-dtor.ll?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/global-ctor-dtor.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/global-ctor-dtor.ll Mon Feb 4 09:28:46 2019
@@ -63,28 +63,28 @@ declare void @func3()
; CHECK-NEXT: Functions: [ 5, 7 ]
; CHECK-NEXT: - Type: CODE
; CHECK-NEXT: Relocations:
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB
+; CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB
; CHECK-NEXT: Index: 1
; CHECK-NEXT: Offset: 0x00000004
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_TABLE_INDEX_SLEB
+; CHECK-NEXT: - Type: R_WASM_TABLE_INDEX_SLEB
; CHECK-NEXT: Index: 0
; CHECK-NEXT: Offset: 0x0000000F
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_SLEB
+; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_SLEB
; CHECK-NEXT: Index: 3
; CHECK-NEXT: Offset: 0x00000017
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB
+; CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB
; CHECK-NEXT: Index: 4
; CHECK-NEXT: Offset: 0x0000001D
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB
+; CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB
; CHECK-NEXT: Index: 6
; CHECK-NEXT: Offset: 0x0000002C
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_TABLE_INDEX_SLEB
+; CHECK-NEXT: - Type: R_WASM_TABLE_INDEX_SLEB
; CHECK-NEXT: Index: 5
; CHECK-NEXT: Offset: 0x00000037
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_SLEB
+; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_SLEB
; CHECK-NEXT: Index: 3
; CHECK-NEXT: Offset: 0x0000003F
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB
+; CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB
; CHECK-NEXT: Index: 4
; CHECK-NEXT: Offset: 0x00000045
; CHECK-NEXT: Functions:
Modified: llvm/trunk/test/MC/WebAssembly/reloc-code.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/reloc-code.ll?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/reloc-code.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/reloc-code.ll Mon Feb 4 09:28:46 2019
@@ -26,34 +26,34 @@ entry:
; CHECK: Relocations [
; CHECK-NEXT: Section (4) CODE {
; CHECK-NEXT: Relocation {
-; CHECK-NEXT: Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB (3)
+; CHECK-NEXT: Type: R_WASM_MEMORY_ADDR_LEB (3)
; CHECK-NEXT: Offset: 0x9
; CHECK-NEXT: Symbol: b
; CHECK-NEXT: Addend: 0
; CHECK-NEXT: }
; CHECK-NEXT: Relocation {
-; CHECK-NEXT: Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB (3)
+; CHECK-NEXT: Type: R_WASM_MEMORY_ADDR_LEB (3)
; CHECK-NEXT: Offset: 0x14
; CHECK-NEXT: Symbol: a
; CHECK-NEXT: Addend: 0
; CHECK-NEXT: }
; CHECK-NEXT: Relocation {
-; CHECK-NEXT: Type: R_WEBASSEMBLY_TYPE_INDEX_LEB (6)
+; CHECK-NEXT: Type: R_WASM_TYPE_INDEX_LEB (6)
; CHECK-NEXT: Offset: 0x1A
; CHECK-NEXT: Index: 0x1
; CHECK-NEXT: }
; CHECK-NEXT: Relocation {
-; CHECK-NEXT: Type: R_WEBASSEMBLY_TYPE_INDEX_LEB (6)
+; CHECK-NEXT: Type: R_WASM_TYPE_INDEX_LEB (6)
; CHECK-NEXT: Offset: 0x24
; CHECK-NEXT: Index: 0x0
; CHECK-NEXT: }
; CHECK-NEXT: Relocation {
-; CHECK-NEXT: Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB (0)
+; CHECK-NEXT: Type: R_WASM_FUNCTION_INDEX_LEB (0)
; CHECK-NEXT: Offset: 0x2D
; CHECK-NEXT: Symbol: c
; CHECK-NEXT: }
; CHECK-NEXT: Relocation {
-; CHECK-NEXT: Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB (0)
+; CHECK-NEXT: Type: R_WASM_FUNCTION_INDEX_LEB (0)
; CHECK-NEXT: Offset: 0x34
; CHECK-NEXT: Symbol: d
; CHECK-NEXT: }
Modified: llvm/trunk/test/MC/WebAssembly/reloc-data.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/reloc-data.ll?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/reloc-data.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/reloc-data.ll Mon Feb 4 09:28:46 2019
@@ -15,31 +15,31 @@ target triple = "wasm32-unknown-unknown"
; CHECK: Relocations [
; CHECK-NEXT: Section (2) DATA {
; CHECK-NEXT: Relocation {
-; CHECK-NEXT: Type: R_WEBASSEMBLY_MEMORY_ADDR_I32 (5)
+; CHECK-NEXT: Type: R_WASM_MEMORY_ADDR_I32 (5)
; CHECK-NEXT: Offset: 0x13
; CHECK-NEXT: Symbol: foo
; CHECK-NEXT: Addend: 8
; CHECK-NEXT: }
; CHECK-NEXT: Relocation {
-; CHECK-NEXT: Type: R_WEBASSEMBLY_MEMORY_ADDR_I32 (5)
+; CHECK-NEXT: Type: R_WASM_MEMORY_ADDR_I32 (5)
; CHECK-NEXT: Offset: 0x1C
; CHECK-NEXT: Symbol: bar
; CHECK-NEXT: Addend: -16
; CHECK-NEXT: }
; CHECK-NEXT: Relocation {
-; CHECK-NEXT: Type: R_WEBASSEMBLY_MEMORY_ADDR_I32 (5)
+; CHECK-NEXT: Type: R_WASM_MEMORY_ADDR_I32 (5)
; CHECK-NEXT: Offset: 0x25
; CHECK-NEXT: Symbol: foo
; CHECK-NEXT: Addend: 0
; CHECK-NEXT: }
; CHECK-NEXT: Relocation {
-; CHECK-NEXT: Type: R_WEBASSEMBLY_MEMORY_ADDR_I32 (5)
+; CHECK-NEXT: Type: R_WASM_MEMORY_ADDR_I32 (5)
; CHECK-NEXT: Offset: 0x29
; CHECK-NEXT: Symbol: foo
; CHECK-NEXT: Addend: 0
; CHECK-NEXT: }
; CHECK-NEXT: Relocation {
-; CHECK-NEXT: Type: R_WEBASSEMBLY_MEMORY_ADDR_I32 (5)
+; CHECK-NEXT: Type: R_WASM_MEMORY_ADDR_I32 (5)
; CHECK-NEXT: Offset: 0x2D
; CHECK-NEXT: Symbol: foo
; CHECK-NEXT: Addend: 0
Modified: llvm/trunk/test/MC/WebAssembly/stack-ptr.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/stack-ptr.ll?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/stack-ptr.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/stack-ptr.ll Mon Feb 4 09:28:46 2019
@@ -19,5 +19,5 @@ entry:
; CHECK: GlobalMutable: true
; CHECK: - Type: CODE
; CHECK: Relocations:
-; CHECK: - Type: R_WEBASSEMBLY_GLOBAL_INDEX_LEB
+; CHECK: - Type: R_WASM_GLOBAL_INDEX_LEB
; CHECK: Index: 0
Modified: llvm/trunk/test/MC/WebAssembly/unnamed-data.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/unnamed-data.ll?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/unnamed-data.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/unnamed-data.ll Mon Feb 4 09:28:46 2019
@@ -11,10 +11,10 @@ target triple = "wasm32-unknown-unknown"
; CHECK: - Type: DATA
; CHECK-NEXT: Relocations:
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_I32
+; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_I32
; CHECK-NEXT: Index: 0
; CHECK-NEXT: Offset: 0x0000001C
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_I32
+; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_I32
; CHECK-NEXT: Index: 1
; CHECK-NEXT: Offset: 0x00000025
; CHECK-NEXT: Segments:
Modified: llvm/trunk/test/MC/WebAssembly/weak-alias.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/WebAssembly/weak-alias.ll?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/MC/WebAssembly/weak-alias.ll (original)
+++ llvm/trunk/test/MC/WebAssembly/weak-alias.ll Mon Feb 4 09:28:46 2019
@@ -75,22 +75,22 @@ entry:
; CHECK-NEXT: Functions: [ 0 ]
; CHECK-NEXT: - Type: CODE
; CHECK-NEXT: Relocations:
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB
+; CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB
; CHECK-NEXT: Index: 0
; CHECK-NEXT: Offset: 0x00000009
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB
+; CHECK-NEXT: - Type: R_WASM_FUNCTION_INDEX_LEB
; CHECK-NEXT: Index: 3
; CHECK-NEXT: Offset: 0x00000012
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB
+; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB
; CHECK-NEXT: Index: 5
; CHECK-NEXT: Offset: 0x0000001E
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_TYPE_INDEX_LEB
+; CHECK-NEXT: - Type: R_WASM_TYPE_INDEX_LEB
; CHECK-NEXT: Index: 0
; CHECK-NEXT: Offset: 0x00000024
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_LEB
+; CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_LEB
; CHECK-NEXT: Index: 7
; CHECK-NEXT: Offset: 0x00000031
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_TYPE_INDEX_LEB
+; CHECK-NEXT: - Type: R_WASM_TYPE_INDEX_LEB
; CHECK-NEXT: Index: 0
; CHECK-NEXT: Offset: 0x00000037
; CHECK-NEXT: Functions:
@@ -111,10 +111,10 @@ entry:
; CHECK-NEXT: Body: 410028029080808000118080808000000B
; CHECK-NEXT: - Type: DATA
; CHECK-NEXT: Relocations:
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_TABLE_INDEX_I32
+; CHECK-NEXT: - Type: R_WASM_TABLE_INDEX_I32
; CHECK-NEXT: Index: 0
; CHECK-NEXT: Offset: 0x0000000F
-; CHECK-NEXT: - Type: R_WEBASSEMBLY_TABLE_INDEX_I32
+; CHECK-NEXT: - Type: R_WASM_TABLE_INDEX_I32
; CHECK-NEXT: Index: 3
; CHECK-NEXT: Offset: 0x00000018
; CHECK-NEXT: Segments:
Modified: llvm/trunk/test/Object/objdump-relocations.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Object/objdump-relocations.test?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/Object/objdump-relocations.test (original)
+++ llvm/trunk/test/Object/objdump-relocations.test Mon Feb 4 09:28:46 2019
@@ -60,10 +60,10 @@ ELF-MIPSEL: R_MIPS_CALL16 puts
ELF-MIPSEL: R_MIPS_CALL16 SomeOtherFunction
WASM: CODE
-WASM-NEXT: R_WEBASSEMBLY_MEMORY_ADDR_SLEB .L.str
-WASM-NEXT: R_WEBASSEMBLY_FUNCTION_INDEX_LEB puts
-WASM-NEXT: R_WEBASSEMBLY_FUNCTION_INDEX_LEB .LSomeOtherFunction_bitcast
-WASM-NEXT: R_WEBASSEMBLY_FUNCTION_INDEX_LEB SomeOtherFunction
+WASM-NEXT: R_WASM_MEMORY_ADDR_SLEB .L.str
+WASM-NEXT: R_WASM_FUNCTION_INDEX_LEB puts
+WASM-NEXT: R_WASM_FUNCTION_INDEX_LEB .LSomeOtherFunction_bitcast
+WASM-NEXT: R_WASM_FUNCTION_INDEX_LEB SomeOtherFunction
ELF-complex-x86-64: .text
ELF-complex-x86-64-NEXT: R_X86_64_8 .data-4
Modified: llvm/trunk/test/ObjectYAML/wasm/code_section.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ObjectYAML/wasm/code_section.yaml?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/ObjectYAML/wasm/code_section.yaml (original)
+++ llvm/trunk/test/ObjectYAML/wasm/code_section.yaml Mon Feb 4 09:28:46 2019
@@ -20,10 +20,10 @@ Sections:
- 1
- Type: CODE
Relocations:
- - Type: R_WEBASSEMBLY_TABLE_INDEX_SLEB
+ - Type: R_WASM_TABLE_INDEX_SLEB
Index: 0
Offset: 0x00000006
- - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB
+ - Type: R_WASM_FUNCTION_INDEX_LEB
Index: 1
Offset: 0x00000025
Functions:
@@ -69,10 +69,10 @@ Sections:
# CHECK: - I64
# CHECK: - Type: CODE
# CHECK: Relocations:
-# CHECK: - Type: R_WEBASSEMBLY_TABLE_INDEX_SLEB
+# CHECK: - Type: R_WASM_TABLE_INDEX_SLEB
# CHECK: Index: 0
# CHECK: Offset: 0x00000006
-# CHECK: - Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB
+# CHECK: - Type: R_WASM_FUNCTION_INDEX_LEB
# CHECK: Index: 1
# CHECK: Offset: 0x00000025
# CHECK: Functions:
Modified: llvm/trunk/test/ObjectYAML/wasm/data_section.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ObjectYAML/wasm/data_section.yaml?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/ObjectYAML/wasm/data_section.yaml (original)
+++ llvm/trunk/test/ObjectYAML/wasm/data_section.yaml Mon Feb 4 09:28:46 2019
@@ -14,11 +14,11 @@ Sections:
Value: 4
Content: '10001000'
Relocations:
- - Type: R_WEBASSEMBLY_MEMORY_ADDR_I32
+ - Type: R_WASM_MEMORY_ADDR_I32
Index: 0
Offset: 0x00000006
Addend: 8
- - Type: R_WEBASSEMBLY_MEMORY_ADDR_I32
+ - Type: R_WASM_MEMORY_ADDR_I32
Index: 0
Offset: 0x00000006
Addend: -6
@@ -40,11 +40,11 @@ Sections:
# CHECK: Sections:
# CHECK: - Type: DATA
# CHECK-NEXT: Relocations:
-# CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_I32
+# CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_I32
# CHECK-NEXT: Index: 0
# CHECK-NEXT: Offset: 0x00000006
# CHECK-NEXT: Addend: 8
-# CHECK-NEXT: - Type: R_WEBASSEMBLY_MEMORY_ADDR_I32
+# CHECK-NEXT: - Type: R_WASM_MEMORY_ADDR_I32
# CHECK-NEXT: Index: 0
# CHECK-NEXT: Offset: 0x00000006
# CHECK-NEXT: Addend: -6
Modified: llvm/trunk/test/ObjectYAML/wasm/event_section.yaml
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/ObjectYAML/wasm/event_section.yaml?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/ObjectYAML/wasm/event_section.yaml (original)
+++ llvm/trunk/test/ObjectYAML/wasm/event_section.yaml Mon Feb 4 09:28:46 2019
@@ -23,7 +23,7 @@ Sections:
SigIndex: 1
- Type: CODE
Relocations:
- - Type: R_WEBASSEMBLY_EVENT_INDEX_LEB
+ - Type: R_WASM_EVENT_INDEX_LEB
Index: 1
Offset: 0x00000006
Functions:
@@ -69,7 +69,7 @@ Sections:
# CHECK-NEXT: SigIndex: 1
# CHECK-NEXT: - Type: CODE
# CHECK-NEXT: Relocations:
-# CHECK-NEXT: - Type: R_WEBASSEMBLY_EVENT_INDEX_LEB
+# CHECK-NEXT: - Type: R_WASM_EVENT_INDEX_LEB
# CHECK-NEXT: Index: 1
# CHECK-NEXT: Offset: 0x00000006
# CHECK-NEXT: Functions:
Modified: llvm/trunk/test/tools/llvm-objdump/WebAssembly/relocations.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-objdump/WebAssembly/relocations.test?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-objdump/WebAssembly/relocations.test (original)
+++ llvm/trunk/test/tools/llvm-objdump/WebAssembly/relocations.test Mon Feb 4 09:28:46 2019
@@ -10,7 +10,7 @@ entry:
}
; CHECK: RELOCATION RECORDS FOR [CODE]:
-; CHECK-NEXT: 00000006 R_WEBASSEMBLY_TYPE_INDEX_LEB 1+0
+; CHECK-NEXT: 00000006 R_WASM_TYPE_INDEX_LEB 1+0
; CHECK: RELOCATION RECORDS FOR [DATA]:
-; CHECK-NEXT: 00000006 R_WEBASSEMBLY_MEMORY_ADDR_I32 foo+0
+; CHECK-NEXT: 00000006 R_WASM_MEMORY_ADDR_I32 foo+0
Modified: llvm/trunk/test/tools/llvm-readobj/relocations.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-readobj/relocations.test?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-readobj/relocations.test (original)
+++ llvm/trunk/test/tools/llvm-readobj/relocations.test Mon Feb 4 09:28:46 2019
@@ -289,23 +289,23 @@ MACHO-ARM-NEXT: ]
WASM: Relocations [
WASM-NEXT: Section (4) CODE {
WASM-NEXT: Relocation {
-WASM-NEXT: Type: R_WEBASSEMBLY_MEMORY_ADDR_SLEB (4)
+WASM-NEXT: Type: R_WASM_MEMORY_ADDR_SLEB (4)
WASM-NEXT: Offset: 0x4
WASM-NEXT: Symbol: .L.str
WASM-NEXT: Addend: 0
WASM-NEXT: }
WASM-NEXT: Relocation {
-WASM-NEXT: Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB (0)
+WASM-NEXT: Type: R_WASM_FUNCTION_INDEX_LEB (0)
WASM-NEXT: Offset: 0xA
WASM-NEXT: Symbol: puts
WASM-NEXT: }
WASM-NEXT: Relocation {
-WASM-NEXT: Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB (0)
+WASM-NEXT: Type: R_WASM_FUNCTION_INDEX_LEB (0)
WASM-NEXT: Offset: 0x11
WASM-NEXT: Symbol: .LSomeOtherFunction_bitcast
WASM-NEXT: }
WASM-NEXT: Relocation {
-WASM-NEXT: Type: R_WEBASSEMBLY_FUNCTION_INDEX_LEB (0)
+WASM-NEXT: Type: R_WASM_FUNCTION_INDEX_LEB (0)
WASM-NEXT: Offset: 0x1E
WASM-NEXT: Symbol: SomeOtherFunction
WASM-NEXT: }
Modified: llvm/trunk/tools/llvm-objdump/WasmDump.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objdump/WasmDump.cpp?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objdump/WasmDump.cpp (original)
+++ llvm/trunk/tools/llvm-objdump/WasmDump.cpp Mon Feb 4 09:28:46 2019
@@ -36,7 +36,7 @@ llvm::getWasmRelocationValueString(const
raw_string_ostream Fmt(FmtBuf);
if (SI == Obj->symbol_end()) {
// Not all wasm relocations have symbols associated with them.
- // In particular R_WEBASSEMBLY_TYPE_INDEX_LEB.
+ // In particular R_WASM_TYPE_INDEX_LEB.
Fmt << Rel.Index;
} else {
Expected<StringRef> SymNameOrErr = SI->getName();
Modified: llvm/trunk/tools/llvm-readobj/WasmDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/WasmDumper.cpp?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/WasmDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/WasmDumper.cpp Mon Feb 4 09:28:46 2019
@@ -80,11 +80,11 @@ void WasmDumper::printRelocation(const S
bool HasAddend = false;
switch (RelocType) {
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_LEB:
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_SLEB:
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_I32:
- case wasm::R_WEBASSEMBLY_FUNCTION_OFFSET_I32:
- case wasm::R_WEBASSEMBLY_SECTION_OFFSET_I32:
+ case wasm::R_WASM_MEMORY_ADDR_LEB:
+ case wasm::R_WASM_MEMORY_ADDR_SLEB:
+ case wasm::R_WASM_MEMORY_ADDR_I32:
+ case wasm::R_WASM_FUNCTION_OFFSET_I32:
+ case wasm::R_WASM_SECTION_OFFSET_I32:
HasAddend = true;
break;
default:
Modified: llvm/trunk/tools/yaml2obj/yaml2wasm.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/yaml2obj/yaml2wasm.cpp?rev=353062&r1=353061&r2=353062&view=diff
==============================================================================
--- llvm/trunk/tools/yaml2obj/yaml2wasm.cpp (original)
+++ llvm/trunk/tools/yaml2obj/yaml2wasm.cpp Mon Feb 4 09:28:46 2019
@@ -526,11 +526,11 @@ int WasmWriter::writeRelocSection(raw_os
encodeULEB128(Reloc.Offset, OS);
encodeULEB128(Reloc.Index, OS);
switch (Reloc.Type) {
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_LEB:
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_SLEB:
- case wasm::R_WEBASSEMBLY_MEMORY_ADDR_I32:
- case wasm::R_WEBASSEMBLY_FUNCTION_OFFSET_I32:
- case wasm::R_WEBASSEMBLY_SECTION_OFFSET_I32:
+ case wasm::R_WASM_MEMORY_ADDR_LEB:
+ case wasm::R_WASM_MEMORY_ADDR_SLEB:
+ case wasm::R_WASM_MEMORY_ADDR_I32:
+ case wasm::R_WASM_FUNCTION_OFFSET_I32:
+ case wasm::R_WASM_SECTION_OFFSET_I32:
encodeULEB128(Reloc.Addend, OS);
}
}
More information about the llvm-commits
mailing list