<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Un-necessary relocations generated for local label subtractions in apple_xxx debug sections"
href="http://llvm.org/bugs/show_bug.cgi?id=21328">21328</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Un-necessary relocations generated for local label subtractions in apple_xxx debug sections
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>iains-llvm@btconnect.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Nothing special source-code-wise.
$ ./Release+Asserts/bin/clang --version
clang version 3.6.0 (trunk 220265)
Target: x86_64-apple-darwin12.5.0
x86_64-apple-darwin12
./Release+Asserts/bin/clang /test/relocs-1.c -save-temps -O1 -g -c -o rl1.o
Asm excerpt:
=====
.section __DWARF,__apple_types,regular,debug
Ltypes_begin:
.long 1212240712 ## Header Magic
.short 1 ## Header Version
.short 0 ## Header Hash Function
.long 3 ## Header Bucket Count
.long 3 ## Header Hash Count
.long 20 ## Header Data Length
.long 0 ## HeaderData Die Offset Base
.long 3 ## HeaderData Atom Count
.short 1 ## DW_ATOM_die_offset
.short 6 ## DW_FORM_data4
.short 3 ## DW_ATOM_die_tag
.short 5 ## DW_FORM_data2
.short 4 ## DW_ATOM_type_flags
.short 11 ## DW_FORM_data1
.long -1 ## Bucket 0
.long -1 ## Bucket 1
.long 0 ## Bucket 2
.long 193495088 ## Hash in Bucket 2
.long 2090805233 ## Hash in Bucket 2
.long 2090147939 ## Hash in Bucket 2
.long Ltypes0-Ltypes_begin ## Offset in Bucket 2
.long Ltypes1-Ltypes_begin ## Offset in Bucket 2
.long Ltypes2-Ltypes_begin ## Offset in Bucket 2
Ltypes0:
Lset29 = Linfo_string4-Linfo_string ## int
.long Lset29
.long 1 ## Num DIEs
.long 65
.short 36
.byte 0
.long 0
Ltypes1:
Lset30 = Linfo_string7-Linfo_string ## vPtr
.long Lset30
.long 1 ## Num DIEs
.long 116
.short 22
.byte 0
.long 0
Ltypes2:
Lset31 = Linfo_string16-Linfo_string ## char
.long Lset31
.long 1 ## Num DIEs
.long 305
.short 36
.byte 0
.long 0
===
despite the fact that the labels are in the same section and there are no
externally-visible ones to cause the section to be split into atoms.
we're generating:
otool -rv rl1.o:
Relocation information (__DWARF,__apple_types) 6 entries
address pcrel length extern type scattered symbolnum/value
00000048 False long False SUB False 15 (__DWARF,__apple_types)
00000048 False long False UNSIGND False 15 (__DWARF,__apple_types)
00000044 False long False SUB False 15 (__DWARF,__apple_types)
00000044 False long False UNSIGND False 15 (__DWARF,__apple_types)
00000040 False long False SUB False 15 (__DWARF,__apple_types)
00000040 False long False UNSIGND False 15 (__DWARF,__apple_types)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>