Skip to contentSkip to conversation

perf jvmti: Link in tools/lib/ctype.o

PATCH In review Jiri Olsa 2 participants 2 messages Oct 14, 2019 perf events

lore
Share & tools
lore

Jiri Olsa

author reviewer
#0 lore raw

PATCH 1/1 perf jvmti: Link in tools/lib/ctype.o

The libperf-jvmti.so links already with tools/lib/string.o to use strlcpy. However the string.o depends on ctype.o so we need to link it in as well.

Fixes 79743bc927f6 ("perf jvmti: Link against tools/lib/string.o to have weak strlcpy()")
---
 tools/perf/jvmti/Build | 5 +++++
 1 file changed, 5 insertions(+)
tools/perf/jvmti/Build +5 -0
index 1e148bbdf820..7de7f90bf3fb 100644
@@ -3,6 +3,7 @@ jvmti-y += jvmti_agent.o
 
 # For strlcpy
 jvmti-y += libstring.o
+jvmti-y += libctype.o
 
 CFLAGS_jvmti         = -fPIC -DPIC -I$(JDIR)/include -I$(JDIR)/include/linux
 CFLAGS_REMOVE_jvmti  = -Wmissing-declarations
@@ -15,3 +16,7 @@ CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PE
 $(OUTPUT)jvmti/libstring.o: ../lib/string.c FORCE
 	$(call rule_mkdir)
 	$(call if_changed_dep,cc_o_c)
+
+$(OUTPUT)jvmti/libctype.o: ../lib/ctype.c FORCE
+	$(call rule_mkdir)
+	$(call if_changed_dep,cc_o_c)
Signature · 1 line
2.21.0
#1 lore raw

Em Mon, Oct 14, 2019 at 05:48:56PM +0200, Jiri Olsa escreveu:

Quoted 7 lines

The libperf-jvmti.so links already with tools/lib/string.o to use strlcpy. However the string.o depends on ctype.o so we need to link it in as well.

Fixes 79743bc927f6 ("perf jvmti: Link against tools/lib/string.o to have weak strlcpy()")

I applied one already for this, contributed by Thomas.

Thanks,

- Arnaldo

Quoted 26 lines
---
 tools/perf/jvmti/Build | 5 +++++
 1 file changed, 5 insertions(+)
tools/perf/jvmti/Build +5 -0
index 1e148bbdf820..7de7f90bf3fb 100644
@@ -3,6 +3,7 @@ jvmti-y += jvmti_agent.o
 
 # For strlcpy
 jvmti-y += libstring.o
+jvmti-y += libctype.o
 
 CFLAGS_jvmti         = -fPIC -DPIC -I$(JDIR)/include -I$(JDIR)/include/linux
 CFLAGS_REMOVE_jvmti  = -Wmissing-declarations
@@ -15,3 +16,7 @@ CFLAGS_libstring.o += -Wno-unused-parameter -DETC_PERFCONFIG="BUILD_STR($(ETC_PE
 $(OUTPUT)jvmti/libstring.o: ../lib/string.c FORCE
 	$(call rule_mkdir)
 	$(call if_changed_dep,cc_o_c)
+
+$(OUTPUT)jvmti/libctype.o: ../lib/ctype.c FORCE
+	$(call rule_mkdir)
+	$(call if_changed_dep,cc_o_c)
Signature · 1 line
2.21.0
Signature · 1 line
- Arnaldo