[PATCH] D64750: [llvm-readelf] - Remove the precompiled binary from gnu-hash-symbols.test.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 16 07:54:38 PDT 2019


jhenderson added inline comments.


================
Comment at: test/tools/llvm-readobj/elf-hash-symbols.test:78
+
+## Show that if there are no hash sections, we do not print anything.
+# RUN: yaml2obj --docnum=2 %s -o %t2.o
----------------
grimar wrote:
> MaskRay wrote:
> > jhenderson wrote:
> > > Do you think there's value for testing the case with exactly one of .hash or .gnu.hash?
> > I think it is fine not to test that...
> I do not mind. Done. 
> 
> Side question: if we have a file with dynamic table that has `DT_HASH` and `DT_GNU_HASH` tags
> and we have `.hash` and `.gnu.hash` sections. Do you think that `llvm-objcopy` should remove `DT_HASH` if we remove a `.hash` section?
> (Does not seem GNU objcopy do that, I only did a quick test though, doesn't seem it is correct to keep it).
I don't think llvm-objcopy should be modifying the contents of the .dynamic section or any other loadable section, with the exception of removing the contents of sections where we explicitly request to remove them. Doing so can mess up addresses and so on.


================
Comment at: test/tools/llvm-readobj/elf-hash-symbols.test:7
+# RUN: llvm-readelf --hash-symbols %t1-32.so \
+# RUN:   | FileCheck %s --strict-whitespace --match-full-lines --check-prefix HASH-I386
+
----------------
HASH-I386 -> HASH-32


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64750/new/

https://reviews.llvm.org/D64750





More information about the llvm-commits mailing list