-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[lld-macho]Added missing commit from PR/135241 #137672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@llvm/pr-subscribers-lld-macho @llvm/pr-subscribers-lld Author: Vy Nguyen (oontvoo) ChangesFull diff: https://github.com/llvm/llvm-project/pull/137672.diff 1 Files Affected:
diff --git a/lld/test/MachO/reexport-with-rpath.s b/lld/test/MachO/reexport-with-rpath.s
index 431962a9c2d8a..2672449d3cdbd 100644
--- a/lld/test/MachO/reexport-with-rpath.s
+++ b/lld/test/MachO/reexport-with-rpath.s
@@ -1,4 +1,12 @@
# REQUIRES: x86
+## This tests that lld handles (re)exported libraries with rpath properly .
+## The tests are as follows:
+## - libAee re-exports libBee while defining the install-path with @rpath variable
+## - libBee re-exports libCee while defining the install-path with @rpath variable
+## - libCee contains _c_func symbol.
+##
+## We check that when linking a main which references _c_func, lld can find the symbol.
+
# RUN: rm -rf %t; split-file %s %t
# RUN: mkdir -p %t/cc/two/three
# RUN: mkdir -p %t/bb/two/three
@@ -7,10 +15,12 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/c.s -o %t/c.o
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/b.s -o %t/b.o
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/a.s -o %t/a.o
+# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/main.s -o %t/main.o
# RUN: %lld -dylib -install_name @rpath/two/three/libCee.dylib %t/c.o -o %t/cc/two/three/libCee.dylib
# RUN: %lld -dylib -install_name @rpath/two/three/libBee.dylib -L%t/cc/two/three -sub_library libCee -lCee %t/b.o -o %t/bb/two/three/libBee.dylib -rpath %t/cc
-# RUN: %lld -dylib -install_name @rpath/two/three/libAee.dylib -L%t/bb/two/three -sub_library libBee -lBee %t/a.o -o %t/aa/two/three/libAee.dylib
+# RUN: %lld -dylib -install_name @rpath/two/three/libAee.dylib -L%t/bb/two/three -sub_library libBee -lBee %t/a.o -o %t/aa/two/three/libAee.dylib -rpath %t/aa
+# RUN: %lld %t/main.o -L%t/aa/two/three -lAee -o a.out -rpath %t/aa -rpath %t/bb -rpath %t/cc
#--- c.s
.text
@@ -33,3 +43,11 @@ _b_func:
_a_func:
mov $0, %rax
ret
+
+#--- main.s
+.globl _main
+_main:
+ callq _c_func
+ callq _b_func
+ callq _a_func
+ ret
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/16808 Here is the relevant piece of the build log for the reference
|
IanWood1
pushed a commit
to IanWood1/llvm-project
that referenced
this pull request
May 6, 2025
IanWood1
pushed a commit
to IanWood1/llvm-project
that referenced
this pull request
May 6, 2025
IanWood1
pushed a commit
to IanWood1/llvm-project
that referenced
this pull request
May 6, 2025
GeorgeARM
pushed a commit
to GeorgeARM/llvm-project
that referenced
this pull request
May 7, 2025
Ankur-0429
pushed a commit
to Ankur-0429/llvm-project
that referenced
this pull request
May 9, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.