I have a project that creates a shared library associated with another, also a shared library.
When I compile and link it with gcc 4.4, everything works:
- Missing warning or compile time error,
- There is no warning or connection time error and
ldd libmyproject.so correctly reports a dependency with another shared library.
When I compile and link it to gcc 4.5, on the other hand (with the same flags), I have the following symptoms:
- Missing warning or compile time error,
- Missing warning or binding time error, but
- the library is incorrectly linked to another shared library: this manifest itself when I start
ldd and I donβt see the connection, and also when I try to use it: while it works with gcc 4.4, it crashes at runtime with gcc 4.5 with the error "character was not found "(of course, from another library).
I watched the release notes , and my intuition is that it has something to do with the new optimization of link time, but I could not understand them in sufficient detail.
Has anyone encountered a similar situation and / or offered any recommendations?
(Note that the results from 4.6 look identical to 4.5).
gcc linker shared-libraries
Philippe Nov 07 2018-11-11T00: 00Z
source share