# # raidtools-1.00 uses _llseek via syscall5() which is not x86-pic # compatible We can compile all of raidtools with -fno-pie and every # binary will be an ET_EXEC file, or we can -fno-pie the single # problematic file raid_io.c and then everything will be built as an # ET_DYN file but will contain text relocations. # # On hardened glibc systems it may be desirable to have a ET_DYN over # ET_EXEC files even if they have text relocations. # # On hardened uclibc systems we just disallow text relocations, and this # patch wont work. # # Either way the check can be downgraded from filter-flags -fPIC to # -fPIE for raidtools. # # What's needed is good way to work around syscall5() eatting up the ebx # register on x86. ideas? options that don't depend on kernel/header # changes? # # The prototype looks like this in raid_io.c # static int _llseek (unsigned int, unsigned long, # unsigned long, long long *, unsigned int); # # static _syscall5( int, _llseek, unsigned int, fd, unsigned long, offset_high, # unsigned long, offset_low, long long *, result, # unsigned int, origin) # --- Makefile.in.orig 2005-02-03 10:14:15.000000000 -0500 +++ Makefile.in 2005-02-03 10:15:50.000000000 -0500 @@ -63,6 +63,9 @@ install: dummy for N in all install_bin install_doc install_dev; do make $$N; done +raid_io.o: raid_io.c $(HEADERS) Makefile + $(CC) $(CFLAGS) -fno-pie -c -o $@ $< + %.o: %.c $(HEADERS) Makefile $(CC) $(CFLAGS) -c -o $@ $<