Skip to content

Instantly share code, notes, and snippets.

@jrelo
Created February 2, 2017 14:58
Show Gist options
  • Save jrelo/a237da39b1346b4f66c1f2d565cbb28b to your computer and use it in GitHub Desktop.
Save jrelo/a237da39b1346b4f66c1f2d565cbb28b to your computer and use it in GitHub Desktop.
ld(linker) search paths
ldconfig -v 2>/dev/null | grep -v ^$'\t'
ld --verbose | grep SEARCH_DIR | tr -s ' ;' \\012
gcc -print-search-dirs | sed '/^lib/b 1;d;:1;s,/[^/.][^/]*/\.\./,/,;t 1;s,:[^=]*=,:;
$ gcc -m64 -Xlinker --verbose 2>/dev/null | grep SEARCH | sed 's/SEARCH_DIR("=\?\([^"]\+\)"); */\1\n/g' | grep -vE '^$'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment