[llvm-objcopy] --add-symbol: address post-commit reviews of D69093
authorFangrui Song <maskray@google.com>
Thu, 31 Oct 2019 16:12:06 +0000 (09:12 -0700)
committerFangrui Song <maskray@google.com>
Thu, 31 Oct 2019 16:12:06 +0000 (09:12 -0700)
commit27cb352fd27668519f25ab8d5717173fc3ff2235
treef03b44e7ab641a247ed6bf1d7e1edb99c8633d20
parent136918676e834812332d36afce77b70c77bf86d0
[llvm-objcopy] --add-symbol: address post-commit reviews of D69093

* Improve comments.
* Reorder the assignment to Obj.SectionNames before the symbol table
  creation code. Add a test.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D69526
llvm/test/tools/llvm-objcopy/ELF/add-symbol-no-symtab.test
llvm/tools/llvm-objcopy/ELF/Object.cpp