]> git.saurik.com Git - apple/ld64.git/blobdiff - unit-tests/test-cases/install-name-override/foo.c
ld64-133.3.tar.gz
[apple/ld64.git] / unit-tests / test-cases / install-name-override / foo.c
diff --git a/unit-tests/test-cases/install-name-override/foo.c b/unit-tests/test-cases/install-name-override/foo.c
new file mode 100644 (file)
index 0000000..1a68260
--- /dev/null
@@ -0,0 +1,18 @@
+
+int foo()
+{
+       return 0;
+}
+
+                       
+#if __arm__ 
+       #define INSTALL_NAME_4_0(sym) \
+                 extern const char install_name_4_0 __asm("$ld$install_name$os4.0$" #sym ); const char install_name_4_0 = 0;
+                               
+       INSTALL_NAME_4_0(/usr/lib/libfoo.dylib)
+#else
+       #define INSTALL_NAME_10_5(sym) \
+                 extern const char install_name_10_5 __asm("$ld$install_name$os10.5$" #sym ); const char install_name_10_5 = 0;
+                               
+       INSTALL_NAME_10_5(/usr/lib/libfoo.dylib)
+#endif