ld.so.8: Correct linker option name
PATCH 1/1 ld.so.8: Correct linker option name
The linker option that sets the DF_1_NODEFLIB flag is -z nodefaultlib instead of -z nodeflib.
--- man8/ld.so.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
man8/ld.so.8 +2 -2
@@ -83,7 +83,7 @@ From the cache file which contains a compiled list of candidate shared objects previously found in the augmented library path. If, however, the binary was linked with the -.B \-z nodeflib +.B \-z nodefaultlib linker option, shared objects in the default paths are skipped. Shared objects installed in hardware capability directories (see below) are preferred to other shared objects.
@@ -97,7 +97,7 @@ and then and then .IR /usr/lib64 .) If the binary was linked with the -.B \-z nodeflib +.B \-z nodefaultlib linker option, this step is skipped. .\" .SS Dynamic string tokens
Signature · 1 line
2.41.0.455.g037347b96a-goog
Alejandro Colomar
maintainerHi Fangrui,
Quoted 2 lines · Fangrui Song
The linker option that sets the
DF_1_NODEFLIBflag is -z nodefaultlib instead of -z nodeflib.
Does -z nodeflib exist? Please mention that in your commit message.
Thanks,
Alex
Quoted 28 lines
Signed-off-by Fangrui Song <[email protected]>--- man8/ld.so.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)man8/ld.so.8 +2
-2@@ -83,7 +83,7 @@ From the cache file which contains a compiled list of candidate shared objects previously found in the augmented library path. If, however, the binary was linked with the -.B \-z nodeflib +.B \-z nodefaultlib linker option, shared objects in the default paths are skipped. Shared objects installed in hardware capability directories (see below) are preferred to other shared objects.@@ -97,7 +97,7 @@ and then and then .IR /usr/lib64 .) If the binary was linked with the -.B \-z nodeflib +.B \-z nodefaultlib linker option, this step is skipped. .\" .SS Dynamic string tokens
Signature · 2 lines
<http://www.alejandro-colomar.es/> GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
Quoted 11 lines · Alejandro Colomar
Hi Fangrui,
Quoted 2 lines · Fangrui Song
The linker option that sets the
DF_1_NODEFLIBflag is -z nodefaultlib instead of -z nodeflib.Does -z nodeflib exist? Please mention that in your commit message.
Thanks,
Alex
Hi Alex, -z nodeflib is not defined.
% ld.bfd -m elf_x86_64 -e 0 /dev/null -z nodeflib
ld.bfd: warning: -z nodeflib ignored
% ld.lld -m elf_x86_64 -e 0 /dev/null -z nodeflib
ld.lld: warning: unknown -z value: nodeflib
I have double checked that my commit message is accurate.
Quoted 33 lines
Quoted 20 lines
Signed-off-by Fangrui Song <[email protected]>--- man8/ld.so.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)man8/ld.so.8 +1
-1@@ -83,7 +83,7 @@ From the cache file which contains a compiled list of candidate shared objects previously found in the augmented library path. If, however, the binary was linked with the -.B \-z nodeflib +.B \-z nodefaultlib linker option, shared objects in the default paths are skipped. Shared objects installed in hardware capability directories (see below) are preferred to other shared objects.man8/ld.so.8 and then · line 103
Quoted 8 lines
man8/ld.so.8 +1
-1@@ -97,7 +97,7 @@ and then and then .IR /usr/lib64 .) If the binary was linked with the -.B \-z nodeflib +.B \-z nodefaultlib linker option, this step is skipped. .\" .SS Dynamic string tokens--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
Signature · 1 line
宋方睿
Alejandro Colomar
maintainerHi,
Quoted 13 lines · Fangrui Song
Quoted 11 lines · Alejandro Colomar
Hi Fangrui,
Quoted 2 lines · Fangrui Song
The linker option that sets the
DF_1_NODEFLIBflag is -z nodefaultlib instead of -z nodeflib.Does -z nodeflib exist? Please mention that in your commit message.
Thanks,
Alex
Quoted 8 lines
Hi Alex, -z nodeflib is not defined.
% ld.bfd -m
elf_x86_64-e 0/dev/null-z nodeflib
ld.bfd: warning: -z nodeflib ignored
% ld.lld -melf_x86_64-e 0/dev/null-z nodeflib
ld.lld: warning: unknown -z value: nodeflibI have double checked that my commit message is accurate.
I say it because it is a bit ambiguous, in the sense that it's not clear if nodeflib is a valid flag but which is not the one we're interested in, or if it's just an invalid flag.
It's not a problem for those who know, but it reduces the work for those who don't know. Anyway, that was my guess, but I was only 90% certain without checking. I suggest appending this at the end of your commit message:
``` -z nodeflib is not defined. % ld.bfd -m elf_x86_64 -e 0 /dev/null -z nodeflib ld.bfd: warning: -z nodeflib ignored % ld.lld -m elf_x86_64 -e 0 /dev/null -z nodeflib ld.lld: warning: unknown -z value: nodeflib ```
What do you think?
Thanks,
Alex
Quoted 36 lines
Quoted 34 lines
Quoted 21 lines
Signed-off-by Fangrui Song <[email protected]>--- man8/ld.so.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)man8/ld.so.8 +1
-1@@ -83,7 +83,7 @@ From the cache file which contains a compiled list of candidate shared objects previously found in the augmented library path. If, however, the binary was linked with the -.B \-z nodeflib +.B \-z nodefaultlib linker option, shared objects in the default paths are skipped. Shared objects installed in hardware capability directories (see below) are preferred to other shared objects.man8/ld.so.8 and then · line 103
Quoted 8 lines
man8/ld.so.8 +1
-1@@ -97,7 +97,7 @@ and then and then .IR /usr/lib64 .) If the binary was linked with the -.B \-z nodeflib +.B \-z nodefaultlib linker option, this step is skipped. .\" .SS Dynamic string tokens--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
Signature · 2 lines
<http://www.alejandro-colomar.es/> GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
Quoted 44 lines · Alejandro Colomar
Hi,
Quoted 13 lines · Fangrui Song
Quoted 11 lines · Alejandro Colomar
Hi Fangrui,
Quoted 2 lines · Fangrui Song
The linker option that sets the
DF_1_NODEFLIBflag is -z nodefaultlib instead of -z nodeflib.Does -z nodeflib exist? Please mention that in your commit message.
Thanks,
AlexQuoted 8 lines
Hi Alex, -z nodeflib is not defined.
% ld.bfd -m
elf_x86_64-e 0/dev/null-z nodeflib
ld.bfd: warning: -z nodeflib ignored
% ld.lld -melf_x86_64-e 0/dev/null-z nodeflib
ld.lld: warning: unknown -z value: nodeflibI have double checked that my commit message is accurate.
I say it because it is a bit ambiguous, in the sense that it's not clear if nodeflib is a valid flag but which is not the one we're interested in, or if it's just an invalid flag.
It's not a problem for those who know, but it reduces the work for those who don't know. Anyway, that was my guess, but I was only 90% certain without checking. I suggest appending this at the end of your commit message:
``` -z nodeflib is not defined. % ld.bfd -m elf_x86_64 -e 0 /dev/null -z nodeflib ld.bfd: warning: -z nodeflib ignored % ld.lld -m elf_x86_64 -e 0 /dev/null -z nodeflib ld.lld: warning: unknown -z value: nodeflib ```
Quoted 4 lines
What do you think?
Thanks,
Alex
Thank you for the suggestion! I agree that adding the commands clarifies things. Sent v2: https://lore.kernel.org/linux-man/[email protected]/T/#u
Quoted 41 lines
Quoted 26 lines
Quoted 26 lines
Quoted 26 lines
Signed-off-by Fangrui Song <[email protected]>--- man8/ld.so.8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)man8/ld.so.8 +2
-2@@ -83,7 +83,7 @@ From the cache file which contains a compiled list of candidate shared objects previously found in the augmented library path. If, however, the binary was linked with the -.B \-z nodeflib +.B \-z nodefaultlib linker option, shared objects in the default paths are skipped. Shared objects installed in hardware capability directories (see below) are preferred to other shared objects.@@ -97,7 +97,7 @@ and then and then .IR /usr/lib64 .) If the binary was linked with the -.B \-z nodeflib +.B \-z nodefaultlibQuoted 10 lines
Quoted 8 lines
man8/ld.so.8 and then · line 103
Quoted 3 lines
man8/ld.so.8 +0
-0linker option, this step is skipped. .\" .SS Dynamic string tokens--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5--
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5
Signature · 1 line
宋方睿