History log of /llvm-project/llvm/lib/Object/WasmObjectFile.cpp (Results 101 – 125 of 222)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# fe8aabf9 20-Apr-2019 Sam Clegg <sbc@chromium.org>

[WebAssembly] Object: Improve error messages on invalid section

Also add a test.

Differential Revision: https://reviews.llvm.org/D60836

llvm-svn: 358801


# fef8de66 12-Apr-2019 Thomas Lively <tlively@google.com>

[WebAssembly] Add DataCount section to object files

Summary:
This ensures that object files will continue to validate as
WebAssembly modules in the presence of bulk memory operations. Engines
that d

[WebAssembly] Add DataCount section to object files

Summary:
This ensures that object files will continue to validate as
WebAssembly modules in the presence of bulk memory operations. Engines
that don't support bulk memory operations will not recognize the
DataCount section and will report validation errors, but that's ok
because object files aren't supposed to be run directly anyway.

Reviewers: aheejin, dschuff, sbc100

Subscribers: jgravelle-google, hiraditya, sunfish, rupprecht, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D60623

llvm-svn: 358315

show more ...


# 6a0746a9 07-Apr-2019 Fangrui Song <maskray@google.com>

Change some StringRef::data() reinterpret_cast to bytes_begin() or arrayRefFromStringRef()

llvm-svn: 357852


# 2a7cac93 04-Apr-2019 Sam Clegg <sbc@chromium.org>

[WebAssembly] Add new explicit relocation types for PIC relocations

See https://github.com/WebAssembly/tool-conventions/pull/106

Differential Revision: https://reviews.llvm.org/D59907

llvm-svn: 35

[WebAssembly] Add new explicit relocation types for PIC relocations

See https://github.com/WebAssembly/tool-conventions/pull/106

Differential Revision: https://reviews.llvm.org/D59907

llvm-svn: 357710

show more ...


# 492f7529 26-Mar-2019 Sam Clegg <sbc@chromium.org>

[WebAssembly] Initial implementation of PIC code generation

This change implements lowering of references global symbols in PIC
mode.

This change implements lowering of global references in PIC mod

[WebAssembly] Initial implementation of PIC code generation

This change implements lowering of references global symbols in PIC
mode.

This change implements lowering of global references in PIC mode using a
new @GOT reference type. @GOT references can be used with function or
data symbol names combined with the get_global instruction. In this case
the linker will insert the wasm global that stores the address of the
symbol (either in memory for data symbols or in the wasm table for
function symbols).

For now I'm continuing to use the R_WASM_GLOBAL_INDEX_LEB relocation
type for this type of reference which means that this relocation type
can refer to either a global or a function or data symbol. We could
choose to introduce specific relocation types for GOT entries in the
future. See the current dynamic linking proposal:

https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md

Differential Revision: https://reviews.llvm.org/D54647

llvm-svn: 357022

show more ...


# f6f4f843 20-Mar-2019 Thomas Lively <tlively@google.com>

[WebAssembly] Target features section

Summary:
Implements a new target features section in assembly and object files
that records what features are used, required, and disallowed in
WebAssembly obje

[WebAssembly] Target features section

Summary:
Implements a new target features section in assembly and object files
that records what features are used, required, and disallowed in
WebAssembly objects. The linker uses this information to ensure that
all objects participating in a link are feature-compatible and records
the set of used features in the output binary for use by optimizers
and other tools later in the toolchain.

The "atomics" feature is always required or disallowed to prevent
linking code with stripped atomics into multithreaded binaries. Other
features are marked used if they are enabled globally or on any
function in a module.

Future CLs will add linker flags for ignoring feature compatibility
checks and for specifying the set of allowed features, implement using
the presence of the "atomics" feature to control the type of memory
and segments in the linked binary, and add front-end flags for
relaxing the linkage policy for atomics.

Reviewers: aheejin, sbc100, dschuff

Subscribers: jgravelle-google, hiraditya, sunfish, mgrang, jfb, jdoerfert, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59173

llvm-svn: 356610

show more ...


Revision tags: llvmorg-8.0.0
# a688a42c 13-Mar-2019 Sam Clegg <sbc@chromium.org>

[WebAssembly] Improve support for "needed" list in dylink section

This change adds basic support for shared library dependencies
via the dylink section.

See https://github.com/WebAssembly/tool-conv

[WebAssembly] Improve support for "needed" list in dylink section

This change adds basic support for shared library dependencies
via the dylink section.

See https://github.com/WebAssembly/tool-conventions/pull/77

Differential Revision: https://reviews.llvm.org/D59237

llvm-svn: 356102

show more ...


Revision tags: llvmorg-8.0.0-rc5, llvmorg-8.0.0-rc4, llvmorg-8.0.0-rc3
# 9757bba4 20-Feb-2019 Thomas Lively <tlively@google.com>

[WebAssembly] Generalize section ordering constraints

Summary:
Changes from using a total ordering of known sections to using a
dependency graph approach. This allows our tools to accept and process

[WebAssembly] Generalize section ordering constraints

Summary:
Changes from using a total ordering of known sections to using a
dependency graph approach. This allows our tools to accept and process
binaries that are compliant with the spec and tool conventions that
would have been previously rejected. It also means our own tools can
do less work to enforce an artificially imposed ordering. Using a
general mechanism means fewer special cases and exceptions in the
ordering logic.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, hiraditya, sunfish, jdoerfert, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D58312

llvm-svn: 354426

show more ...


# 2e150409 19-Feb-2019 Thomas Lively <tlively@google.com>

[WebAssembly] Update MC for bulk memory

Summary:
Rename MemoryIndex to InitFlags and implement logic for determining
data segment layout in ObjectYAML and MC. Also adds a "passive" flag
for the .sec

[WebAssembly] Update MC for bulk memory

Summary:
Rename MemoryIndex to InitFlags and implement logic for determining
data segment layout in ObjectYAML and MC. Also adds a "passive" flag
for the .section assembler directive although this cannot be assembled
yet because the assembler does not support data sections.

Reviewers: sbc100, aardappel, aheejin, dschuff

Subscribers: jgravelle-google, hiraditya, sunfish, rupprecht, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D57938

llvm-svn: 354397

show more ...


Revision tags: llvmorg-7.1.0, llvmorg-7.1.0-rc1
# 29874cea 07-Feb-2019 Dan Gohman <dan433584@gmail.com>

[WebAssembly] Fix imported function symbol names that differ from their import names in the .o format

Add a flag to allow symbols to have a wasm import name which differs from the
linker symbol name

[WebAssembly] Fix imported function symbol names that differ from their import names in the .o format

Add a flag to allow symbols to have a wasm import name which differs from the
linker symbol name, allowing the linker to link code using the import_module
attribute.

This is the MC/Object portion of the patch.

Differential Revision: https://reviews.llvm.org/D57632

llvm-svn: 353474

show more ...


Revision tags: llvmorg-8.0.0-rc2
# d9c9dc03 05-Feb-2019 Sam Clegg <sbc@chromium.org>

[WebAssembly] Object: Remove redundant method. NFC.

Differential Revision: https://reviews.llvm.org/D57719

llvm-svn: 353183


# 18c56a07 04-Feb-2019 Heejin Ahn <aheejin@gmail.com>

[WebAssembly] clang-tidy (NFC)

Summary:
This patch fixes clang-tidy warnings on wasm-only files.
The list of checks used is:
`-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-

[WebAssembly] clang-tidy (NFC)

Summary:
This patch fixes clang-tidy warnings on wasm-only files.
The list of checks used is:
`-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-identifier-naming,modernize-*`
(LLVM's default .clang-tidy list is the same except it does not have
`modernize-*`. But I've seen in multiple CLs in LLVM the modernize style
was recommended and code was fixed based on the style, so I added it as
well.)

The common fixes are:
- Variable names start with an uppercase letter
- Function names start with a lowercase letter
- Use `auto` when you use casts so the type is evident
- Use inline initialization for class member variables
- Use `= default` for empty constructors / destructors
- Use `using` in place of `typedef`

Reviewers: sbc100, tlively, aardappel

Subscribers: dschuff, sunfish, jgravelle-google, yurydelendik, kripken, MatzeB, mgorny, rupprecht, llvm-commits

Differential Revision: https://reviews.llvm.org/D57500

llvm-svn: 353075

show more ...


# d1152a26 04-Feb-2019 Sam Clegg <sbc@chromium.org>

[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 na

[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

llvm-svn: 353062

show more ...


# c7d2e5f1 30-Jan-2019 Sam Clegg <sbc@chromium.org>

[WebAssembly] Add missing SymbolRef update from rL352551

This change broke some MC tests which are now fixed.

Differential Revision: https://reviews.llvm.org/D57424

llvm-svn: 352573


# 2a193e0d 29-Jan-2019 Sam Clegg <sbc@chromium.org>

[WebAssembly] Ensure BasicSymbolRef.getRawDataRefImpl().p is non-null

Store a non-zero value to ref.d.a and use ref.d.b to store the symbol
index. This means that ref.p is never null, which was con

[WebAssembly] Ensure BasicSymbolRef.getRawDataRefImpl().p is non-null

Store a non-zero value to ref.d.a and use ref.d.b to store the symbol
index. This means that ref.p is never null, which was confusing
llvm-nm.

Fixes PR40497

Differential Revision: https://reviews.llvm.org/D57373

llvm-svn: 352551

show more ...


Revision tags: llvmorg-8.0.0-rc1
# 2946cd70 19-Jan-2019 Chandler Carruth <chandlerc@gmail.com>

Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the ne

Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

llvm-svn: 351636

show more ...


# f3b762a0 17-Jan-2019 Wouter van Oortmerssen <aardappel@gmail.com>

[WebAssembly] Fixed objdump not parsing function headers.

Summary:
objdump was interpreting the function header containing the locals
declaration as instructions. To parse these without injecting ta

[WebAssembly] Fixed objdump not parsing function headers.

Summary:
objdump was interpreting the function header containing the locals
declaration as instructions. To parse these without injecting target
specific code in objdump, MCDisassembler::onSymbolStart was added to
be implemented by the WebAssembly implemention.

WasmObjectFile now returns a code offset for the "address" of a symbol,
rather than the index. This is also more in-line with what other
targets do.

Also ensured that the AsmParser correctly puts each function
in its own segment to enable this test case.

Reviewers: sbc100, dschuff

Subscribers: jgravelle-google, aheejin, sunfish, rupprecht, llvm-commits

Differential Revision: https://reviews.llvm.org/D56684

llvm-svn: 351460

show more ...


# cbda16eb 17-Jan-2019 Thomas Lively <tlively@google.com>

[WebAssembly] Parse llvm.ident into producers section

llvm-svn: 351413


# 3cfcc94c 17-Jan-2019 Thomas Lively <tlively@google.com>

Revert "[WebAssembly] Parse llvm.ident into producers section"

This reverts commit eccdbba3a02a33e13b5262e92200a33e2ead873d.

llvm-svn: 351410


# a56c23c5 16-Jan-2019 Thomas Lively <tlively@google.com>

[WebAssembly] Parse llvm.ident into producers section

Summary:
Everything before the word "version" is the tool, and everything after
the word "version" is the version.

Reviewers: aheejin, dschuff

[WebAssembly] Parse llvm.ident into producers section

Summary:
Everything before the word "version" is the tool, and everything after
the word "version" is the version.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

Differential Revision: https://reviews.llvm.org/D56742

llvm-svn: 351399

show more ...


# 6a87ddac 08-Jan-2019 Thomas Lively <tlively@google.com>

[WebAssembly] Massive instruction renaming

Summary:
An automated renaming of all the instructions listed at
https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329
as well as some simi

[WebAssembly] Massive instruction renaming

Summary:
An automated renaming of all the instructions listed at
https://github.com/WebAssembly/spec/issues/884#issuecomment-426433329
as well as some similarly-named identifiers.

Reviewers: aheejin, dschuff, aardappel

Subscribers: sbc100, jgravelle-google, eraman, sunfish, jfb, llvm-commits

Differential Revision: https://reviews.llvm.org/D56338

llvm-svn: 350609

show more ...


# feef720b 15-Dec-2018 Heejin Ahn <aheejin@gmail.com>

[WebAssembly] Check if the section order is correct

Summary:
This patch checks if the section order is correct when reading a wasm
object file in `WasmObjectFile` and converting YAML to wasm object

[WebAssembly] Check if the section order is correct

Summary:
This patch checks if the section order is correct when reading a wasm
object file in `WasmObjectFile` and converting YAML to wasm object in
yaml2wasm. (It is not possible to check when reading YAML because it is
handled exclusively by the YAML reader.)

This checks the ordering of all known sections (core sections + known
custom sections). This also adds section ID DataCount section that will
be scheduled to be added in near future.

Reviewers: sbc100

Subscribers: dschuff, mgorny, jgravelle-google, sunfish, llvm-commits

Differential Revision: https://reviews.llvm.org/D54924

llvm-svn: 349221

show more ...


# 03801256 12-Dec-2018 Sam Clegg <sbc@chromium.org>

[WebAssembly] Update dylink section parsing

This updates the format of the dylink section in accordance with
recent "spec" change:
https://github.com/WebAssembly/tool-conventions/pull/77

Differen

[WebAssembly] Update dylink section parsing

This updates the format of the dylink section in accordance with
recent "spec" change:
https://github.com/WebAssembly/tool-conventions/pull/77

Differential Revision: https://reviews.llvm.org/D55609

llvm-svn: 348989

show more ...


# a2125b8d 08-Dec-2018 Heejin Ahn <aheejin@gmail.com>

[WebAssembly] Make WasmSymbol's signature usable for events (NFC)

Summary:
WasmSignature used to use its `WasmSignature` member variable only for
function types, but now it also can be used for even

[WebAssembly] Make WasmSymbol's signature usable for events (NFC)

Summary:
WasmSignature used to use its `WasmSignature` member variable only for
function types, but now it also can be used for events as well.

Reviewers: sbc100

Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits

Differential Revision: https://reviews.llvm.org/D55247

llvm-svn: 348702

show more ...


Revision tags: llvmorg-7.0.1, llvmorg-7.0.1-rc3
# e4afbc68 14-Nov-2018 Sam Clegg <sbc@chromium.org>

[WebAssembly] Add support for dylink section in object format

See https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md.

Differential Revision: https://reviews.llvm.org/D544

[WebAssembly] Add support for dylink section in object format

See https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md.

Differential Revision: https://reviews.llvm.org/D54490

llvm-svn: 346880

show more ...


123456789