Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests/bpf: Use consistent build-id type 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.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: KP Singh <kpsingh@kernel.org>
Link: https://lore.kernel.org/bpf/20221104094016.102049-1-asavkov@redhat.com

authored by

Artem Savkov and committed by
Andrii Nakryiko
61fc5e66 b3c09fdc

+4 -3
+4 -3
tools/testing/selftests/bpf/Makefile
··· 182 182 $(OUTPUT)/liburandom_read.so: urandom_read_lib1.c urandom_read_lib2.c 183 183 $(call msg,LIB,,$@) 184 184 $(Q)$(CLANG) $(filter-out -static,$(CFLAGS) $(LDFLAGS)) $^ $(LDLIBS) \ 185 - -fuse-ld=$(LLD) -Wl,-znoseparate-code -fPIC -shared -o $@ 185 + -fuse-ld=$(LLD) -Wl,-znoseparate-code -Wl,--build-id=sha1 \ 186 + -fPIC -shared -o $@ 186 187 187 188 $(OUTPUT)/urandom_read: urandom_read.c urandom_read_aux.c $(OUTPUT)/liburandom_read.so 188 189 $(call msg,BINARY,,$@) 189 190 $(Q)$(CLANG) $(filter-out -static,$(CFLAGS) $(LDFLAGS)) $(filter %.c,$^) \ 190 191 liburandom_read.so $(LDLIBS) \ 191 - -fuse-ld=$(LLD) -Wl,-znoseparate-code \ 192 - -Wl,-rpath=. -Wl,--build-id=sha1 -o $@ 192 + -fuse-ld=$(LLD) -Wl,-znoseparate-code -Wl,--build-id=sha1 \ 193 + -Wl,-rpath=. -o $@ 193 194 194 195 $(OUTPUT)/sign-file: ../../../../scripts/sign-file.c 195 196 $(call msg,SIGN-FILE,,$@)