1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/tools/llvm-objcopy
Fangrui Song 75930147a7 [llvm-objcopy][ELF] --only-keep-debug: set offset/size of segments with no sections to zero
PR50160: we currently ignore non-PT_PHDR segments with no sections, not
accounting for its p_offset and p_filesz: this can cause an out-of-bounds write
in `writeSegmentData` if the p_offset+p_filesz is larger than the total file
size.

This can be fixed by setting p_offset=p_filesz=0. The logic nicely unifies with
the logic added in D90897.

Reviewed By: jhenderson, rupprecht

Differential Revision: https://reviews.llvm.org/D101560
2021-05-05 10:26:57 -07:00
..
COFF [llvm-objcopy][NFC] replace class Buffer/MemBuffer/FileBuffer with streams. 2021-03-10 23:50:04 +03:00
ELF [llvm-objcopy][ELF] --only-keep-debug: set offset/size of segments with no sections to zero 2021-05-05 10:26:57 -07:00
MachO [llvm-objcopy][MachO] Add support for LC_THREAD/LC_UNIXTHREAD 2021-04-28 16:29:33 -07:00
wasm [llvm-objcopy][NFC][Wasm] Do not use internal buffer while writing into the output. 2021-03-18 16:02:45 +03:00
BitcodeStripOpts.td [llvm-objcopy][MachO] Add llvm-bitcode-strip driver 2020-09-18 18:13:05 -07:00
CMakeLists.txt [llvm-objcopy][NFC] replace class Buffer/MemBuffer/FileBuffer with streams. 2021-03-10 23:50:04 +03:00
CommonOpts.td [llvm-objcopy][MachO] Add support for --keep-undefined 2021-03-08 18:57:25 -08:00
CopyConfig.cpp [llvm-objcopy] --dump-section: error if '=' is missing or filename is empty 2021-05-04 17:30:57 -07:00
CopyConfig.h [llvm-objcopy][MachO] Add support for --keep-undefined 2021-03-08 18:57:25 -08:00
InstallNameToolOpts.td [llvm-install-name-tool] Add -prepend_rpath option 2020-10-23 15:01:03 -07:00
llvm-objcopy.cpp Fix chrome os failure after 021de7cf80268091cf13485a538b611b37d0b33e. 2021-04-12 15:28:32 +03:00
llvm-objcopy.h [llvm-objcopy][Support] move writeToOutput helper function to Support. 2021-03-22 15:41:10 +03: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