Preserve hard & symbolic links when modifying source file
authoremaste <emaste@FreeBSD.org>
Wed, 28 Jan 2015 18:37:09 +0000 (18:37 +0000)
committeremaste <emaste@FreeBSD.org>
Wed, 28 Jan 2015 18:37:09 +0000 (18:37 +0000)
commitb4f4496909b7cb04bac577eb178e95f3595d4197
tree3eef552cafd54c1077c64b2acd82e6d8e2330b18
parent110aa2a0d09a6283b549938eabee76423a2e96f5
Preserve hard & symbolic links when modifying source file

Strip is often used to modify existing files, rather than creating new
files. If the existing file has hard links or is a symbolic link, act as
if editing the file in place and preserve the links.

Reported by: luigi
Reviewed by: imp, rpaulo
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1682
contrib/elftoolchain/elfcopy/main.c