1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/docs/CommandGuide
Fangrui Song dd2cb2d821 [llvm-objcopy][ELF] Implement --only-keep-debug
--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
2019-11-05 08:56:15 -08:00
..
bugpoint.rst
dsymutil.rst
FileCheck.rst [FileCheck] Implement --ignore-case option. 2019-10-11 11:59:14 +00:00
index.rst Reland "[utils] Implement the llvm-locstats tool" 2019-10-02 07:00:01 +00:00
lit.rst [lit] Bring back --threads option alias 2019-10-10 19:43:57 +00:00
llc.rst [Remarks] Remove references to ELF support 2019-10-28 12:50:46 -07:00
lli.rst
llvm-addr2line.rst [docs] Convert remaining command guide entries from md to rst. 2019-08-21 18:00:17 +00:00
llvm-ar.rst [docs][llvm-ar] Update llvm-ar command guide 2019-10-21 13:13:31 +00:00
llvm-as.rst
llvm-bcanalyzer.rst
llvm-build.rst
llvm-config.rst
llvm-cov.rst Revert "[llvm-cov] Add option to whitelist filenames" 2019-10-29 22:38:38 -07:00
llvm-cxxfilt.rst [docs] Make --version text more correct 2019-09-17 11:43:42 +00:00
llvm-cxxmap.rst
llvm-diff.rst
llvm-dis.rst
llvm-dwarfdump.rst
llvm-exegesis-analysis.png
llvm-exegesis.rst [llvm-exegesis] Add options to SnippetGenerator. 2019-10-08 14:30:24 +00:00
llvm-extract.rst
llvm-lib.rst
llvm-link.rst
llvm-lipo.rst
llvm-locstats.rst [llvm-locstats] Fix a typo in the documentation; NFC 2019-10-07 07:31:49 +00:00
llvm-mca.rst [MCA] Show aggregate over Average Wait times for the whole snippet (PR43219) 2019-10-10 14:46:21 +00:00
llvm-nm.rst [docs] Make --version text more correct 2019-09-17 11:43:42 +00:00
llvm-objcopy.rst [llvm-objcopy][ELF] Implement --only-keep-debug 2019-11-05 08:56:15 -08:00
llvm-objdump.rst [docs] Make --version text more correct 2019-09-17 11:43:42 +00:00
llvm-pdbutil.rst
llvm-profdata.rst [llvm-profdata] Add mode to recover from profile read failures 2019-09-03 22:23:16 +00:00
llvm-ranlib.rst Fix some regressions caused by r369553 on old versions of Debian and Ubuntu 2019-08-22 12:16:08 +00:00
llvm-readelf.rst [llvm-readobj/llvm-readelf] Delete --arm-attributes (alias for --arch-specific) 2019-10-01 01:31:15 +00:00
llvm-readobj.rst [llvm-readobj/llvm-readelf] Delete --arm-attributes (alias for --arch-specific) 2019-10-01 01:31:15 +00:00
llvm-size.rst [docs][llvm-size] Fix typo 2019-09-24 13:14:22 +00:00
llvm-stress.rst
llvm-strings.rst [docs][llvm-strings] Clarify "printable character" wording 2019-09-25 13:09:17 +00:00
llvm-strip.rst [llvm-objcopy] Preserve .ARM.attributes section when stripping files 2019-10-31 11:57:19 +00:00
llvm-symbolizer.rst
opt.rst
tblgen.rst