1 |
On Fri, 30 May 2008 18:29:49 +0200 |
2 |
flameeyes@×××××.com (Diego 'Flameeyes' Pettenò) wrote: |
3 |
> David Leverton <levertond@××××××××××.com> writes: |
4 |
> > It's not just the order, it also breaks things that rely on |
5 |
> > the .init section being called at all to register themselves with |
6 |
> > the core application (with --as-needed, the .so doesn't get loaded |
7 |
> > in the first place, so it doesn't get a chance to run anything). |
8 |
> |
9 |
> This really is backward, solution-wise: you expect the "core |
10 |
> application" to know enough of the plugins to link them together, but |
11 |
> not enough to call their init functions... |
12 |
|
13 |
Actually, no. The core application doesn't have to be doing the |
14 |
linking. The linking can be done by an intermediate library. |
15 |
|
16 |
> And still, it breaks not only with --as-needed but also with the Sun |
17 |
> linker, with the PE file format and other non-ELF file formats. So |
18 |
> it's really not a problem _limited_ to --as-needed. |
19 |
|
20 |
It works with any standard-compliant C++ setup. |
21 |
|
22 |
> Beside, you can _force_ a link by using --no-as-needed before a given |
23 |
> library, that's what it's supposed to happen if you don't want to be |
24 |
> helped by the linker. |
25 |
|
26 |
And next you'll be saying "and you can force a compile using |
27 |
--no-broken-behaviour-that-goes-against-the-standard". |
28 |
|
29 |
> To a very minimum this can be said to be a _clash_ between two |
30 |
> designs. Saying that --as-needed is _broken_ because it breaks this |
31 |
> case is _quite_ an exaggeration... |
32 |
|
33 |
Saying it's broken because it goes against an international standard |
34 |
isn't... |
35 |
|
36 |
-- |
37 |
Ciaran McCreesh |