<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 copies st_size value from a DSO into the SHN_UNDEF symbol"
href="https://bugs.llvm.org/show_bug.cgi?id=33598">33598</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>lld copies st_size value from a DSO into the SHN_UNDEF symbol
</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>roland@hack.frob.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, phosek@chromium.org
</td>
</tr></table>
<p>
<div>
<pre>git-svn-id: <a href="https://llvm.org/svn/llvm-project/lld/trunk@306055">https://llvm.org/svn/llvm-project/lld/trunk@306055</a>
91177308-0d34-0410-b5e6-96231b3b80d8
frobland 734 % head shlib.c reflib.c
==> shlib.c <==
void foo(void) {}
==> reflib.c <==
extern void foo(void);
void bar(void) { foo(); }
frobland 735 % gcc -fPIC -c shlib.c reflib.c
frobland 736 % ./hack/bin/ld.lld -shared -o shlib.so shlib.o
frobland 737 % ld.gold -shared -o reflib.so.gold reflib.o shlib.so
frobland 738 % ./hack/bin/ld.lld -shared -o reflib.so.lld reflib.o
shlib.so
frobland 739 % readelf -Ws reflib.so.gold
Symbol table '.dynsym' contains 6 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000000002c0 11 FUNC GLOBAL DEFAULT 6 bar
good==> 2: 0000000000000000 0 FUNC GLOBAL DEFAULT UND foo
3: 0000000000002008 0 NOTYPE GLOBAL DEFAULT 8 _edata
4: 0000000000002008 0 NOTYPE GLOBAL DEFAULT 8 __bss_start
5: 0000000000002008 0 NOTYPE GLOBAL DEFAULT 8 _end
Symbol table '.symtab' contains 9 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 FILE LOCAL DEFAULT ABS reflib.c
2: 0000000000001ee8 256 OBJECT LOCAL HIDDEN 8 _DYNAMIC
3: 0000000000001fe8 32 OBJECT LOCAL HIDDEN 10
_GLOBAL_OFFSET_TABLE_
4: 00000000000002c0 11 FUNC GLOBAL DEFAULT 6 bar
good==> 5: 0000000000000000 0 FUNC GLOBAL DEFAULT UND foo
6: 0000000000002008 0 NOTYPE GLOBAL DEFAULT 8 _edata
7: 0000000000002008 0 NOTYPE GLOBAL DEFAULT 8 __bss_start
8: 0000000000002008 0 NOTYPE GLOBAL DEFAULT 8 _end
frobland 740 % readelf -Ws reflib.so.lld
Symbol table '.dynsym' contains 3 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
bad ==> 1: 0000000000001000 11 FUNC GLOBAL DEFAULT 6 bar
2: 0000000000000000 6 FUNC GLOBAL DEFAULT UND foo
Symbol table '.symtab' contains 5 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 NOTYPE LOCAL HIDDEN ABS
_GLOBAL_OFFSET_TABLE_
2: 0000000000003000 0 NOTYPE LOCAL HIDDEN 10 _DYNAMIC
bad ==> 3: 0000000000001000 11 FUNC GLOBAL DEFAULT 6 bar
4: 0000000000000000 6 FUNC GLOBAL DEFAULT UND foo
frobland 741 %</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>