selftests/bpf: fix build-id for liburandom_read.so
Subsystems (5)
PATCH 1/1 selftests/bpf: fix build-id for liburandom_read.so
lld produces "fast" style build-ids by default, which is inconsistent with ld's "sha1" style. Explicitly specify build-id style to be "sha1" when linking liburandom_read.so the same way it is already done for urandom_read.
--- tools/testing/selftests/bpf/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/bpf/Makefile +2 -1
@@ -182,7 +182,8 @@ endif $(OUTPUT)/liburandom_read.so: urandom_read_lib1.c urandom_read_lib2.c $(call msg,LIB,,$@) $(Q)$(CLANG) $(filter-out -static,$(CFLAGS) $(LDFLAGS)) $^ $(LDLIBS) \ - -fuse-ld=$(LLD) -Wl,-znoseparate-code -fPIC -shared -o $@ + -fuse-ld=$(LLD) -Wl,-znoseparate-code -Wl,--build-id=sha1 \ + -fPIC -shared -o $@ $(OUTPUT)/urandom_read: urandom_read.c urandom_read_aux.c $(OUTPUT)/liburandom_read.so $(call msg,BINARY,,$@)
Signature · 1 line
2.38.1
Quoted 7 lines · Artem Savkov
lld produces "fast" style build-ids by default, which is inconsistent with ld's "sha1" style. Explicitly specify build-id style to be "sha1" when linking liburandom_read.so the same way it is already done for
urandom_read.Signed-off-by Artem Savkov <[email protected]>
This was done in
https://lore.kernel.org/bpf/[email protected]
Daniel Borkmann
maintainerHi Artem,
Quoted 7 lines · KP Singh
Quoted 6 lines · Artem Savkov
lld produces "fast" style build-ids by default, which is inconsistent with ld's "sha1" style. Explicitly specify build-id style to be "sha1" when linking liburandom_read.so the same way it is already done for
urandom_read.
Quoted 6 lines
Quoted 1 line
Signed-off-by Artem Savkov <[email protected]>Acked-by KP Singh <[email protected]>This was done in
https://lore.kernel.org/bpf/[email protected]
When you say "fix", does it actually fix a failing test case or is it more of a cleanup to align liburandom_read build with urandom_read? From glancing at the code, we only check build id for urandom_read.
Cheers,
Daniel
Quoted 13 lines · Daniel Borkmann
Hi Artem,
Quoted 9 lines · KP Singh
Quoted 7 lines · Artem Savkov
lld produces "fast" style build-ids by default, which is inconsistent with ld's "sha1" style. Explicitly specify build-id style to be "sha1" when linking liburandom_read.so the same way it is already done for
urandom_read.Signed-off-by Artem Savkov <[email protected]>
Quoted 8 lines
Quoted 4 lines
Acked-by KP Singh <[email protected]>This was done in
https://lore.kernel.org/bpf/[email protected]When you say "fix", does it actually fix a failing test case or is it more of a cleanup to align
liburandom_readbuild withurandom_read? From glancing at the code, we only check build id forurandom_read.
I reworded the subject to "selftests/bpf: Use consistent build-id type for liburandom_read.so" and pushed. Thanks!
Quoted 3 lines
Cheers,
Daniel
Daniel Borkmann
maintainerQuoted 19 lines · Andrii Nakryiko
Quoted 18 lines · Daniel Borkmann
Hi Artem,
Quoted 13 lines · KP Singh
Quoted 7 lines · Artem Savkov
lld produces "fast" style build-ids by default, which is inconsistent with ld's "sha1" style. Explicitly specify build-id style to be "sha1" when linking liburandom_read.so the same way it is already done for
urandom_read.Signed-off-by Artem Savkov <[email protected]>Acked-by KP Singh <[email protected]>This was done in
https://lore.kernel.org/bpf/[email protected]
Quoted 6 lines
Quoted 3 lines
When you say "fix", does it actually fix a failing test case or is it more of a cleanup to align
liburandom_readbuild withurandom_read? From glancing at the code, we only check build id forurandom_read.I reworded the subject to "selftests/bpf: Use consistent build-id type for liburandom_read.so" and pushed. Thanks!
Ack, sgtm!
Quoted 14 lines · Andrii Nakryiko
Quoted 13 lines · Daniel Borkmann
Hi Artem,
Quoted 9 lines · KP Singh
Quoted 7 lines · Artem Savkov
lld produces "fast" style build-ids by default, which is inconsistent with ld's "sha1" style. Explicitly specify build-id style to be "sha1" when linking liburandom_read.so the same way it is already done for
urandom_read.Signed-off-by Artem Savkov <[email protected]>
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
Acked-by KP Singh <[email protected]>This was done in
https://lore.kernel.org/bpf/[email protected]When you say "fix", does it actually fix a failing test case or is it more of a cleanup to align
liburandom_readbuild withurandom_read? From glancing at the code, we only check build id forurandom_read.
I called it a "fix" because it broke expectations of external tools, but the reworded version sounds much better.
Quoted 2 lines
I reworded the subject to "selftests/bpf: Use consistent build-id type for liburandom_read.so" and pushed. Thanks!
Thank you, Andrii.
Signature · 1 line
Artem
This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:
Hello:
This patch was applied to bpf/bpf-next.git (master) by Andrii Nakryiko <[email protected]>:
Quoted 8 lines · On Fri, 4 Nov 2022 10:40:16 +0100 you wrote:
lld produces "fast" style build-ids by default, which is inconsistent with ld's "sha1" style. Explicitly specify build-id style to be "sha1" when linking liburandom_read.so the same way it is already done for
urandom_read.Signed-off-by Artem Savkov <[email protected]>[...]
Here is the summary with links:
- [bpf-next] selftests/bpf: fix build-id for liburandom_read.so
https://git.kernel.org/bpf/bpf-next/c/61fc5e66f755
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html