mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
dd2cb2d821
--only-keep-debug produces a debug file as the output that only preserves contents of sections useful for debugging purposes (the binutils implementation preserves SHT_NOTE and non-SHF_ALLOC sections), by changing their section types to SHT_NOBITS and rewritting file offsets. See https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html The intended use case is: ``` llvm-objcopy --only-keep-debug a a.dbg llvm-objcopy --strip-debug a b llvm-objcopy --add-gnu-debuglink=a.dbg b ``` The current layout algorithm is incapable of deleting contents and shrinking segments, so it is not suitable for implementing the functionality. This patch adds a new algorithm which assigns sh_offset to sections first, then modifies p_offset/p_filesz of program headers. It bears a resemblance to lld/ELF/Writer.cpp. Reviewed By: jhenderson, jakehehrlich Differential Revision: https://reviews.llvm.org/D67137 |
||
---|---|---|
.. | ||
bugpoint.rst | ||
dsymutil.rst | ||
FileCheck.rst | ||
index.rst | ||
lit.rst | ||
llc.rst | ||
lli.rst | ||
llvm-addr2line.rst | ||
llvm-ar.rst | ||
llvm-as.rst | ||
llvm-bcanalyzer.rst | ||
llvm-build.rst | ||
llvm-config.rst | ||
llvm-cov.rst | ||
llvm-cxxfilt.rst | ||
llvm-cxxmap.rst | ||
llvm-diff.rst | ||
llvm-dis.rst | ||
llvm-dwarfdump.rst | ||
llvm-exegesis-analysis.png | ||
llvm-exegesis.rst | ||
llvm-extract.rst | ||
llvm-lib.rst | ||
llvm-link.rst | ||
llvm-lipo.rst | ||
llvm-locstats.rst | ||
llvm-mca.rst | ||
llvm-nm.rst | ||
llvm-objcopy.rst | ||
llvm-objdump.rst | ||
llvm-pdbutil.rst | ||
llvm-profdata.rst | ||
llvm-ranlib.rst | ||
llvm-readelf.rst | ||
llvm-readobj.rst | ||
llvm-size.rst | ||
llvm-stress.rst | ||
llvm-strings.rst | ||
llvm-strip.rst | ||
llvm-symbolizer.rst | ||
opt.rst | ||
tblgen.rst |