This patch addresses https://bugs.llvm.org/show_bug.cgi?id=42183 by replacing the stub markdown doc for llvm-objcopy with a full one describing the current options available in llvm-objcopy.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
docs/CommandGuide/llvm-objcopy.rst | ||
---|---|---|
419 | SUPPORTED FORMATS might be a bit more appropriate as the section header. It may be worth mentioning elf* below are bfdnames. |
- Change SUPPORTED TARGETS to SUPPORTED FORMATS.
- Add a note about the supported formats being bfdnames for compatibility.
- Normalized some wording for the --.*target options.
- Added a .. program directive to ensure that option links remain pointing to the right document.
This is *awesome*. This is much more clear and precise that the GNU objcopy documentation!
I hadn't realized just how far the tool has come! Great job!
docs/CommandGuide/llvm-objcopy.rst | ||
---|---|---|
82–83 | We keep .gnu.warning sections as well right? | |
131 | This is half fair. Technically it meets the requirements for ELF it just doesn't work optimally. I think adding a caveat section under ELF-specific section might be warranted. | |
227 | Might add "with local binding" | |
380 | Say "with no other arguments" to clarify that the --extract-dwo file has no flags applied to it. | |
395 | I'd note that many non-llvm tools are incompatible with this option and that it should only be used when a) you need the absolute smallest file possible and b) should never be used on ET_REL binaries. |
docs/CommandGuide/llvm-objcopy.rst | ||
---|---|---|
10 | It may be more common to place options before positional arguments, i.e. :program:`llvm-objcopy` [*options*] *input* [*output*] |
Address review comments.
docs/CommandGuide/llvm-objcopy.rst | ||
---|---|---|
131 | Config.OnlyKeepDebug is not used outside the COFF code, so this really is ignored for ELF as things stand. Given that the output of using this on ELF is not what GNU produces (i.e. it's a no-op), I'm not convinced we should advertise this more widely. We could make similar arguments about various options that are currently ELF-specific, and aren't checked by the COFF code for an error. I've added a blanket comment to the top of the section saying that llvm-objcopy will either ignore or error for format-specific options (same for ELF). | |
227 | Isn't that what "local symbols" means? | |
395 | I've added a more general note that "many tools will not be able to" handle such objects. I don't see a reason to mention when you should or shouldn't do this beyond that statement because ultimately if a user is using this switch, they will know why they are using it, whether it be for size, obfuscation, or whatever. Telling people that it's always about size is like telling them what their motivation is. If it's run on an ET_REL binary, then the entire section contents of the file will be removed. I don't think this needs explicitly stating, since that can be inferred from the reference to "not within segments". |
Improve text of --dump-section to clarify that the regular copying still takes place.
LGTM (sorry a chrome bug is preventing me from using drop down menus...sigh)
docs/CommandGuide/llvm-objcopy.rst | ||
---|---|---|
233 | Perhaps its worth mentioning that operations are not performed on the section itself prior to dumping? |
It may be more common to place options before positional arguments, i.e.