Resolve relative and absolute symbolic link target paths across directory levels.
A relative symlink target is resolved relative to the directory containing the symlink itself, not the current working directory of whoever follows it — a common source of broken links when files are moved. This calculator normalizes '..' and '.' segments to compute the final absolute path, and flags when a chain of symlinks would exceed Linux's hard-coded maximum resolution depth of 40 (MAXSYMLINKS), beyond which the kernel returns ELOOP ('too many levels of symbolic links'), which is also how circular symlink references are ultimately caught.
Relative target resolution
resolved_path = normalize(dirname(symlink_path) + '/' + target)
Relative to the directory containing the symlink itself — not the shell's current working directory, and not the target of any earlier symlink in a chain. This is why moving a symlink (without moving its target) or moving the symlink's containing directory can silently break it.
The kernel defines MAXSYMLINKS as 40. Resolving a path through more than 40 chained symlinks returns ELOOP ('too many levels of symbolic links'), which is also the mechanism that catches genuinely circular symlinks (A → B → A).
Use `readlink -f <path>` to fully resolve a symlink (including chains) to its final absolute, canonical target, or plain `readlink <path>` to see just the immediate, unresolved target as stored.