Questiongit clone --recurse-submodules https://github.com/libbpf/bpftool.git export PATH=/usr/local/mips/mipsel-buildroot-linux-gnu/bin:$PATH CC=mipsel-linux-gcc make [...] CC json_writer.o CC link.o In file included from link.c:6: /usr/local/mips/mipsel-buildroot-linux-gnu/mipsel-buildroot-linux-gnu/sysroot/usr/include/linux/netfilter.h:67:17: error: field ‘in’ has incomplete type 67 | struct in_addr in; | ^~ /usr/local/mips/mipsel-buildroot-linux-gnu/mipsel-buildroot-linux-gnu/sysroot/usr/include/linux/netfilter.h:68:18: error: field ‘in6’ has incomplete type 68 | struct in6_addr in6; | ^~~ link.c:579:3: error: ‘NFPROTO_NETDEV’ undeclared here (not in a function); did you mean ‘NFPROTO_DECNET’? 579 | [NFPROTO_NETDEV] = "netdev", | ^~~~~~~~~~~~~~ | NFPROTO_DECNET link.c:579:3: error: array index in initializer not of integer type link.
QuestionI use the following Makefile to install user scripts and prebuilt executables:
cat Makefile LOCAL_PATH := $(shell pwd) APPS := $(shell find $(LOCAL_PATH) -type f -executable -printf "%f\n") romfs: for app in $(APPS) ; do \ $(ROMFSINST) -d $$app /bin/$$app; \ done The binary files copied to romfs correctly, but the script got executed after copied.
Answerconfig/romfsinst
${STRIPTOOL} ${dstfile} 2>/dev/null ${STRIPTOOL} -R .comment -R .note ${dstfile} 2>/dev/nullromfsinst was used for install elf binaries, so the strip action makes sense, but here the variable ${STRIPTOOL} was not assigned, thus results script got executed.
Questionmipsel-linux-gcc -fsanitize=leak -g leak.c -o memleak /usr/local/mips/mipsel-buildroot-linux-gnu/bin/../lib/gcc/mipsel-buildroot-linux-gnu/10.3.0/../../../../mipsel-buildroot-linux-gnu/bin/ld: cannot find liblsan_preinit.o: No such file or directory /usr/local/mips/mipsel-buildroot-linux-gnu/bin/../lib/gcc/mipsel-buildroot-linux-gnu/10.3.0/../../../../mipsel-buildroot-linux-gnu/bin/ld: cannot find -llsan collect2: error: ld returned 1 exit status AnswerNo support for mips32 or other 32bit machine, here is the information I got:
https://github.com/google/sanitizers/issues/294
Am I understanding right that this is 32-bit ARM? If so, have you tested this patch on any sufficiently big app?
The problem with 32-bit architectures is that a random 32-bit number is very likely to be treated as a pointer to some existing allocation.