This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Add --enable-deterministic-archives option to strip/objcopy


This patch adds the -D/--enable-deterministic-archives option to strip
and objcopy. The option has the same effect as the 'D' option to ar:
timestamp, uid, and gid fields will be set to zero in the resulting
archive, so that the resulting output depends solely on the input
files.

I've also fixed strip so that when stripping *all* symbols, it does
not add an empty armap to the archive.

Tested with no regressions on x86_64. OK to commit?

-cary


2012-04-24  Cary Coutant  <ccoutant@google.com>

	* doc/binutils.texi: Add -D/--enable-deterministic-archives option
	to strip and objcopy.
	* binutils/objcopy.c (deterministic): New global variable.
	(strip_options): Add --enable-deterministic-archives.
	(copy_options): Likewise.
	(copy_usage): Likewise.
	(strip_usage): Likewise.
	(copy_archive): When stripping all, don't add archive map; set
	deterministic output when requested.
	(strip_main): Add -D/--enable-deterministic-archives option.
	(copy_main): Likewise.

Attachment: strip-deterministic-patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]