From e691851bb3cfa021613f71dea381e33b167bf362 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 3 Sep 2020 17:34:16 +0100 Subject: [PATCH] Add ar support for dependencies Record -L/-l dependencies of a static library in a __.LIBDEP entry. Options should be passed literally as a single argument, e.g. ar rL "-L/usr/local/lib -lfoo -lbar" libnew.a obj1.o obj2.o --- binutils/NEWS | 5 ++ binutils/ar.c | 91 +++++++++++++++++++++++--- binutils/binemul.c | 53 ++++++++++----- binutils/binemul.h | 15 +++-- binutils/doc/binutils.texi | 19 +++++- binutils/emul_aix.c | 16 +---- binutils/testsuite/binutils-all/ar.exp | 41 ++++++++++++ 7 files changed, 194 insertions(+), 46 deletions(-) diff --git a/binutils/NEWS b/binutils/NEWS index c0dc73d7d8..92a855f5d3 100644 --- a/binutils/NEWS +++ b/binutils/NEWS @@ -1,5 +1,10 @@ -*- text -*- +* The ar tool now has a L modifier (or --record-libdeps) option for + specifying dependencies of a static library. The arguments of this + option will be stored verbatim in the __.LIBDEP member of the archive, + which the linker may read at link time. + * Readelf now accepts the -C command line option to enable the demangling of symbol names. In addition the --demangle=