summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objdump/WebAssembly/symbol-table.test
Commit message (Collapse)AuthorAgeFilesLines
* [WebAssembly] Fixed objdump not parsing function headers.Wouter van Oortmerssen2019-01-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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
* [llvm-objdump] Add symbol 'O' for object dataKristina Brooks2018-11-111-2/+2
| | | | | | | | | | | | | Improve compatibility with GNU objdump by showing `O` next to global symbol names, instead of a blank space. Patch by Higuoxing (Xing). Reviewers: MaskRay Differential Revision: https://reviews.llvm.org/D54380 llvm-svn: 346610
* [WebAssembly] Update test cases after FixFunctionBitcastsHeejin Ahn2018-11-071-0/+1
| | | | | | | | | | | | | | Summary: This updates generated binaries and corresponding test cases up to date after applying FixFunctionBitcasts pass. Reviewers: sbc100 Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits Differential Revision: https://reviews.llvm.org/D54070 llvm-svn: 346286
* [WebAssembly] Update pre-generated test files to match latest llc output. NFC.Nicholas Wilson2018-03-011-2/+2
| | | | | | | | The ordering of llc's output was changed in rL326334. Differential Revision: https://reviews.llvm.org/D43941 llvm-svn: 326445
* [WebAssembly] Add first claass symbol table to wasm objectsSam Clegg2018-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | This is combination of two patches by Nicholas Wilson: 1. https://reviews.llvm.org/D41954 2. https://reviews.llvm.org/D42495 Along with a few local modifications: - One change I made was to add the UNDEFINED bit to the binary format to avoid the extra byte used when writing data symbols. Although this bit is redundant for other symbols types (i.e. undefined can be implied if a function or global is a wasm import) - I prefer to be explicit and consistent and not have derived flags. - Some field renaming. - Some reverting of unrelated minor changes. - No test output differences. Differential Revision: https://reviews.llvm.org/D43147 llvm-svn: 325860
* [WebAssebmly] Report undefined symbols correctly in objdumpSam Clegg2018-02-091-4/+4
| | | | | | | | | | | | | | Peviously we were reporting undefined symbol as being defined by the IMPORT sections. This change reports undefined symbols in the same that other formats do, and also removes the need to store the section with each symbol (since it can be derived from the symbol type). Differential Revision: https://reviews.llvm.org/D43101 llvm-svn: 324770
* [WebAssembly] Remove debug names from symbol tableSam Clegg2018-01-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Get rid of DEBUG_FUNCTION_NAME symbols. When we actually debug data, maybe we'll want somewhere to put it... but having a symbol that just stores the name of another symbol seems odd. It means you have multiple Symbols with the same name, one containing the actual function and another containing the name! Store the names in a vector on the WasmObjectFile when reading them in. Also stash them on the WasmFunctions themselves. The names are //not// "symbol names" or aliases or anything, they're just the name that a debugger should show against the function body itself. NB. The WasmObjectFile stores them so that they can be exported in the YAML losslessly, and hence the tests can be precise. Enforce that the CODE section has been read in before reading the "names" section. Requires minor adjustment to some tests. Patch by Nicholas Wilson! Differential Revision: https://reviews.llvm.org/D42075 llvm-svn: 322741
* [WebAssembly] Add support for local symbol bindingsSam Clegg2017-09-201-5/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D38096 llvm-svn: 313817
* [WebAssembly] Only treat imports/exports as symbols when reading relocatable ↵Sam Clegg2017-09-061-3/+3
| | | | | | | | | | | | | | | | | | | 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
* [WebAssembly] Fix getSymbolValue() for data symbolsSam Clegg2017-08-311-1/+1
| | | | | | | | | | 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
* [WebAssembly] Be consistent in generating trivial test input filesSam Clegg2017-07-101-7/+10
| | | | | | | | | | | | | For each checked-in wasm file, make sure the there is corresponding .ll file that can be used to regenerate it if needed. Add test/Object/Inputs/trivial-object-test.wasm to match other formats and add some new wasm tests in test/Object. Differential Revision: https://reviews.llvm.org/D35213 llvm-svn: 307585
* [WebAssembly] Add wasm symbol table support to llvm-objdumpSam Clegg2017-05-041-0/+8
Differential Revision: https://reviews.llvm.org/D32760 llvm-svn: 302185
OpenPOWER on IntegriCloud