llvm-6502/lib
Kevin Enderby 8c9aa922a9 This adds a Darwin x86_64 relocation encoding for a subtraction expression
where both symbols are "local", that is non-external symbols, and there is
no "base" for the symbols used in the expression, that is the section has
no non-temporary symbols.  This case looks like this:

% cat local_reloc_A-B.s
	.long 0
LB:	.long 1
	.long LA - LB - 4
	.long 2
LA:	.long 3

which llvm-mc will not encode without this patch, generates a "unsupported
local relocations in difference" error, but the Darwin assembler will
encode with relocation entries like this:

% otool -rv a.out l.out 
a.out:
Relocation information (__TEXT,__text) 2 entries
address  pcrel length extern type    scattered symbolnum/value
00000008 False long   False  SUB     False     1 (__TEXT,__text)
00000008 False long   False  UNSIGND False     1 (__TEXT,__text)

which is very similar to what is encoded when the symbols don't have the
leading 'L' and they are not temporary symbols.  Which llvm-mc and the
Darwin assembler will encoded like this:

Relocation information (__TEXT,__text) 2 entries
address  pcrel length extern type    scattered symbolnum/value
00000008 False long   True   SUB     False     B
00000008 False long   True   UNSIGND False     A

This is the missing relocation encoding needed to allow the Mach-O x86
Dwarf file and line table to be emitted.  So this patch also removes the
TODO from the if() statement in MCMachOStreamer::Finish() that didn't 
call MCDwarfFileTable::Emit() for 64-bit targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115389 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-02 00:13:41 +00:00
..
Analysis Let FE mark a variable as artificial variable. 2010-09-29 23:07:21 +00:00
Archive
AsmParser Pacify a noisy compiler, and sink this variable declaration closer to its uses. 2010-09-30 21:04:13 +00:00
Bitcode Fix spelling. 2010-09-28 18:54:43 +00:00
CodeGen Drop the use of LiveInterval::iterator and the LiveRange class in 2010-10-01 23:52:27 +00:00
CompilerDriver
ExecutionEngine
Linker
MC This adds a Darwin x86_64 relocation encoding for a subtraction expression 2010-10-02 00:13:41 +00:00
Support Grow BumpPtrAllocator's slab size dynamically if we allocated many slabs. This 2010-09-30 16:18:28 +00:00
System Add an explicit initialization to work around what appears to be a valgrind 2010-09-30 23:56:49 +00:00
Target PrintSpecial() can go away now. 2010-10-01 23:27:48 +00:00
Transforms Now that the profitable bits of EnableFullLoadPRE have been enabled by default, rip out the remainder. 2010-10-01 20:02:55 +00:00
VMCore Attempt to outwit overly smart compiler. 2010-10-01 00:21:24 +00:00
Makefile