It is possible to create bindmount over symlinks with new Linux kernel mount API. Here is an example:
unshare -m
mount -t tmpfs tmpfs /tmp
cd /tmp
echo TEST1 > test1
echo TEST2 > test2
ln -s test1 symlink1
ln -s test2 symlink2
cat symlink1
# TEST1
cat symlink2
# TEST2
bindmount-v2 symlink1 symlink2
# Mounting symlink1 into symlink2
cat symlink2
# TEST1
cat /proc/self/mountinfo | grep symlink
# 2221 2323 0:120 /symlink1 /tmp/symlink2 rw,relatime - tmpfs tmpfs rw,inode64
This uses simple C program bindmount-v2
, source https://github.com/Snorch/linux-helpers/blob/master/bindmount-v2.c
I'm not aware about any attempt to add this to mount utility.
Only supported on v5.12+ kernels. AT_SYMLINK_NOFOLLOW is a key part to create bindmounts on top of symlinks. If you drop mount_setattr related hunks, which is probably not important for your case you would be able to do the same on v5.2+ kernels.
note: Symlink can not be bindmounted to or from directory.