<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - lld always emits .relr.dyn section even when that section is empty"
href="https://bugs.llvm.org/show_bug.cgi?id=38875">38875</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>lld always emits .relr.dyn section even when that section is empty
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>ELF
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>phosek@chromium.org
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>We're seeing this in our kernel, there should be no need for lld to emit that
section.
./prebuilt/downloads/clang/bin/llvm-readelf -S build-x64-clang/zircon.elf
~/fuchsia/zircon
There are 40 section headers, starting at offset 0xc83088:
Section Headers:
[Nr] Name Type Address Off Size ES Flg
Lk Inf Al
[ 0] NULL 0000000000000000 000000 000000 00
0 0 0
[ 1] .text.boot0 PROGBITS ffffffff80100000 001000 000070 00 A
0 0 1
[ 2] .buildsig PROGBITS ffffffff80100070 001070 000028 00 A
0 0 1
[ 3] .text.boot PROGBITS ffffffff80100098 001098 0002d8 00 AX
0 0 8
[ 4] .text.bootstrap16 PROGBITS ffffffff80101000 002000 000166 00 AX
0 0 4096
[ 5] .text PROGBITS ffffffff80101170 002170 0f6325 00 AX
0 0 16
[ 6] .rodata.rodso_image PROGBITS ffffffff801f8000 0f9000 00e000 00 A
0 0 4096
[ 7] code_patch_table PROGBITS ffffffff80206000 107000 000060 00 A
0 0 8
[ 8] .relr.dyn RELR ffffffff80206060 107060 000000 08 A
0 0 8
[ 9] .note.gnu.build-id NOTE ffffffff80206060 107060 000018 00 A
0 0 4
[10] .kcounter.desc PROGBITS ffffffff80206078 107078 0001a0 00 WA
0 0 8
[11] .rodata PROGBITS ffffffff80206220 107220 024bd0 00 AMS
0 0 32
[12] .data.rel.ro PROGBITS ffffffff8022adf0 12bdf0 0062d8 00 WA
0 0 16
[13] .init_array INIT_ARRAY ffffffff802310c8 1320c8 0000c0 00 WA
0 0 8
[14] .data PROGBITS ffffffff80232000 133000 00f0e8 00 WA
0 0 4096
[15] .bss NOBITS ffffffff80242000 1420e8 083970 00 WA
0 0 4096
[16] .comment PROGBITS 0000000000000000 1420e8 000107 01 MS
0 0 1
[17] .rela.text RELA 0000000000000000 1421f0 0e7048 18 I
37 5 8
[18] .rela.data.rel.ro RELA 0000000000000000 229238 00e178 18 I
37 12 8
[19] .debug_str PROGBITS 0000000000000000 2373b0 0fb516 01 MS
0 0 1
[20] .debug_loc PROGBITS 0000000000000000 3328c6 220c96 00
0 0 1
[21] .debug_abbrev PROGBITS 0000000000000000 55355c 044085 00
0 0 1
[22] .debug_info PROGBITS 0000000000000000 5975e1 3faedc 00
0 0 1
[23] .debug_ranges PROGBITS 0000000000000000 9924bd 06a9c0 00
0 0 1
[24] .debug_macinfo PROGBITS 0000000000000000 9fce7d 00013b 00
0 0 1
[25] .debug_pubnames PROGBITS 0000000000000000 9fcfb8 0be92b 00
0 0 1
[26] .debug_pubtypes PROGBITS 0000000000000000 abb8e3 070e6b 00
0 0 1
[27] .debug_frame PROGBITS 0000000000000000 b2c750 033b88 00
0 0 8
[28] .debug_line PROGBITS 0000000000000000 b602d8 0cdaf2 00
0 0 1
[29] .rela.rodata RELA 0000000000000000 c2ddd0 0113d0 18 I
37 11 8
[30] .rela.data RELA 0000000000000000 c3f1a0 000588 18 I
37 14 8
[31] .rela.init_array RELA 0000000000000000 c3f728 000240 18 I
37 13 8
[32] .rela.kcounter.desc RELA 0000000000000000 c3f968 0004e0 18 I
37 10 8
[33] .debug_aranges PROGBITS 0000000000000000 c3fe48 000290 00
0 0 1
[34] .rela.text.boot RELA 0000000000000000 c400d8 000540 18 I
37 3 8
[35] .relacode_patch_table RELA 0000000000000000 c40618 0000c0 18 I
37 7 8
[36] .rela.text.bootstrap16 RELA 0000000000000000 c406d8 0000c0 18 I
37 4 8
[37] .symtab SYMTAB 0000000000000000 c40798 01a9d0 18
39 4534 8
[38] .shstrtab STRTAB 0000000000000000 c5b168 000206 00
0 0 1
[39] .strtab STRTAB 0000000000000000 c5b36e 027d17 00
0 0 1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings), l (large)
I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)</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>