Page MenuHomeFreeBSD

libsys: Use PICO_CFLAGS to disable syscall stubs
AbandonedPublic

Authored by brooks on May 22 2025, 3:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Sep 24, 3:21 AM
Unknown Object (File)
Sep 16 2025, 7:27 AM
Unknown Object (File)
Sep 16 2025, 2:35 AM
Unknown Object (File)
Aug 30 2025, 6:07 PM
Unknown Object (File)
Aug 29 2025, 6:21 PM
Unknown Object (File)
Aug 8 2025, 10:59 AM
Unknown Object (File)
Aug 6 2025, 6:35 AM
Unknown Object (File)
Aug 3 2025, 11:37 PM
Subscribers

Details

Summary

SHARED_CFLAGS doesn't do anything for .S files and if it did, the
result would be a broken RTLD. Switch to PICO_CFLAGS to only disable
stubs in regular shared libraries.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 64354
Build 61238: arc lint + arc unit

Event Timeline

Hm, is this because of rtld using the nossppico files from libc? I see two problems:

  1. The nossppico files really shouldn't have the syscall bodies either
  2. On CheriBSD we don't have nossppico for CHERI, since we don't have/need SSP, so rtld pulls from the regular pico files

Would this not be solved by having rtld-elf pull the syscall bits from libsys.a instead? Presumably an oversight that it wasn't changed, masked by this bug.

Hmm, indeed. Extracting from libsys_pic.a seems like the right answer. That then raises the question of the value of PICO_CFLAGS and the like some I might drop that entirely and just add SHARED_CFLAGS.