bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41242: Port feature/native-comp to Windows - Reduce the number of fi


From: Nicolas Bértolo
Subject: bug#41242: Port feature/native-comp to Windows - Reduce the number of files probed when finding a lisp file.
Date: Tue, 2 Jun 2020 20:39:06 -0300

> Second this code would fail both link time and load time if the linker
> cannot resolve one of these three functions making the test on the
> result of dlsym in the run time pointless.

I thought that on GNU/Linux the dynamic linker would just resolve a function
when necessary (i.e. function call) and not when starting the executable. I
assumed that lazy binding was the default, and then the call to dlsym would
prevent a crash.

This is what the man page of 'ld' says about the '-z lazy' option:

When generating an executable or shared library, mark it to tell the dynamic
linker to defer function call resolution to the point when the function is
called (lazy binding), rather than at load time. Lazy binding is the default.

I checked and the call to gcc to link temacs does not include '-z now', so lazy
binding should be in effect and the dlsym trick should work.

Anyway, if you think that it's ugly I respect that and won't object to it not
getting merged.

Thanks, Nico.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]