[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/19372] New: both ld.bfd and ld.gold + --as-needed does not link
From: |
socketpair at gmail dot com |
Subject: |
[Bug ld/19372] New: both ld.bfd and ld.gold + --as-needed does not link libraries with __init functions |
Date: |
Wed, 16 Dec 2015 14:53:23 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=19372
Bug ID: 19372
Summary: both ld.bfd and ld.gold + --as-needed does not link
libraries with __init functions
Product: binutils
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: socketpair at gmail dot com
Target Milestone: ---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68902 :
Original bug was reported here:
https://github.com/thom311/libnl/issues/93
libnl3 have such function:
static void __init ct_init(void)
{
nl_cache_mngt_register(&nfnl_ct_ops);
}
so, when this library is loaded it registers itself in some global variable for
later access.
When I link against that library, my program does not see that registration
since library just is not linked!
I consider linker should not eliminate lbraries where __init functions exists.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/19372] New: both ld.bfd and ld.gold + --as-needed does not link libraries with __init functions,
socketpair at gmail dot com <=