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: RFC: Should x86-64 support arbitrary calling conventions?


On Mon, 27 Mar 2017, Szabolcs Nagy wrote:
> even if the dynamic linker was careful not to
> clobber certain registers in memcpy/strcmp/..,
> ifunc resolvers follow the normal pcs, so they
> are allowed to clobber them anyway.
> 
> so in general 'the dynamic linker is careful'
> argument does not work in the presence of
> user defined ifunc.

As said in an adjacent subthread, the dynamic linker knows exactly when it is
about to call back to external code (ifunc resolver, LD_AUDIT handlers), and
it can save/restore additional registers just around those points.

I believe a bigger issue is usage of [optimized] string functions in the linker.

Alexander


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