Page MenuHomeFreeBSD

libsys: link symbolic
ClosedPublic

Authored by kib on Feb 22 2024, 9:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 4, 7:25 AM
Unknown Object (File)
Jun 17 2024, 3:09 PM
Unknown Object (File)
Jun 6 2024, 11:12 AM
Unknown Object (File)
Jun 3 2024, 7:13 AM
Unknown Object (File)
Jun 3 2024, 6:37 AM
Unknown Object (File)
May 9 2024, 6:54 AM
Unknown Object (File)
May 7 2024, 5:11 AM
Unknown Object (File)
Apr 26 2024, 3:36 AM
Subscribers

Details

Summary

so that libc/libthr do not preempt libsys symbols, esp. errno-related

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Feb 22 2024, 9:14 PM

To confirm I understand this:

  • Linking libsys.so without -Bsymbolic means the linker deems the various symbols preemptible
  • If libc.so is earlier in the link map then libsys's unfiltered symbols will be preempted by libc.so's at run time

I can conform this fixes the issues I've seen with an WITH_BIND_NOW jail.

This revision is now accepted and ready to land.Feb 22 2024, 11:53 PM

To confirm I understand this:

  • Linking libsys.so without -Bsymbolic means the linker deems the various symbols preemptible
  • If libc.so is earlier in the link map then libsys's unfiltered symbols will be preempted by libc.so's at run time

It also means that symbols looked up not _from the filter_ are preempted. This is the cause of the problem

This revision was automatically updated to reflect the committed changes.