From 95cc7c169c4bbb6f10e630184f527b20b83fc5c3 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 21 Oct 2019 12:54:06 +1030 Subject: ar P support This patch extends "ar P" to allow creation of normal (as distinct from thin) archives with full path names. PR 452 PR 25104 bfd/ * archive.c (normalize): Return file unchanged when BFD_ARCHIVE_FULL_PATH. (_bfd_construct_extended_name_table): Pass abfd, the output bfd, to normalize. (_bfd_archive_bsd44_construct_extended_name_table): Likewise. * bfd.c (struct bfd): Make flags a full flagword. (BFD_ARCHIVE_FULL_PATH): Define. * bfd-in2.h: Regenerate. binutils/ * ar.c (write_archive): Set BFD_ARCHIVE_FULL_PATH. * doc/binutils.texi (extract from archive): Mention restrictions when extracting from archives with full paths. (ar P): Update to current P support. (ar -X32_64): Fix spelling. --- binutils/ar.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'binutils/ar.c') diff --git a/binutils/ar.c b/binutils/ar.c index b99afff..38c54c9 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -1200,6 +1200,9 @@ write_archive (bfd *iarch) if (deterministic) obfd->flags |= BFD_DETERMINISTIC_OUTPUT; + if (full_pathname) + obfd->flags |= BFD_ARCHIVE_FULL_PATH; + if (make_thin_archive || bfd_is_thin_archive (iarch)) bfd_set_thin_archive (obfd, TRUE); -- cgit v1.1