Commit Graph

11 Commits

Author SHA1 Message Date
Yann E. MORIN"
e2c7015edb scripts/xldd: try to handle RPATH tags
The RPATH tags allow a binary to tell the dynamic linker what
directories to search for libraries. The so-added paths are
searched into before any other paths.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-24 21:04:55 +01:00
Yann E. MORIN"
1a03e119de scripts/xldd: better handle the origin of the library
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-23 21:36:01 +01:00
Yann E. MORIN"
7d296c4f68 scripts/xldd: avoid reporting duplicates
Once a NEEDED dependency has been solved, do not report it
if other dependencies depend on it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-24 21:01:46 +01:00
Yann E. MORIN"
cd9a56ff50 script/xldd: add debug traces
Add debug traces to help understand how xldd finds the
libraries, what directories it scans, in which order...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-23 21:35:45 +01:00
Yann E. MORIN"
6960ddb376 scripts/xldd: parse /etc/ld.so.conf
Scan /etc/ld.so.conf for paths to search for libraries.
Also follow include directives in there.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-23 21:35:41 +01:00
Yann E. MORIN"
2e1dcdf8d4 scripts/xldd: better find sysroot with old gcc
Only starting with 4.4 does gcc have a -print-sysroot option.
For 4.3 or before, we have to play some tricks:
- ask gcc where libc.so is,
  (we expect it in ${sysroot}/usr/lib/libc.so)
- trim /usr/lib/libc.so from the result

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-23 21:35:28 +01:00
Yann E. MORIN"
70309ce671 scripts/xldd: report appropriate load address for 32- or 64-bit
For 32-bit target systems, report 4-byte (8-xdigit) wide adresses,
and for 64-bit, report 8-byte (16-xdigit) wide adresses.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-23 21:35:15 +01:00
Yann E. MORIN"
b98f8fe48f scripts/xldd: stop at first match
Break the library search loop as soon as a match is found.
Previously, if a library was present in different places,
then the last occurence would be returned, when the first
one would have been used at runtime.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-23 21:35:10 +01:00
Yann E. MORIN"
b36267c6a6 scripts/xldd: fix version string
The version string was hard-coded.
Now, the version string follows the crosstool-NG version.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-23 21:34:56 +01:00
Yann E. MORIN"
727612bcf6 scripts/xldd: fix typoes
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2010-11-23 21:34:50 +01:00
Yann E. MORIN"
c03ac58aca scripts: add a cross-ldd-like
Add a cross-ldd that mimicks a native ldd.
2010-07-22 23:26:08 +02:00