[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/22833] New: gold: --print-symbol-counts incorrect output ?
From: |
andreas.hollmann at gmail dot com |
Subject: |
[Bug gold/22833] New: gold: --print-symbol-counts incorrect output ? |
Date: |
Sun, 11 Feb 2018 13:33:01 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=22833
Bug ID: 22833
Summary: gold: --print-symbol-counts incorrect output ?
Product: binutils
Version: 2.29
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: gold
Assignee: ccoutant at gmail dot com
Reporter: andreas.hollmann at gmail dot com
CC: ian at airs dot com
Target Milestone: ---
Created attachment 10806
--> https://sourceware.org/bugzilla/attachment.cgi?id=10806&action=edit
command line output that shows the behavior
The cmd option --print-symbol-counts seems to show incorrect counts for
imported symbols. I'm not completely sure what the output should be, but it
seems to me to be incorrect.
Example
main.c:
---
extern int num_one;
int main() {return num_one;}
---
libnum.c:
---
int num_one = 1;
int num_two = 2;
---
clang -c main.c
clang -c libnum.c
clang -fuse-ld=gold -Wl,--cref -Wl,--print-symbol-counts,symbol-count.txt -o
main main.o libnum.o
symbol-count.txt
---
symbols libnum.o 2 2
---
Expected output would be
symbols libnum.o 2 1
2 exported symbols (num_one and num_two) and 1 used symbol (num_one) instead of
2 2.
Cross Reference Table (--cref) shows it correctly:
...
num_one libnum.o
main.o
num_two libnum.o
--
You are receiving this mail because:
You are on the CC list for the bug.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug gold/22833] New: gold: --print-symbol-counts incorrect output ?,
andreas.hollmann at gmail dot com <=