[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug gold/20507] New: version-script refuses to hide symbols called mall
From: |
primiano at google dot com |
Subject: |
[Bug gold/20507] New: version-script refuses to hide symbols called malloc/calloc |
Date: |
Tue, 23 Aug 2016 11:03:57 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=20507
Bug ID: 20507
Summary: version-script refuses to hide symbols called
malloc/calloc
Product: binutils
Version: 2.24
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gold
Assignee: ccoutant at gmail dot com
Reporter: primiano at google dot com
CC: ian at airs dot com
Target Milestone: ---
The behavior of gold seems to diverge from the bfd linker when trying to hide
malloc/calloc symbols using a version script.
Minified repro:
$ cat<<EOF > test.cc
extern "C" void* malloc(unsigned long size) { return 0; }
extern "C" void* calloc(unsigned long size) { return 0; }
extern "C" void* foobar(unsigned long size) { return 0; }
int main() { return 0; }
EOF
$ cat<<EOF > test.lst
{ local: *; };
EOF
$ g++ -fuse-ld=gold -o out.gold test.cc -Wl,--version-script=test.lst
$ g++ -fuse-ld=bfd -o out.bfd test.cc -Wl,--version-script=test.lst
$ nm -C -D --defined-only out.bfd
$ nm -C -D --defined-only out.gold
00000000004005dc T calloc
00000000004005cd T malloc
I'd expect out.gold to not leak out the malloc/calloc symbols.
--
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/20507] New: version-script refuses to hide symbols called malloc/calloc,
primiano at google dot com <=