1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 11:33:24 +02:00
llvm-mirror/lib
Rafael Espindola eba10cda24 Use a got to access a hidden weak undefined on MachO.
Trying to link

__attribute__((weak, visibility("hidden"))) extern int foo;
int *main(void) {
  return &foo;
}

on OS X fails with

ld: 32-bit RIP relative reference out of range (-4294971318 max is +/-2GB): from _main (0x100000FAB) to _foo@0x00001000 (0x00000000) in '_main' from test.o for architecture x86_64

The problem being that 0 cannot be computed as a fixed difference from
%rip. Exactly the same issue exists on ELF and we can use the same
solution.

llvm-svn: 322739
2018-01-17 19:19:55 +00:00
..
Analysis [PowerPC] Add handling for ColdCC calling convention and a pass to mark 2018-01-17 18:22:55 +00:00
AsmParser Allow dso_local on ifunc. 2018-01-12 17:03:43 +00:00
BinaryFormat Simplify. 2017-10-19 01:32:18 +00:00
Bitcode [NFC] fix trivial typos in comments 2018-01-17 12:29:38 +00:00
CodeGen [ARM GlobalISel] Legalize G_FPEXT and G_FPTRUNC 2018-01-17 13:34:10 +00:00
DebugInfo Fix pretty printing the unspecified param of a variadic function 2018-01-17 01:22:03 +00:00
Demangle Silence a bunch of implicit fallthrough warnings 2017-12-19 22:05:25 +00:00
ExecutionEngine [ExecutionEngine] Rename JITSymbol::isStrongDefinition to isStrong. 2018-01-16 20:39:51 +00:00
Fuzzer [libFuzzer] Delete llvm/lib/Fuzzer 2017-10-16 20:48:19 +00:00
FuzzMutate [FuzzMutate] Don't crash when mutator is unable to find operation 2017-12-19 08:52:51 +00:00
IR [Attributes] Fix crash when attempting to remove alignment from an attribute list/set 2018-01-17 19:15:21 +00:00
IRReader Remove redundant includes from various places. 2017-12-13 21:31:03 +00:00
LineEditor
Linker Fix crash when linking metadata with ODR type uniquing 2018-01-09 18:32:53 +00:00
LTO [ThinLTO] - Remove code duplication. NFC. 2018-01-17 10:33:05 +00:00
MC [WebAssembly] Make WasmObjectWriter's destructor public; NFC 2018-01-15 17:06:23 +00:00
Object [WebAssembly] Don't allow functions to be named twice 2018-01-12 02:11:31 +00:00
ObjectYAML [WebAssembly] Add COMDAT support 2018-01-09 23:43:14 +00:00
Option [Option] For typo '-foo', suggest '--foo' 2018-01-09 19:38:04 +00:00
Passes Add a pass to generate synthetic function entry counts. 2018-01-09 19:39:35 +00:00
ProfileData Remove superfluous copies in sample profiling. 2017-12-28 18:10:41 +00:00
Support [Support] Return an enum instead of an unsigned; NFC. 2018-01-17 03:12:06 +00:00
TableGen Avoid int to string conversion in Twine or raw_ostream contexts. 2017-12-28 16:58:54 +00:00
Target Use a got to access a hidden weak undefined on MachO. 2018-01-17 19:19:55 +00:00
Testing Force #define GTEST_LANG_CXX11. 2017-10-27 21:12:28 +00:00
ToolDrivers Remove redundant includes from various places. 2017-12-13 21:31:03 +00:00
Transforms [PowerPC] Add handling for ColdCC calling convention and a pass to mark 2018-01-17 18:22:55 +00:00
WindowsManifest
XRay [XRay] Use optimistic logging model for FDR mode 2017-11-21 07:16:57 +00:00
CMakeLists.txt
LLVMBuild.txt