On Thu, Feb 22, 2024 at 10:16:30AM -0800, Mark Millard wrote:
> Brooks Davis <brooks_at_freebsd.org> wrote on
> Date: Thu, 22 Feb 2024 02:03:09 UTC :
> 
> > On Thu, Feb 22, 2024 at 02:57:13AM +0200, Konstantin Belousov wrote:
> > > On Wed, Feb 21, 2024 at 08:20:25PM +0000, Brooks Davis wrote:
> > > > That's probably worth a shot. Static linking will work anyway because
> > > > libc.a in effect embeds libsys to retain compatability.
> > > Please do not add libsys.so to the ABI. Right now it is an implementation
> > > detail of libthr and libc, and it is preferable to not change it, at least
> > > not yet, and definitely not to solve some minor internal issues.
> > 
> > Indeed, on further reflection I agree. Another option occured to me
> > which I intend to persue tomorrow: explicitly link the sanitizer .so
> > files with libsys. At least in the base system that should be straight
> > foward.
> 
> Does the errno move to libsys have any problems similar to
> the __elf_aux_vector move to libsys --that might also lead
> to needing -lsys (for things as the are now)?

I don't think so.  With errno, there is still a copy in libc, it's just
not used because the libsys on takes precidence.  With __elf_aux_vector
we were working around a different issue where the wrong copy was being
updated by rtld which I resolved by moving it entierly.

It's worth noting that any software that links with the errno symbol
is buggy as errno is defined as a macro that calls a function
as permitted by POSIX.  I'm not convinced we should be exposing it for
linkage at all.

-- Brooks

Reply via email to