[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/3831] New: Support for automatically including symbols in the li
From: |
shausman at trolltech dot com |
Subject: |
[Bug ld/3831] New: Support for automatically including symbols in the list of dynamic symbols that are referenced as global data |
Date: |
4 Jan 2007 18:41:20 -0000 |
This enhancement request is a follow-up on bug #3713 .
The --dynamic-list feature (--dynamic-list-cpp-typeinfo) is currently not very
useful for C++ libraries that export global data referenced from within the
library and applications linking against it. Qt and KDE libraries for example
do this with singletons:
class MySingleton
{
public:
...
static MySingleton *instance() { return self; }
private:
static MySingleton *self;
};
When an application links against a library that provides the MySingleton::self
symbol and the application references the symbol in question then copy
relocations are produced in the application. This makes it necessary that any
references to the symbol from within the library itself are redirected to the
copy in the application, they must not be bound locally.
When linking the library with --dynamic-list it is therefore necessary to
include the MySingleton::self symbol in the dynamic list. For big C++ libraries
it is very cumbersome to create the list of such symbols manually.
It would be very useful if ld could somehow generate this list automatically.
Perhaps it would be enough to automatically include all the referenced symbols
in the dynamic list that otherwise would cause GLOB_DAT relocations, for
example through the use of a special keyword in the list.
But my knowledge of the relocation/linking process is not good enough to be
sure if this is good enough as criterion :-/
--
Summary: Support for automatically including symbols in the list
of dynamic symbols that are referenced as global data
Product: binutils
Version: 2.17
Status: NEW
Severity: enhancement
Priority: P2
Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: shausman at trolltech dot com
CC: bug-binutils at gnu dot org,glazzara at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=3831
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
- [Bug ld/3831] New: Support for automatically including symbols in the list of dynamic symbols that are referenced as global data,
shausman at trolltech dot com <=
- [Bug ld/3831] Support for automatically including symbols in the list of dynamic symbols that are referenced as global data, hjl at lucon dot org, 2007/01/04
- [Bug ld/3831] Support for automatically including symbols in the list of dynamic symbols that are referenced as global data, shausman at trolltech dot com, 2007/01/05
- [Bug ld/3831] Support for automatically including symbols in the list of dynamic symbols that are referenced as global data, hjl at lucon dot org, 2007/01/05
- [Bug ld/3831] Support for automatically including symbols in the list of dynamic symbols that are referenced as global data, shausman at trolltech dot com, 2007/01/05
- [Bug ld/3831] Support for automatically including symbols in the list of dynamic symbols that are referenced as global data, hjl at lucon dot org, 2007/01/05
- [Bug ld/3831] Support for automatically including symbols in the list of dynamic symbols that are referenced as global data, shausman at trolltech dot com, 2007/01/05
- [Bug ld/3831] Support for automatically including symbols in the list of dynamic symbols that are referenced as global data, hjl at lucon dot org, 2007/01/05
- [Bug ld/3831] Support for automatically including symbols in the list of dynamic symbols that are referenced as global data, hjl at lucon dot org, 2007/01/05
- [Bug ld/3831] Support for automatically including symbols in the list of dynamic symbols that are referenced as global data, shausman at trolltech dot com, 2007/01/08
- [Bug ld/3831] Support for automatically including symbols in the list of dynamic symbols that are referenced as global data, hjl at lucon dot org, 2007/01/08