summaryrefslogtreecommitdiffstats
path: root/llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s
Commit message (Collapse)AuthorAgeFilesLines
* [RuntimeDyld] Apply padding and alignment bumps to all sections with stubs, andLang Hames2019-05-301-2/+3
| | | | | | | | | | | | | increase the MachO/x86-64 stub alignment to 8. Stub alignment should be guaranteed for any section containing RuntimeDyld stubs/GOT-entries. To do this we should pad and align all sections containing stubs, not just code sections. This commit also bumps the MachO/x86-64 stub alignment to 8, so that GOT entries will be aligned. llvm-svn: 362139
* Simplify decoupling between RuntimeDyld/RuntimeDyldChecker, add 'got_addr' util.Lang Hames2019-04-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This patch reduces the number of functions in the interface between RuntimeDyld and RuntimeDyldChecker by combining "GetXAddress" and "GetXContent" functions into "GetXInfo" functions that return a struct describing both the address and content. The GetStubOffset function is also replaced with a pair of utilities, GetStubInfo and GetGOTInfo, that fit the new scheme. For RuntimeDyld both of these functions will return the same result, but for the new JITLink linker (https://reviews.llvm.org/D58704) these will provide the addresses of PLT stubs and GOT entries respectively. For JITLink's use, a 'got_addr' utility has been added to the rtdyld-check language, and the syntax of 'got_addr' and 'stub_addr' has been changed: both functions now take two arguments, a 'stub container name' and a target symbol name. For llvm-rtdyld/RuntimeDyld the stub container name is the object file name and section name, separated by a slash. E.g.: rtdyld-check: *{8}(stub_addr(foo.o/__text, y)) = y For the upcoming llvm-jitlink utility, which creates stubs on a per-file basis rather than a per-section basis, the container name is just the file name. E.g.: jitlink-check: *{8}(got_addr(foo.o, y)) = y llvm-svn: 358295
* [llvm] Get rid of "%T" expansionsKuba Mracek2017-08-151-2/+3
| | | | | | | | | | The %T lit expansion expands to a common directory shared between all the tests in the same directory, which is unexpected and unintuitive, and more importantly, it's been a source of subtle race conditions and flaky tests. In https://reviews.llvm.org/D35396, it was agreed that it would be best to simply ban %T and only keep %t, which is unique to each test. When a test needs a temporary directory, it can just create one using mkdir %t. This patch removes %T in llvm. Differential Revision: https://reviews.llvm.org/D36495 llvm-svn: 310953
* [RuntimeDyld][MachO] Add support for SUBTRACTOR relocations between anonymousLang Hames2016-05-191-3/+27
| | | | | | symbols on x86-64. llvm-svn: 270157
* Don't pass relocation-model= to tests that don't need it.Rafael Espindola2016-05-181-1/+1
| | | | | | | Very few things in MC itself use the option. Most of the code that that uses it could be move to CodeGen. llvm-svn: 269871
* [RuntimeDyld] Add support for absolute symbols.Lang Hames2015-10-181-1/+6
| | | | llvm-svn: 250639
* [RuntimeDyld] Support non-zero addends for the MachO X86_64 SUBTRACTOR reloc.Lang Hames2015-09-101-2/+2
| | | | | | This functionality was accidentally left out of r247119. llvm-svn: 247336
* [RuntimeDyld] Add support for MachO x86_64 SUBTRACTOR relocation.Lang Hames2015-09-091-0/+13
| | | | llvm-svn: 247119
* [RuntimeDyld] Skip relocations for external symbols with 64-bit address ~0ULL.Lang Hames2015-07-041-1/+12
| | | | | | | | | | | Requested by Eugene Rozenfeld of the LLILC team, this feature allows JIT clients to skip relocations for selected external symbols by returning ~0ULL from their symbol resolver. If this value is returned for a given symbol, RuntimeDyld will skip all relocations for that symbol. The client will be responsible for applying the skipped relocations manually before the code is executed. llvm-svn: 241383
* [RuntimeDyld] Make sure we emit MachO __eh_frame and __gcc_except_tab sections,Lang Hames2015-04-151-0/+7
| | | | | | | | even if there are no references to them in the code. This allows exceptions thrown from JIT'd code to be caught by the JIT itself. llvm-svn: 234975
* [MCJIT] Temporarily revert r220245 - it broke several bots.Lang Hames2014-10-211-3/+0
| | | | | | (See e.g. http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/17653) llvm-svn: 220249
* [MCJIT] Make MCJIT honor symbol visibility settings when populating the globalLang Hames2014-10-201-0/+3
| | | | | | | | symbol table. Patch by Anthony Pesch. Thanks Anthony! llvm-svn: 220245
* [mips] Remove XFAIL from two XPASS'ing tests on the llvm-mips-linux builderDaniel Sanders2014-10-031-1/+0
| | | | llvm-svn: 218967
* [MCJIT] Add an i386 RuntimeDyldMachO test case.Lang Hames2014-08-191-4/+4
| | | | llvm-svn: 216024
* [MCJIT] XFAIL some RuntimeDyld tests on MIPS - RuntimeDyldChecker isn't properlyLang Hames2014-07-291-0/+1
| | | | | | endian-aware yet, and this is causing failures when cross-linking on MIPS. llvm-svn: 214231
* [MCJIT] Make the RuntimeDyldChecker stub_addr builtin use file names rather thanLang Hames2014-07-291-4/+3
| | | | | | | | | | full paths for its first argument. This allows us to remove the annoying sed lines in the test cases, and write direct references to file names in stub_addr calls (rather than <filename> placeholders). llvm-svn: 214211
* Rework to let RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s pass on win32.NAKAMURA Takumi2014-07-231-4/+1
| | | | | | | FIXME: "llvm-rtdyld -verify -check" is still sensitive to path separator. Fix searching StubMap to be tolerant of both '/' and '\\' on Win32. llvm-svn: 213723
* Suppress a test on win32 for now, ↵NAKAMURA Takumi2014-07-231-0/+3
| | | | | | | llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s. FIXME: Fix searching StubMap with '/' and '\\' on Win32. llvm-svn: 213721
* RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s: Use %/T here, or sed(1) ↵NAKAMURA Takumi2014-07-231-1/+1
| | | | | | would be confused with dos path. llvm-svn: 213720
* [MCJIT] Refactor and add stub inspection to the RuntimeDyldChecker framework.Lang Hames2014-07-221-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a 'stub_addr' builtin that can be used to find the address of the stub for a given (<file>, <section>, <symbol>) tuple. This address can be used both to verify the contents of stubs (by loading from the returned address) and to verify references to stubs (by comparing against the returned address). Example (1) - Verifying stub contents: Load 8 bytes (assuming a 64-bit target) from the stub for 'x' in the __text section of f.o, and compare that value against the addres of 'x'. # rtdyld-check: *{8}(stub_addr(f.o, __text, x) = x Example (2) - Verifying references to stubs: Decode the immediate of the instruction at label 'l', and verify that it's equal to the offset from the next instruction's PC to the stub for 'y' in the __text section of f.o (i.e. it's the correct PC-rel difference). # rtdyld-check: decode_operand(l, 4) = stub_addr(f.o, __text, y) - next_pc(l) l: movq y@GOTPCREL(%rip), %rax Since stub inspection requires cooperation with RuntimeDyldImpl this patch pimpl-ifies RuntimeDyldChecker. Its implementation is moved in to a new class, RuntimeDyldCheckerImpl, that has access to the definition of RuntimeDyldImpl. llvm-svn: 213698
* Fix this test to not write to the source tree, and instead to write toChandler Carruth2014-06-281-3/+3
| | | | | | | a temporary file. This fixes the test in cases where the source tree is mounted read-only. llvm-svn: 211975
* [RuntimeDyld] Make sure that RuntimeDyld regression tests only run for targetsLang Hames2014-06-271-0/+32
that have been enabled. Without this, testers will fail when llvm-rtdyld is invoked with triples for unsupported targets. llvm-svn: 211969
OpenPOWER on IntegriCloud