Hi, I downloaded the u-boot repository from this website, http://www.denx.de/wiki/U-Boot. I am using an ARM11 board, which means that the compiler supports ELDK 4.2 (with EABI supported). So, the -mabi switch is set to aapcs-linux -mno-thumb-interwork. I am trying to get EXT2 support in u-boot, when I noticed a variable length declaration of a character array. In the ext2fs_iterate_dir function in fs/ext2/ext2fs.c file, I see the following lines of code
char filename[dirent.namelen + 1]; [The code as is gives me problems, sine I notice that the Link Register in the stack gets overwritten, and so when it comes out of the ext2fs_read_file function, it does not get to the next line of code, but gets into some random behaviour and the Program counter points to a random location in memory. Now, if I replace the above code with malloc, or create a fixed length array like (char filename[2048]), then this code works fine. The same code works on an omap platform, when the -mabi switch is set to apcs-gnu and -mno-thumb-interwork.] ext2fs_node_t fdiro; int type = FILETYPE_UNKNOWN; status = ext2fs_read_file (diro, fpos + sizeof (struct ext2_dirent), dirent.namelen, filename); Please let me know of any pointers to this issue. I have also filed an issue with the uboot mailing list, and then I was directed to get in touch with the gcc mailing list. [http://lists.denx.de/pipermail/u-boot/2010-March/068339.html] Thanks, Praveen