{
	"id": "fac00645-ccf6-404a-b606-d22dbbb46d08",
	"created_at": "2026-04-06T01:30:07.179773Z",
	"updated_at": "2026-04-10T03:21:59.05594Z",
	"deleted_at": null,
	"sha1_hash": "e49f199c241ddd428ef1ef71bb1de4239cee3994",
	"title": "Run-Path Dependent Libraries",
	"llm_title": "",
	"authors": "",
	"file_creation_date": "0001-01-01T00:00:00Z",
	"file_modification_date": "0001-01-01T00:00:00Z",
	"file_size": 48988,
	"plain_text": "Run-Path Dependent Libraries\r\nPublished: 2012-07-23 · Archived: 2026-04-06 01:13:58 UTC\r\nApplication users often need to organize their applications within their file systems in a way that makes them\r\nmore efficient to use. This capability is easy to provide for a single binary because the location of its dependent\r\nlibraries is easy to determine: They may reside at a standard location in the file system or at a location relative to\r\nthe binary itself. However, when dealing with a set of applications that share dependent libraries (for example, in\r\nan application suite), providing users the ability to relocate the suite directory is more difficult: Either the suite’s\r\ndependent libraries must be located outside the suite directory, or each of the suite’s executables must be linked\r\ntaking into account its position within the suite. In OS X v10.5 and later the linker and dynamic loader offer a\r\nsimple way of allowing multiple executables in an application suite directory to share dependent libraries while\r\nproviding the suite’s users the option of relocating the suite directory. Using run-path dependent libraries you can\r\ncreate a directory structure containing executables and dependent libraries that users can relocate without breaking\r\nit.\r\nA run-path dependent library is a dependent library whose complete install name is not known when the library is\r\ncreated (see How Dynamic Libraries Are Used). Instead, the library specifies that the dynamic loader must resolve\r\nthe library’s install name when it loads the executable that depends on the library.\r\nTo use run-path dependent libraries, an executable provides a list of run-path search paths, which the dynamic\r\nloader traverses at load time to find the libraries.\r\nThis article describes how to create run-path dependent libraries and how to use them in executables.\r\nCreating Run-Path Dependent Libraries\r\nTo create a run-path dependent library, you specify a run-path–relative pathname as the library’s install name. A\r\nrun-path-relative pathname uses the @rpath macro to specify a path relative to a directory to be determined at\r\nruntime. A run-path–relative pathname uses the following format:\r\n@rpath/\u003cpath_to_dynamic_library\u003e\r\nThese are examples of run-path–relative pathnames:\r\n@rpath/libMyLib.dylib\r\n@rpath/MyFramework.framework/Versions/A/MyFramework\r\nA run-path install name is an install name that uses a run-path–relative pathname. You specify a run-path install\r\nname while creating the dependent library using the gcc -install_name option. See the gcc man page for\r\nmore information.\r\nhttps://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDependentLibraries.html\r\nPage 1 of 2\n\nUsing Run-Path Dependent Libraries\r\nTo use run-path dependent libraries (those using run-path install names) on an executable, you specify one or more\r\nrun-path search paths with the ld -rpath option (each -rpath clause specifies one run-path location). When\r\nthe dynamic loader ( dyld ) loads the executable, it looks for run-path dependent libraries in the run-path search\r\npaths in the order in which they were specified at link time.\r\nThis is an example of a list of run-path search paths:\r\n@loader_path/../Library/Frameworks\r\n@loader_path/../Library/OpenSource\r\n/usr/lib\r\nSource: https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDepen\r\ndentLibraries.html\r\nhttps://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDependentLibraries.html\r\nPage 2 of 2",
	"extraction_quality": 1,
	"language": "EN",
	"sources": [
		"MITRE"
	],
	"references": [
		"https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/RunpathDependentLibraries.html"
	],
	"report_names": [
		"RunpathDependentLibraries.html"
	],
	"threat_actors": [],
	"ts_created_at": 1775439007,
	"ts_updated_at": 1775791319,
	"ts_creation_date": 0,
	"ts_modification_date": 0,
	"files": {
		"pdf": "https://archive.orkl.eu/e49f199c241ddd428ef1ef71bb1de4239cee3994.pdf",
		"text": "https://archive.orkl.eu/e49f199c241ddd428ef1ef71bb1de4239cee3994.txt",
		"img": "https://archive.orkl.eu/e49f199c241ddd428ef1ef71bb1de4239cee3994.jpg"
	}
}