[PATCH] [lld][LinkerScript] Add matching of output sections to segments

Sean Silva chisophugis at gmail.com
Thu Jun 11 13:58:51 PDT 2015


================
Comment at: test/elf/linkerscript/phdrs-invalid.test:10-35
@@ +9,28 @@
+
+(command line clang -c simple.S -o simple.o)
+
+      .text
+      main:
+        mov $1, %eax
+        movq $1, %rdi
+        movq $msg, %rsi
+        movq $14, %rdx
+        syscall
+        ret
+
+        .globl _start
+      _start:
+        call  main
+        mov $60, %eax
+        syscall
+        ret
+
+      .data
+      msg: .asciz "Hello, World!\n"
+*/
+
+/*
+Prepare the object file to test on.
+
+RUN: yaml2obj -format=elf %p/Inputs/simple.o.yaml -o=%t.o
+*/
----------------
denis-protivensky wrote:
> silvas wrote:
> > You can directly use llvm-mc instead of yaml2obj.
> Good point, but I'd prefer to use yaml2obj for consistency with other tests in lld, and because we already have the corresponding yaml file, so there's no need to add another one with assembly code.
There's been discussion about this recently on the mailing lists. Whichever tool is most convenient should be used (in this case, llvm-mc is clearly the most convenient). Generally speaking, yaml2obj has been overused in LLD.

http://reviews.llvm.org/D10359

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list