diff options
author | emaste <emaste@FreeBSD.org> | 2014-12-17 14:46:21 +0000 |
---|---|---|
committer | emaste <emaste@FreeBSD.org> | 2014-12-17 14:46:21 +0000 |
commit | df55c61fa5caaef1f237ceb37d7870b642661de3 (patch) | |
tree | 2a9444210d7005d56879e6b28f82e418e10e0fa6 /contrib/elftoolchain/elfcopy | |
parent | 2df3680ba627a9459389ebaa25ef723618f5bab8 (diff) | |
download | FreeBSD-src-df55c61fa5caaef1f237ceb37d7870b642661de3.zip FreeBSD-src-df55c61fa5caaef1f237ceb37d7870b642661de3.tar.gz |
Do not strip all when stripping an explicit symbol
When requested to strip specific symbols (-N flag) the default should be
to strip nothing (other than the requested symbols). This is consistent
with binutils strip(1).
PR: 196038
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1327
Diffstat (limited to 'contrib/elftoolchain/elfcopy')
-rw-r--r-- | contrib/elftoolchain/elfcopy/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/elftoolchain/elfcopy/main.c b/contrib/elftoolchain/elfcopy/main.c index 3689f35..240ca56 100644 --- a/contrib/elftoolchain/elfcopy/main.c +++ b/contrib/elftoolchain/elfcopy/main.c @@ -1109,7 +1109,8 @@ strip_main(struct elfcopy *ecp, int argc, char **argv) if (ecp->strip == 0 && ((ecp->flags & DISCARD_LOCAL) == 0) && - ((ecp->flags & DISCARD_LLABEL) == 0)) + ((ecp->flags & DISCARD_LLABEL) == 0) && + lookup_symop_list(ecp, NULL, SYMOP_STRIP) == NULL) ecp->strip = STRIP_ALL; if (optind == argc) strip_usage(); |