llvm-6502/lib
Rafael Espindola 5512415ade Add r224985 back with two fixes.
One is that AArch64 has additional restrictions on when local relocations can
be used. We have to take those into consideration when deciding to put a L
symbol in the symbol table or not.

The other is that ld64 requires the relocations to cstring to use linker
visible symbols on AArch64.

Thanks to Michael Zolotukhin for testing this!

Remove doesSectionRequireSymbols.

In an assembly expression like

bar:
.long L0 + 1

the intended semantics is that bar will contain a pointer one byte past L0.

In sections that are merged by content (strings, 4 byte constants, etc), a
single position in the section doesn't give the linker enough information.
For example, it would not be able to tell a relocation must point to the
end of a string, since that would look just like the start of the next.

The solution used in ELF to use relocation with symbols if there is a non-zero
addend.

In MachO before this patch we would just keep all symbols in some sections.

This would miss some cases (only cstrings on x86_64 were implemented) and was
inefficient since most relocations have an addend of 0 and can be represented
without the symbol.

This patch implements the non-zero addend logic for MachO too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225644 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-12 18:13:07 +00:00
..
Analysis Fix PR22179. 2015-01-10 23:41:24 +00:00
AsmParser IR: Add 'distinct' MDNodes to bitcode and assembly 2015-01-08 22:38:29 +00:00
Bitcode Use the DiagnosticHandler to print diagnostics when reading bitcode. 2015-01-10 00:07:30 +00:00
CodeGen [SimplifyLibCalls] Factor out fortified libcall handling. 2015-01-12 17:22:43 +00:00
DebugInfo Implement a very basic colored syntax highlighting for llvm-dwarfdump. 2015-01-06 16:50:25 +00:00
ExecutionEngine Fix undefined behavior (shift of negative value) in RuntimeDyldMachOAArch64::encodeAddend. 2015-01-10 00:46:38 +00:00
IR IR: Simplify replaceOperandWith(), NFC 2015-01-12 18:01:45 +00:00
IRReader Remove unused variable. NFC. 2014-11-06 23:16:57 +00:00
LineEditor
Linker Use the DiagnosticHandler to print diagnostics when reading bitcode. 2015-01-10 00:07:30 +00:00
LTO Use the DiagnosticHandler to print diagnostics when reading bitcode. 2015-01-10 00:07:30 +00:00
MC Add r224985 back with two fixes. 2015-01-12 18:13:07 +00:00
Object Don't loop endlessly for MachO files with 0 ncmds 2015-01-06 17:08:26 +00:00
Option Add an overload of getLastArgNoClaim taking two OptSpecifiers. 2014-09-12 19:42:53 +00:00
ProfileData llvm-cov: Sink some reporting logic into CoverageMapping 2014-11-14 01:50:32 +00:00
Support Triple: Add amdgcn triple 2015-01-06 18:00:00 +00:00
TableGen Clean up static analyzer warnings. 2014-12-12 21:48:03 +00:00
Target Add r224985 back with two fixes. 2015-01-12 18:13:07 +00:00
Transforms [ASan] Move the shadow on Windows 32-bit from 0x20000000 to 0x40000000 2015-01-12 17:38:58 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile