It's not documented in any obvious place, but it's actually possible to
persuade mount(2) not to follow symlinks. See my proof of concept code
here: https://github.com/jwilk/symount
I stole the idea from Aleksa Sarai:
https://lore.kernel.org/all/[email protected]/
The linked mail from 2019 proposed removal of this feature, but
evidently the removal didn't happen. And now that systemd uses the trick
extensively¹, I don't think there's any danger it'll go away in the
future.
¹ https://github.com/systemd/systemd/commit/28126409b20bca9a
--
Jakub Wilk