History log of /llvm-project/llvm/lib/Object/WasmObjectFile.cpp (Results 176 – 200 of 222)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 9138b7b0 30-Nov-2017 Sam Clegg <sbc@chromium.org>

Add visibility flag to Wasm symbol flags

The LLVM "hidden" flag needs to be passed through the Wasm
intermediate objects in order for the linker to apply
it to the final Wasm object.

The correspond

Add visibility flag to Wasm symbol flags

The LLVM "hidden" flag needs to be passed through the Wasm
intermediate objects in order for the linker to apply
it to the final Wasm object.

The corresponding change in LLD is here: https://github.com/WebAssembly/lld/pull/14

Patch by Nicholas Wilson

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

llvm-svn: 319488

show more ...


Revision tags: llvmorg-5.0.1-rc2, llvmorg-5.0.1-rc1
# 35b50a83 23-Oct-2017 Vedant Kumar <vsk@apple.com>

[wasm] readSection: Avoid reading past eof (fixes oss-fuzz #3219)

A wasm file crafted with a bogus section size can trigger an ASan issue
in the DWARFObjInMemory constructor. Nip the problem in the

[wasm] readSection: Avoid reading past eof (fixes oss-fuzz #3219)

A wasm file crafted with a bogus section size can trigger an ASan issue
in the DWARFObjInMemory constructor. Nip the problem in the bud when we
read the wasm section.

Found by OSS-Fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=3219

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

llvm-svn: 316357

show more ...


# 63ebb813 29-Sep-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Allow each data segment to specify its own alignment

Also, add a flags field as we will almost certainly
be needing that soon too.

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

[WebAssembly] Allow each data segment to specify its own alignment

Also, add a flags field as we will almost certainly
be needing that soon too.

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

llvm-svn: 314534

show more ...


# ba9fa9fd 26-Sep-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Model weakly defined symbols as wasm exports

Previously these were being included as both imports and
exports, with the import being satisfied by the export
(or some strong symbol) at

[WebAssembly] Model weakly defined symbols as wasm exports

Previously these were being included as both imports and
exports, with the import being satisfied by the export
(or some strong symbol) at runtime. However proved
unnecessary and actually complicated linking as it meant
there was not a 1-to-1 mapping between a wasm function
/global index and a linker symbol.

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

llvm-svn: 314245

show more ...


# afd34c6d 26-Sep-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Use function/global index space in WasmSymbol

It is useful for the symbol to contain the index of the
function of global it represents in the function/global
index space.

For imports

[WebAssembly] Use function/global index space in WasmSymbol

It is useful for the symbol to contain the index of the
function of global it represents in the function/global
index space.

For imports we also store the import index so that the
linker can find, for example, the signature of the
corresponding function, which is defined by the import

In the long run we need to decide whether this API
surface should be closer to binary (where imported
functions are seperate) or the wasm spec (where the
function index space is unified).

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

llvm-svn: 314230

show more ...


# 79cd5d00 20-Sep-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Weak symbols should be defined in SF_Global

Summary:
This manifested itself in lld since it meant that weak
symbols were not appearing in archive symbol tables.

Subscribers: jfb, dsch

[WebAssembly] Weak symbols should be defined in SF_Global

Summary:
This manifested itself in lld since it meant that weak
symbols were not appearing in archive symbol tables.

Subscribers: jfb, dschuff, jgravelle-google, aheejin

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

llvm-svn: 313838

show more ...


# 31a2c809 20-Sep-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Add support for local symbol bindings

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

llvm-svn: 313817


# d95ed959 20-Sep-2017 Sam Clegg <sbc@chromium.org>

Reland "[WebAssembly] Add support for naming wasm data segments"

Add adds support for naming data segments. This is useful
useful linkers so that they can merge similar sections.

Differential Revi

Reland "[WebAssembly] Add support for naming wasm data segments"

Add adds support for naming data segments. This is useful
useful linkers so that they can merge similar sections.

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

llvm-svn: 313795

show more ...


# b487bf45 20-Sep-2017 Mike Edwards <mike@sqlby.me>

Reverting due to Green Dragon bot failure.

http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/42594/

llvm-svn: 313706


# b292c259 19-Sep-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Add support for naming wasm data segments

Add adds support for naming data segments. This is useful
useful linkers so that they can merge similar sections.

Differential Revision: htt

[WebAssembly] Add support for naming wasm data segments

Add adds support for naming data segments. This is useful
useful linkers so that they can merge similar sections.

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

llvm-svn: 313692

show more ...


# e7a60708 06-Sep-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Only treat imports/exports as symbols when reading relocatable object files

This change only treats imported and exports functions and globals
as symbol table entries the object has a

[WebAssembly] Only treat imports/exports as symbols when reading relocatable object files

This change only treats imported and exports functions and globals
as symbol table entries the object has a "linking" section (i.e. it is
relocatable object file).

In this case all globals must be of type I32 and initialized with
i32.const. This was previously being assumed but not checked for and
was causing a failure on big endian machines due to using the wrong
value of then union.

See: https://bugs.llvm.org/show_bug.cgi?id=34487

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

llvm-svn: 312674

show more ...


# 13a2e899 01-Sep-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Update relocation names to match spec

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

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

llvm-

[WebAssembly] Update relocation names to match spec

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

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

llvm-svn: 312342

show more ...


# 4194fb70 01-Sep-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Fix getSymbolValue for exported globals

The code wasn't previously taking into account that the
global index space is not same as the into in the Globals
array since the latter does no

[WebAssembly] Fix getSymbolValue for exported globals

The code wasn't previously taking into account that the
global index space is not same as the into in the Globals
array since the latter does not include imported globals.

This fixes the WebAssembly waterfall failures.

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

llvm-svn: 312340

show more ...


Revision tags: llvmorg-5.0.0, llvmorg-5.0.0-rc5
# b09cfa51 31-Aug-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Fix getSymbolValue() for data symbols

This is mostly a fix for the output of `llvm-nm`

See Bug 34392: https://bugs.llvm.org//show_bug.cgi?id=34392

Differential Revision: https://revi

[WebAssembly] Fix getSymbolValue() for data symbols

This is mostly a fix for the output of `llvm-nm`

See Bug 34392: https://bugs.llvm.org//show_bug.cgi?id=34392

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

llvm-svn: 312294

show more ...


# a3b9fe6a 31-Aug-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Validate exports when parsing object files

Subscribers: jfb, dschuff, jgravelle-google, aheejin

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

llvm-svn: 312286


Revision tags: llvmorg-5.0.0-rc4, llvmorg-5.0.0-rc3
# a845167d 23-Aug-2017 Jonas Devlieghere <jonas@devlieghere.com>

[WebAssembly] Fix overflow for input with missing version

Differential revision: https://reviews.llvm.org/D37070

llvm-svn: 311605


Revision tags: llvmorg-5.0.0-rc2, llvmorg-5.0.0-rc1
# 9c07f94a 12-Jul-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Expose the offset of each data segment

Summary:
This allows tools like lld that process relocations
to apply data relocation correctly. This information
is required because relocation

[WebAssembly] Expose the offset of each data segment

Summary:
This allows tools like lld that process relocations
to apply data relocation correctly. This information
is required because relocation are stored as section
offset.

Subscribers: jfb, dschuff, jgravelle-google, aheejin

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

llvm-svn: 307741

show more ...


# 5e3d33a7 07-Jul-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Support weak defined symbols

Model weakly defined symbols as symbols that are both
exports and imported and marked as weak. Local references
to the symbols refer to the import but the

[WebAssembly] Support weak defined symbols

Model weakly defined symbols as symbols that are both
exports and imported and marked as weak. Local references
to the symbols refer to the import but the linker can
resolve this to the weak export if not strong symbol
is found at link time.

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

llvm-svn: 307348

show more ...


# 4df5d764 27-Jun-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Add support for printing relocations with llvm-objdump

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

llvm-svn: 306461


# 9e1ade93 27-Jun-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Add data size and alignement to linking section

The overal size of the data section (including BSS)
is otherwise not included in the wasm binary.

Differential Revision: https://review

[WebAssembly] Add data size and alignement to linking section

The overal size of the data section (including BSS)
is otherwise not included in the wasm binary.

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

llvm-svn: 306459

show more ...


# 7f055dee 20-Jun-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Fix build failures introduced in r305769

This fixes two build failures that only occur in certain
configurations:
- error: unused function 'operator<<'
- error: control reaches end of

[WebAssembly] Fix build failures introduced in r305769

This fixes two build failures that only occur in certain
configurations:
- error: unused function 'operator<<'
- error: control reaches end of non-void function

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

llvm-svn: 305770

show more ...


# b7787fd0 20-Jun-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Add support for weak symbols in the binary format

This also introduces the updated format for the
"linking" section which can represent extra
symbol information. See:
https://github.c

[WebAssembly] Add support for weak symbols in the binary format

This also introduces the updated format for the
"linking" section which can represent extra
symbol information. See:
https://github.com/WebAssembly/tool-conventions/pull/10

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

llvm-svn: 305769

show more ...


# 9d24fb7f 16-Jun-2017 Sam Clegg <sbc@chromium.org>

[WebAssembly] Use __stack_pointer global when writing wasm binary

This ensures that symbolic relocations are generated for stack
pointer manipulations.

These relocations are of type R_WEBASSEMBLY_G

[WebAssembly] Use __stack_pointer global when writing wasm binary

This ensures that symbolic relocations are generated for stack
pointer manipulations.

These relocations are of type R_WEBASSEMBLY_GLOBAL_INDEX_LEB.
This change also adds support for reading relocations of this
type in WasmObjectFile.cpp.

Since its a globally imported symbol this does mean that
the get_global/set_global instruction won't be valid until
the objects are linked that global used in no longer an
imported global.

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

llvm-svn: 305616

show more ...


Revision tags: llvmorg-4.0.1, llvmorg-4.0.1-rc3
# 264b5d9e 07-Jun-2017 Zachary Turner <zturner@google.com>

Move Object format code to lib/BinaryFormat.

This creates a new library called BinaryFormat that has all of
the headers from llvm/Support containing structure and layout
definitions for various type

Move Object format code to lib/BinaryFormat.

This creates a new library called BinaryFormat that has all of
the headers from llvm/Support containing structure and layout
definitions for various types of binary formats like dwarf, coff,
elf, etc as well as the code for identifying a file from its
magic.

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

llvm-svn: 304864

show more ...


Revision tags: llvmorg-4.0.1-rc2
# a25d329b 27-May-2017 George Rimar <grimar@accesssoftek.com>

Recommit "[DWARF] - Make collectAddressRanges() return section index in addition to Low/High PC"

With fix of uninitialized variable.

Original commit message:

This change is intended to use for LLD

Recommit "[DWARF] - Make collectAddressRanges() return section index in addition to Low/High PC"

With fix of uninitialized variable.

Original commit message:

This change is intended to use for LLD in D33183.
Problem we have in LLD when building .gdb_index is that we need to know section which address range belongs to.

Previously it was solved on LLD side by providing fake section addresses with use of llvm::LoadedObjectInfo
interface. We assigned file offsets as addressed. Then after obtaining ranges lists, for each range we had to find section ID's.
That not only was slow, but also complicated implementation and was the reason of incorrect behavior when
sections share the same offsets, like D33176 shows.

This patch makes DWARF parsers to return section index as well. That solves problem mentioned above.

Differential revision: https://reviews.llvm.org/D33184

llvm-svn: 304078

show more ...


123456789