diff options
author | Fangrui Song <i@maskray.me> | 2021-02-24 11:10:09 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2021-02-24 11:10:09 -0800 |
commit | 17b4e695ce0ef89eac4a37df2df49d4c0e700766 (patch) | |
tree | b28da788404c534ec03ef8d5f880e811d90a0318 /llvm/unittests/ProfileData/CoverageMappingTest.cpp | |
parent | c2487bf7dfdda59b775b3d5a06684af243790125 (diff) | |
download | llvm-17b4e695ce0ef89eac4a37df2df49d4c0e700766.zip llvm-17b4e695ce0ef89eac4a37df2df49d4c0e700766.tar.gz llvm-17b4e695ce0ef89eac4a37df2df49d4c0e700766.tar.bz2 |
[llvm-objcopy] If input=output, preserve umask bits, otherwise drop S_ISUID/S_ISGID bits
This makes the behavior similar to cp
```
chmod u+s,g+s,o+x a
sudo llvm-strip a -o b
// With this patch, b drops set-user-ID and set-group-ID bits.
// sudo cp a b => b does not have set-user-ID or set-group-ID bits.
```
This also changes the behavior for the following case:
```
chmod u+s,g+s,o+x a
llvm-strip a
// a preserves set-user-ID and set-group-ID bits.
// This matches binutils<2.36 and probably >=2.37. 2.36 and 2.36.1 have some compatibility issues.
```
Differential Revision: https://reviews.llvm.org/D97253
Diffstat (limited to 'llvm/unittests/ProfileData/CoverageMappingTest.cpp')
0 files changed, 0 insertions, 0 deletions