================
@@ -0,0 +1,42 @@
+// This test verifies that loading an ELF file that has no section headers can
+// load the dynamic symbol table using the DT_SYMTAB, DT_SYMENT, DT_HASH or
+// the DT_GNU_HASH .dynamic key/value pairs that are loaded via the PT_DYNAMIC
+// segment.
+
+// RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj \
+// RUN:   -o - - <<<".globl defined, undefined; defined:" | \
+// RUN:   ld.lld /dev/stdin -o - --hash-style=gnu -export-dynamic -shared \
----------------
labath wrote:

```suggestion
// RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj %s -o %t.o \
// RUN: ld.lld %t.o --hash-style=gnu -export-dynamic -shared \
```

.. and put the asm input into this file. I don't think `<<<` and `/dev/stdin` 
will work on windows. I've just used as a simple command for experimentation.

I would also recommend more unique names and thinking about whether there are 
any corner cases that are worth explicitly testing (e.g. deliberately creating 
some hash collisions?).

https://github.com/llvm/llvm-project/pull/112596
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to