Go to file
Kevin Enderby c030848f8f Tweak the MCExternalSymbolizer to not use the SymbolLookUp() call back
to not guess at a symbol name in some cases.

The problem is that in object files assembled starting at address 0, when
trying to symbolicate something that starts like this:

% cat x.s
_t1:
	vpshufd	$0x0, %xmm1, %xmm0

the symbolic disassembly can end up like this:

% otool -tV x.o 
x.o:
(__TEXT,__text) section
_t1:
0000000000000000	vpshufd	$_t1, %xmm1, %xmm0

Which is in this case produced incorrect symbolication.

But it is useful in some cases to use the SymbolLookUp() call back
to guess at some immediate values.  For example one like this
that does not have an external relocation entry:

% cat y.s
_t1:
	movl	$_d1, %eax
.data
_d1:	.long	0

% clang -c -arch i386 y.s

% otool -tV y.o 
y.o:
(__TEXT,__text) section
_t1:
0000000000000000	movl	$_d1, %eax

% otool -rv y.o 
y.o:
Relocation information (__TEXT,__text) 1 entries
address  pcrel length extern type    scattered symbolnum/value
00000001 False long   False  VANILLA False     2 (__DATA,__data)

So the change is based on it is not likely that an immediate Value
coming from an instruction field of a width of 1 byte, other than branches
and items with relocation, are not likely symbol addresses.

With the change the first case above simply becomes:

% otool -tV x.o 
x.o:
(__TEXT,__text) section
_t1:
0000000000000000	vpshufd	$0x0, %xmm1, %xmm0

and the second case continues to work as expected.

rdar://14863405

llvm-svn: 199698
2014-01-21 00:23:17 +00:00
clang Stop linking with crt1.o etc. for the iOS simulator. <rdar://problem/11800973> 2014-01-21 00:17:10 +00:00
clang-tools-extra [CMake] Deprecate CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR. 2014-01-19 13:00:01 +00:00
compiler-rt [msandr] Access app TLS directly in native exec mode. 2014-01-20 13:09:29 +00:00
debuginfo-tests don't use CHECK-NEXT because it may be on the same line. 2013-09-18 23:01:54 +00:00
libclc Fix build broken by LLVM commit r199279 2014-01-20 20:28:48 +00:00
libcxx Removed extra space; thanks to thakis_'s eagle eye 2014-01-21 00:03:44 +00:00
libcxxabi Implement demangling for user-defined operators. 2014-01-06 23:05:04 +00:00
lld [Mips] Specify the type of a symbol table entries in the test assembler 2014-01-18 21:13:05 +00:00
lldb Build fix following clang r199686 2014-01-20 21:14:57 +00:00
llvm Tweak the MCExternalSymbolizer to not use the SymbolLookUp() call back 2014-01-21 00:23:17 +00:00
openmp For your Christmas hacking pleasure. 2013-12-23 17:28:57 +00:00
polly Adjust test case to changed cloog output 2014-01-19 11:53:51 +00:00