1 |
David Leverton <levertond@××××××××××.com> writes: |
2 |
|
3 |
> It's not just the order, it also breaks things that rely on the .init |
4 |
> section being called at all to register themselves with the core |
5 |
> application (with --as-needed, the .so doesn't get loaded in the first |
6 |
> place, so it doesn't get a chance to run anything). |
7 |
|
8 |
This really is backward, solution-wise: you expect the "core |
9 |
application" to know enough of the plugins to link them together, but |
10 |
not enough to call their init functions... |
11 |
|
12 |
And still, it breaks not only with --as-needed but also with the Sun |
13 |
linker, with the PE file format and other non-ELF file formats. So it's |
14 |
really not a problem _limited_ to --as-needed. |
15 |
|
16 |
Beside, you can _force_ a link by using --no-as-needed before a given |
17 |
library, that's what it's supposed to happen if you don't want to be |
18 |
helped by the linker. |
19 |
|
20 |
To a very minimum this can be said to be a _clash_ between two |
21 |
designs. Saying that --as-needed is _broken_ because it breaks this case |
22 |
is _quite_ an exaggeration... |
23 |
|
24 |
-- |
25 |
Diego "Flameeyes" Pettenò |
26 |
http://blog.flameeyes.eu/ |