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. --- bfd/bfd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bfd/bfd.c') diff --git a/bfd/bfd.c b/bfd/bfd.c index b3078ea..94e9f27 100644 --- a/bfd/bfd.c +++ b/bfd/bfd.c @@ -92,7 +92,7 @@ CODE_FRAGMENT . ENUM_BITFIELD (bfd_direction) direction : 2; . . {* Format_specific flags. *} -. flagword flags : 20; +. flagword flags; . . {* Values that may appear in the flags field of a BFD. These also . appear in the object_flags field of the bfd_target structure, where @@ -179,6 +179,9 @@ CODE_FRAGMENT . {* Use the ELF STT_COMMON type in this BFD. *} .#define BFD_USE_ELF_STT_COMMON 0x80000 . +. {* Put pathnames into archives (non-POSIX). *} +.#define BFD_ARCHIVE_FULL_PATH 0x100000 +. . {* Flags bits to be saved in bfd_preserve_save. *} .#define BFD_FLAGS_SAVED \ . (BFD_IN_MEMORY | BFD_COMPRESS | BFD_DECOMPRESS | BFD_LINKER_CREATED \ -- cgit v1.1