realpath/canonicalize_file_name_at needs symbolic link support
canonicalize_file_name_at(3) needs support for symbolic links when identifying the directory the file resides in. E.g.:
mkdir foo
touch foo/foofile
mkdir bar
ln -s ../foo/foofile bar/barfile
realpath bar/barfile
Will say $PWD/bar/barfile
instead of $PWD/foo/foofile
.
Essentially canonicalize_file_name_at(3) needs a loop when identifying the directory containing the file where it follows symbolic links one by one, with the appropriate counter to implement ELOOP
in user-space.