Messages in this thread Patch in this message | | | From | (david parsons) | Subject | [PATCH] make 2.3.14 sulk quietly about unaligned a.out objects | Date | 20 Aug 1999 01:00:27 -0700 |
| |
Someplace in either 2.2 or 2.3, binfmt_aout started printk'ing like mad about unaligned a.out libraries and binaries. For most people, this isn't a problem because it would take an act of congress to make them use a.out, but it's a BIG problem for Mastodon; this patch makes binfmt_aout simply sulk quietly about alignments.
____ david parsons \bi/ Hopefully 2.3.15 isn't too different from 2.3.14 \/
diff -Naur linux-2.3.14-orig/fs/binfmt_aout.c linux-2.3.14/fs/binfmt_aout.c --- linux-2.3.14-orig/fs/binfmt_aout.c Tue Aug 3 10:18:39 1999 +++ linux-2.3.14/fs/binfmt_aout.c Thu Aug 19 00:30:24 1999 @@ -355,21 +355,25 @@ flush_icache_range((unsigned long) 0, (unsigned long) ex.a_text+ex.a_data); } else { +#if COMPLAIN_ABOUT_ALIGNMENT if ((ex.a_text & 0xfff || ex.a_data & 0xfff) && (N_MAGIC(ex) != NMAGIC)) printk(KERN_NOTICE "executable not page aligned\n"); +#endif fd = open_dentry(bprm->dentry, O_RDONLY); if (fd < 0) return fd; file = fget(fd); +#if COMPLAIN_ABOUT_ALIGNMENT if ((fd_offset & ~PAGE_MASK) != 0) { printk(KERN_WARNING "fd_offset is not page aligned. Please convert program: %s\n", file->f_dentry->d_name.name ); } +#endif if (!file->f_op || !file->f_op->mmap || ((fd_offset & ~PAGE_MASK) != 0)) { fput(file); @@ -499,10 +503,12 @@ start_addr = ex.a_entry & 0xfffff000; if ((N_TXTOFF(ex) & ~PAGE_MASK) != 0) { +#if COMPLAIN_ABOUT_ALIGNMENT printk(KERN_WARNING "N_TXTOFF is not page aligned. Please convert library: %s\n", file->f_dentry->d_name.name ); +#endif do_mmap(NULL, start_addr & PAGE_MASK, ex.a_text + ex.a_data + ex.a_bss, PROT_READ | PROT_WRITE | PROT_EXEC, - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |