This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Move new totalorder from libm to libc


On Mon, 16 Dec 2019, Florian Weimer wrote:

>If you build a shared object with -shared, you won't get an undefined
>symbol error (with typical toolchains):

OK, the final program would still need -lm, right (the underlinking
problem)?  Anyhow, that wouldn't be enough to get the right symbol,
because it would it be too late, if I [finally] understand it correctly.

>    3: 0000000000000000      0 NOTYPE  GLOBAL DEFAULT    UNDEF totalorder
>
> [...]
>
>It's much harder to drop -lc from the linker command line, which is
>why the symbol would still get a version if it were defined in libc.

OK, I see it now.  If -lm was used, the reference would become
totalorder@@GLIBC_2.XX.

Thanks for the explanation.

I still don't have an opinion about moving it to libc, it sounds like a
problem that was already present for other functions, although I
understand that the change in the interface of totalorder is more drastic.

Do you think that the runtime crash (when the wrong version of totalorder
gets selected) is worse than the runtime difference caused by wrong
versions being selected for exp, log, pow (as Andreas mentioned)?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]