File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,10 @@ impl Relinker for SharedObject {
118118 . strip_prefix ( prefix)
119119 . expect ( "library not in prefix" ) ,
120120 ) ;
121- if let Ok ( rpath_without_loader) = rpath. strip_prefix ( "$ORIGIN" ) {
121+ if let Ok ( rpath_without_loader) = rpath
122+ . strip_prefix ( "$ORIGIN" )
123+ . or_else ( |_| rpath. strip_prefix ( "${ORIGIN}" ) )
124+ {
122125 if let Some ( library_parent) = self_path. parent ( ) {
123126 return to_lexical_absolute ( rpath_without_loader, library_parent) ;
124127 } else {
@@ -169,7 +172,7 @@ impl Relinker for SharedObject {
169172 let mut final_rpaths = Vec :: new ( ) ;
170173
171174 for rpath in rpaths. iter ( ) . chain ( runpaths. iter ( ) ) {
172- if rpath. starts_with ( "$ORIGIN" ) {
175+ if rpath. starts_with ( "$ORIGIN" ) || rpath . starts_with ( "${ORIGIN}" ) {
173176 let resolved = self . resolve_rpath ( rpath, prefix, encoded_prefix) ;
174177 if resolved. starts_with ( encoded_prefix) {
175178 final_rpaths. push ( rpath. clone ( ) ) ;
You can’t perform that action at this time.
0 commit comments