From 6958d98d8db84403eb8e3e9872190f2497059bea Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Tue, 14 Dec 2021 21:43:03 +0100 Subject: [PATCH] Set version to v3.0.0 --- CHANGELOG.md | 47 ++++++++++++++++++++++------------------------- README.md | 29 ++++++++++++++--------------- libtree.c | 2 +- 3 files changed, 37 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 58aa38d..45822fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,25 +1,15 @@ - -# v3.0.0-rc1 ... v3.0.0-rc9 -- Fixes a memory issue when running libtree on many files -- Fixes more memory issues -- Print error messages -- Make sure ISA's match -- Support relative includes in /etc/ld.so.conf -- Flush stdout/stderr -- Squash warnings -- Bring back `--ldconf` for Gentoo Prefix support -- Bring back man pages - -# v3.0.0-rc1 +# v3.0.0 - Rewritten in C99 with 0 external dependencies. - Significantly faster & smaller (~50KB statically compiled with musl libc, or even smaller than the source file with diet libc). -- Improved search path printing when libraries cannot be located +- Cross-compiled binaries now available thanks to + [binarybuilder.org](https://binarybuilder.org/) +- Improved search path printing when libraries cannot be located. - Improved rpath search: shows `[rpath of ...]` when lib is located by parent of parent ... of parent's rpath. -- `fd` inspired highlight of filename when printing paths -- Caches files by inode instead of soname, which is quite useful in the sense - that this allows you to find broken libraries that only work because of a +- `fd` inspired highlight of filename when printing paths. +- Caches files by inode instead of soname, which is useful in the sense that + this allows you to find broken libraries that only work because of a particular search order of the tree. (Consider an executable A and libraries B, C and D, where A depends on B and C, and B and C depend on D: @@ -32,20 +22,27 @@ ``` It may happen that D *can* be located through B's rpath, but not through C's. - Then, depending on whether A - B - D is traversed first, or A - C - D, glibc + Then, depending on whether A - B - D is traversed first, or A - C - D, ld.so will complain about missing libraries or not. `libtree` on the other hand will always tell you that D can't be located through C. -- More verbosity levels `-v`, `-vv`, `-vvv` instead of `-a` and `-v` flags -- Skip fewer libraries by default (only libc / libstdc++ type of libs) -- `PLATFORM` rpath interpolation now uses uname, this is not always the same as - `AT_PLATFORM`, but unlikely to be different, and in fact the feature is +- More verbosity levels `-v`, `-vv`, `-vvv` instead of `-a` and `-v` flags. +- Skip fewer libraries by default (only libc / libstdc++ type of libs). +- `PLATFORM` rpath interpolation now uses `uname`, this is not always the same + as `AT_PLATFORM`, but unlikely to be different, and in fact the feature is rarely used. -- support `NODEFLIB` flag +- Support for `NODEFLIB` flag, which is a dynamic array entry flag that signals + to the dynamic linker that it should not search default system paths + including those specified in `ld.so.conf`. - Better FreeBSD support (`OSREL`, `OSNAME` interpolation in rpaths and `/etc/ld-elf.so.conf` config file support) +- Support for relative includes in `ld.so.conf` config files. -TODO list: -- Bundling +Breaking changes: +- The bundling feature was dropped in `3.0.0`, but is still supported in `2.x`. + It may return in a future `3.x` release, but my impression is that there are + excellent tools like Exodus which do a better job at bundling (in particular: + they ship a copy of the dynamic linker.) +- The `--skip` and `--platform` flags were removed. # v2.0.0 diff --git a/README.md b/README.md index 936f3e9..83df24f 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,18 @@ A tool that: ![Screenshot of libtree](doc/screenshot.png) +## Output + +By default, certain standard dependencies are not shown. For more verbose output use + +- `libtree -v` Show libraries skipped by default +- `libtree -vv` Show dependencies of libraries skipped by default +- `libtree -vvv` Show dependencies of already encountered libraries + +Use the `--path` or `-p` flags to show paths rather than sonames: + +- `libtree -p $(which tar)` + ## Building from sources `libtree` requires a C compiler that understands c99 @@ -20,19 +32,6 @@ make # recommended: LDFLAGS=-static Or use the following unsafe quick install instructions ``` -curl -Lfs https://raw.githubusercontent.com/haampie/libtree-in-c/master/libtree.c | cc -o libtree -x c - -std=c99 -D_FILE_OFFSET_BITS=64 +curl -Lfs https://raw.githubusercontent.com/haampie/libtree/master/libtree.c | ${CC:-cc} -o libtree -x c - -std=c99 -D_FILE_OFFSET_BITS=64 ``` - - - -## Verbose output - -By default, certain standard dependencies are not shown. For more verbose output use - -- `libtree -v` Show libraries skipped by default -- `libtree -vv` Show dependencies of libraries skipped by default -- `libtree -vvv` Show dependencies of already encountered libraries - -Use the `--path` or `-p` flags to show paths rather than sonames: - -- `libtree -p $(which tar)` + \ No newline at end of file diff --git a/libtree.c b/libtree.c index f4481bf..97a9dda 100644 --- a/libtree.c +++ b/libtree.c @@ -10,7 +10,7 @@ #include #include -#define VERSION "3.0.0-rc9" +#define VERSION "3.0.0" #define ET_EXEC 2 #define ET_DYN 3