Skip to contentSkip to conversation

ld.so.8: Explain than empty entry in LD_LIBRARY_PATH means cwd

PATCH In review Arkadiusz Drabczyk 2 participants 2 messages Jun 23, 2020 – Jun 25, 2020 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ld.so.8: Explain than empty entry in LD_LIBRARY_PATH means cwd

If this was ever going to change the test case is very simple:

/tmp $ touch libc.so.6
/tmp $ LD_LIBRARY_PATH=: sh
sh: error while loading shared libraries: libc.so.6: file too short

---
 man8/ld.so.8 | 1 +
 1 file changed, 1 insertion(+)
man8/ld.so.8 +1 -0
index 9034612..2e98b7f 100644
@@ -319,6 +319,7 @@ A list of directories in which to search for
 ELF libraries at execution time.
 The items in the list are separated by either colons or semicolons,
 and there is no support for escaping either separator.
+A zero-length directory name indicates the current working directory.
 .IP
 This variable is ignored in secure-execution mode.
 .IP
Signature · 1 line
2.9.0
#1 lore raw

Hello Arkadiusz

Quoted 7 lines · Arkadiusz Drabczyk

If this was ever going to change the test case is very simple:

/tmp $ touch libc.so.6
/tmp $ LD_LIBRARY_PATH=: sh
sh: error while loading shared libraries: libc.so.6: file too short

Thanks for the patch, and the succinct test/demo in the commit message!

Patch applied.

Cheers,

Michael

Quoted 17 lines
---
 man8/ld.so.8 | 1 +
 1 file changed, 1 insertion(+)
man8/ld.so.8 +1 -0
index 9034612..2e98b7f 100644
@@ -319,6 +319,7 @@ A list of directories in which to search for
 ELF libraries at execution time.
 The items in the list are separated by either colons or semicolons,
 and there is no support for escaping either separator.
+A zero-length directory name indicates the current working directory.
 .IP
 This variable is ignored in secure-execution mode.
 .IP
Signature · 3 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/