getpwnam_error.c:
* The memory hole can be fixed with two different approaches
1) Change /etc/nsswitch.conf: passwd: compat to passwd: files
2) LD_PRELOAD=/lib/libnss_compat.so.2 valgrind ./getpwnam_error
GLIBC loads libnss_compat on the fly and unloads it.
Thanks to telexicon for reporting this...
committer: Markus Bröker <mbroeker@largo.homelinux.org>
CC = gcc
CFLAGS =-Wall -O2 -fPIC
LDFLAGS = -Llib -ltest
OBJECTS = func1.o func2.o
.c.o:
$(CC) -c $(CFLAGS) -shared $<
all: lib/libtest.so.1.0.1 prog
prog: main.c
$(CC) $(CFLAGS) $(LDFLAGS) $< -o $@
lib/libtest.so.1.0.1: $(OBJECTS)
$(CC) -shared -Wl,-soname,lib/libtest.so.1 $(OBJECTS) -o $@
@echo "Look carefully at this :)"
ln -s libtest.so.1.0.1 lib/libtest.so.1
ln -s libtest.so.1.0.1 lib/libtest.so
.PHONY: clean
clean:
rm -f lib/libtest.*
rm -f *.o prog