forked from roolebo/elfutils
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
elfcompress: Don't rewrite file if no section data needs to be updated.
If the input and output file are the same and no section needs to be updated we really don't need to rewrite the file. Check whether any matching section is already compressed or decompressed. Skip the section if it doesn't need to be changed. If no section data needs updating end with success without rewriting/updating file. With --force the file will still always be updated/rewritten even if no section data needs to be (de)compressed. Acked-by: Igor Gnatenko <[email protected]> Signed-off-by: Mark Wielaard <[email protected]>
- Loading branch information
Mark Wielaard
committed
Jul 24, 2018
1 parent
df9053f
commit ed62996
Showing
2 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
2018-07-21 Mark Wielaard <[email protected]> | ||
|
||
* elfcompress.c (get_sections): New function. | ||
(process_file): Check whether section needs to change. Don't rewrite | ||
file if no section data needs changing. | ||
(main): Update 'force' help text. | ||
|
||
2018-07-21 Mark Wielaard <[email protected]> | ||
|
||
* elfcompress.c (process_file): Swap fchmod and fchown calls. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters