aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2006-08-09 11:55:51 -0500
committerMark Hatle <mark.hatle@windriver.com>2010-07-22 16:06:41 -0500
commit0d2cb17618f9581df31fa25562fddc3359778857 (patch)
treedabfd88a134cf11466cfabe62aed3c777f6aaf30
parente3e8d8467b9ca690426ea5dca0d7d1188434f5a2 (diff)
downloadprelink-cross-0d2cb17618f9581df31fa25562fddc3359778857.tar.gz
prelink-cross-0d2cb17618f9581df31fa25562fddc3359778857.tar.bz2
prelink-cross-0d2cb17618f9581df31fa25562fddc3359778857.zip
Import from: prelink-cross-rtld-root.patch
Source: Wind River Systems Add --root argument to the prelink-rtld to make it easier to use on the command line.
-rw-r--r--ChangeLog.cross4
-rw-r--r--src/ld-libs.c12
2 files changed, 13 insertions, 3 deletions
diff --git a/ChangeLog.cross b/ChangeLog.cross
index 06bfc89..2d1e67b 100644
--- a/ChangeLog.cross
+++ b/ChangeLog.cross
@@ -1,5 +1,9 @@
2006-08-09 Mark Hatle <mark.hatle@windriver.com>
+ * ld-libs.c: Add --root argument to prelink-rtld
+
+2006-08-09 Mark Hatle <mark.hatle@windriver.com>
+
* cross-prelink code merged and upreved
original code from:
MontaVista Software, Inc.
diff --git a/src/ld-libs.c b/src/ld-libs.c
index fa4a3d1..88f4604 100644
--- a/src/ld-libs.c
+++ b/src/ld-libs.c
@@ -1124,9 +1124,6 @@ main(int argc, char **argv)
}
#endif
- if (sysroot)
- sysroot = prelink_canonicalize (sysroot, NULL);
-
elf_version (EV_CURRENT);
while (1)
@@ -1137,6 +1134,12 @@ main(int argc, char **argv)
argc -= 2;
argv += 2;
}
+ else if (argc > 2 && strcmp (argv[1], "--root") == 0)
+ {
+ string_to_path (&sysroot, argv[2]);
+ argc -= 2;
+ argv += 2;
+ }
else if (argc > 1 && strcmp (argv[1], "--target-paths") == 0)
{
host_paths = 0;
@@ -1147,6 +1150,9 @@ main(int argc, char **argv)
break;
}
+ if (sysroot)
+ sysroot = prelink_canonicalize (sysroot, NULL);
+
if (argc < 2)
error (1, 0, "No filename given.");