[PATCH] D59958: [llvm-objcopy] Change SHT_NOBITS to SHT_PROBITS for some --set-section-flags
Jordan Rupprecht via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 28 13:17:55 PDT 2019
rupprecht created this revision.
rupprecht added reviewers: jhenderson, grimar, jakehehrlich, alexshap.
Herald added subscribers: llvm-commits, MaskRay, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
Some flags accepted by --set-section-flags and --rename-section can change a SHT_NOBITS section to a SHT_PROGBITS section. Note that none of them can change a SHT_PROGBITS to SHT_NOBITS.
The full list (found via experimentation of individually setting each flag) that does this is: contents, load, noload, code, data, rom, and debug.
This was found by testing llvm-objcopy with the gnu binutils test suite, specifically this test case: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=binutils/testsuite/binutils-all/copy-1.d;h=f2b0d9e90df738c2891b4d5c7b62f62894b556ca;hb=HEAD
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D59958
Files:
llvm/test/tools/llvm-objcopy/ELF/rename-section-flag.test
llvm/test/tools/llvm-objcopy/ELF/set-section-flags.test
llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59958.192707.patch
Type: text/x-patch
Size: 11683 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190328/c3065d64/attachment.bin>
More information about the llvm-commits
mailing list