diff options
author | Maciej W. Rozycki <macro@redhat.com> | 2024-06-17 23:28:20 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@redhat.com> | 2024-06-17 23:28:20 +0100 |
commit | 38362a0c634162e22ee3817ac344ac4cfa07f437 (patch) | |
tree | aa80f326457aca2d4a78f82d6a54ffa97af38617 /sim | |
parent | a6760bd40b44cd1ea4fee264a36e794d362a64bb (diff) | |
download | binutils-38362a0c634162e22ee3817ac344ac4cfa07f437.zip binutils-38362a0c634162e22ee3817ac344ac4cfa07f437.tar.gz binutils-38362a0c634162e22ee3817ac344ac4cfa07f437.tar.bz2 |
binutils/testsuite: Add a helper for relative path construction
Implement a helper to construct a relative path between two locations in
the filesystem, for example to make a path from the source to the object
directory for the case where a tool has been set up to look at a given
path and there is a need to point it elsewhere, but an absolute path
will not work. The helper works on normalized paths internally, so the
result is correct even in the presence of symlinks as intermediate path
components.
So given "/path/to/src/gas/testsuite/gas/all" as the FROM argument and
then "/path/to/obj/gas/testsuite/tmpdir/none.s" as the TO argument the
helper will return "../../../../../obj/gas/testsuite/tmpdir/none.s" in
the absence of symlinks.
Diffstat (limited to 'sim')
0 files changed, 0 insertions, 0 deletions