This is the mail archive of the 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

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?


2012-04-24  Cary Coutant  <>

	* 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]