Hi, the mknod() syscall is broken in my ulibc if I compile with -O0. I discoverd this with uclibc 0.9.29 (not sure if 0.9.28 was also affected) and gcc 4.1, and it still applies to the current git of buildroot using uclibc 0.9.30 and gcc 4.3.2. The i386 architecture was used.
For the test, I use the following command. The busybox is the one from buildroot, and is therefore statically linked against the uclibc from buildroot. $ strace ./bin/busybox mknod foobar c 10 63 With -O0, strace looks like this: mknod("foobar", S_IFCHR|037746400666, makedev(2314, 104767)) = -1 2314 translates to 0x90a , to this is the 10, prefixed with some trash. 104767 translates to 1993f, so this is the 63, prefixed with some trash. I think the same applies to the mode. This is the raw strace output, gathered with strace -e raw=mknod: mknod(0xffa31a31, 0xffa321b6, 0x19990a3f) = -1 With DODEBUG disabled in the uclibc config, and therefore compiled with -O2, strace looks like this: mknod("foobar", S_IFCHR|0666, makedev(10, 63)) = -1 So it looks like there is some mangling of the mknod() arguments in uclibc, which breaks if compiled with -O0. Regards, Tino -- Tino Keitel Software Engineer Innominate Security Technologies AG /protecting industrial networks/ Tel: +49.30.6392-3309 Fax: +49.30.6392-3307 Albert-Einstein-Str. 14 D-12489 Berlin http://www.innominate.com/ Register Court: AG Charlottenburg, HRB 81603 Management Board: Dirk Seewald Chairman of the Supervisory Board: Volker Bibelhausen INNOMINATE IS MOVING. FROM 17.12.2008 OUR BUSINESS CONTACT DATA WILL BE CHANGED: Rudower Chaussee 13, 12489Berlin / Germany tel: +49.30.921028-0 (head office) tel: +49.30.921028-206 (personal extension) fax: +49.30. 921028-020 _______________________________________________ uClibc mailing list uClibc@uclibc.org http://busybox.net/cgi-bin/mailman/listinfo/uclibc