1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00
llvm-mirror/tools/llvm-objcopy
Fangrui Song f1e68092e6 [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
2021-02-24 11:10:09 -08:00
..
COFF [llvm-objcopy] Delete --build-id-link-{dir,input,output} 2021-02-15 11:17:32 -08:00
ELF [llvm-objcopy] Delete --build-id-link-{dir,input,output} 2021-02-15 11:17:32 -08:00
MachO [llvm-objcopy] Delete --build-id-link-{dir,input,output} 2021-02-15 11:17:32 -08:00
wasm [llvm-objcopy] Delete --build-id-link-{dir,input,output} 2021-02-15 11:17:32 -08:00
BitcodeStripOpts.td [llvm-objcopy][MachO] Add llvm-bitcode-strip driver 2020-09-18 18:13:05 -07:00
Buffer.cpp [llvm-objcopy] preserve file ownership when overwritten by root 2021-02-12 18:01:43 -08:00
Buffer.h [llvm-objcopy] preserve file ownership when overwritten by root 2021-02-12 18:01:43 -08:00
CMakeLists.txt [llvm-objcopy][MachO] Add llvm-bitcode-strip driver 2020-09-18 18:13:05 -07:00
CommonOpts.td [llvm-objcopy][ELF] Implement --only-keep-debug 2019-11-05 08:56:15 -08:00
CopyConfig.cpp [llvm-objcopy] Delete --build-id-link-{dir,input,output} 2021-02-15 11:17:32 -08:00
CopyConfig.h [llvm-objcopy] Delete --build-id-link-{dir,input,output} 2021-02-15 11:17:32 -08:00
InstallNameToolOpts.td [llvm-install-name-tool] Add -prepend_rpath option 2020-10-23 15:01:03 -07:00
llvm-objcopy.cpp [llvm-objcopy] If input=output, preserve umask bits, otherwise drop S_ISUID/S_ISGID bits 2021-02-24 11:10:09 -08:00
llvm-objcopy.h [llvm-objcopy][MachO] Add support for universal binaries 2020-10-06 04:01:40 -07:00
ObjcopyOpts.td [llvm-objcopy] Delete --build-id-link-{dir,input,output} 2021-02-15 11:17:32 -08:00
StripOpts.td [llvm-objcopy][MachO] Add support for removing Swift symbols 2020-05-26 16:49:56 -07:00