[lld] r278386 - Change all the libSystem test files to be dylibs instead of normalized files. Currently NFC.

Pete Cooper via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 11:46:22 PDT 2016


Author: pete
Date: Thu Aug 11 13:46:21 2016
New Revision: 278386

URL: http://llvm.org/viewvc/llvm-project?rev=278386&view=rev
Log:
Change all the libSystem test files to be dylibs instead of normalized files.  Currently NFC.

A future commit will change when we choose to add an LC_LOAD_DYLIB to the final image.  Currently
we do this when an atom is used, but we need to do it when a dylib is referenced on the cmdline as
this matches ld64.

To allow this change, libsystem (and other future yaml files representing dylibs) need to be dylibs
so that the loader can see to add them to the referenced dylib list.

Modified:
    lld/trunk/test/mach-o/Inputs/arm64/libSystem.yaml
    lld/trunk/test/mach-o/Inputs/armv7/libSystem.yaml
    lld/trunk/test/mach-o/Inputs/x86/libSystem.yaml
    lld/trunk/test/mach-o/Inputs/x86_64/libSystem.yaml

Modified: lld/trunk/test/mach-o/Inputs/arm64/libSystem.yaml
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/mach-o/Inputs/arm64/libSystem.yaml?rev=278386&r1=278385&r2=278386&view=diff
==============================================================================
--- lld/trunk/test/mach-o/Inputs/arm64/libSystem.yaml (original)
+++ lld/trunk/test/mach-o/Inputs/arm64/libSystem.yaml Thu Aug 11 13:46:21 2016
@@ -3,10 +3,11 @@
 # and therefore will need a dylib definition of dyld_stub_binder.
 #
 
-shared-library-atoms:
-    - name:              dyld_stub_binder
-      load-name:         /usr/lib/libSystem.B.dylib
-      type:              code
-      size:              0
+--- !mach-o
+arch:            arm64
+file-type:       MH_DYLIB
+install-name:    /usr/lib/libSystem.B.dylib
+exports:
+  - name:            dyld_stub_binder
 
 ...

Modified: lld/trunk/test/mach-o/Inputs/armv7/libSystem.yaml
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/mach-o/Inputs/armv7/libSystem.yaml?rev=278386&r1=278385&r2=278386&view=diff
==============================================================================
--- lld/trunk/test/mach-o/Inputs/armv7/libSystem.yaml (original)
+++ lld/trunk/test/mach-o/Inputs/armv7/libSystem.yaml Thu Aug 11 13:46:21 2016
@@ -3,10 +3,11 @@
 # and therefore will need a dylib definition of dyld_stub_binder.
 #
 
-shared-library-atoms:
-    - name:              dyld_stub_binder
-      load-name:         /usr/lib/libSystem.B.dylib
-      type:              code
-      size:              0
+--- !mach-o
+arch:            armv7
+file-type:       MH_DYLIB
+install-name:    /usr/lib/libSystem.B.dylib
+exports:
+  - name:            dyld_stub_binder
 
 ...

Modified: lld/trunk/test/mach-o/Inputs/x86/libSystem.yaml
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/mach-o/Inputs/x86/libSystem.yaml?rev=278386&r1=278385&r2=278386&view=diff
==============================================================================
--- lld/trunk/test/mach-o/Inputs/x86/libSystem.yaml (original)
+++ lld/trunk/test/mach-o/Inputs/x86/libSystem.yaml Thu Aug 11 13:46:21 2016
@@ -3,10 +3,11 @@
 # and therefore will need a dylib definition of dyld_stub_binder.
 #
 
-shared-library-atoms:
-    - name:              dyld_stub_binder
-      load-name:         /usr/lib/libSystem.B.dylib
-      type:              code
-      size:              0
+--- !mach-o
+arch:            x86
+file-type:       MH_DYLIB
+install-name:    /usr/lib/libSystem.B.dylib
+exports:
+  - name:            dyld_stub_binder
 
 ...

Modified: lld/trunk/test/mach-o/Inputs/x86_64/libSystem.yaml
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/mach-o/Inputs/x86_64/libSystem.yaml?rev=278386&r1=278385&r2=278386&view=diff
==============================================================================
--- lld/trunk/test/mach-o/Inputs/x86_64/libSystem.yaml (original)
+++ lld/trunk/test/mach-o/Inputs/x86_64/libSystem.yaml Thu Aug 11 13:46:21 2016
@@ -3,10 +3,11 @@
 # and therefore will need a dylib definition of dyld_stub_binder.
 #
 
-shared-library-atoms:
-    - name:              dyld_stub_binder
-      load-name:         /usr/lib/libSystem.B.dylib
-      type:              code
-      size:              0
+--- !mach-o
+arch:            x86_64
+file-type:       MH_DYLIB
+install-name:    /usr/lib/libSystem.B.dylib
+exports:
+  - name:            dyld_stub_binder
 
 ...




More information about the llvm-commits mailing list