Messages in this thread |  | | | Date | Mon, 14 Apr 2003 16:03:32 +0100 (BST) | | From | Tigran Aivazian <> | | Subject | olarge -- force O_LARGEFILE on app binaries. |
| |
Hi,
Some time ago I was annoyed to see that ghostscript didn't support large files (>2G) and, although the fix to gs(1) was trivial it was very undesirable to have to recompile it (for lots of reasons like mismatch between the source set and fonts, libraries etc). So the only (efficient) solution in my case would have been to "modify" the behaviour of the gs binary without rebuilding it. One way is to use LD_PRELOAD feature but I found it easier to just knock up a simple kernel module olarge.o to do the job.
In case someone else encountered the same problem and needed the solution (but didn't know how to write it), here it is for download:
http://www.moses.uklinux.net/patches/olarge.tar.gz
Regards Tigran
PS. (for those familiar with sys_call_table[] handling in modules this should be obvious but just in case --- don't try to unload the module while "using it", i.e. running an app you have thus modified.)
PPS. Don't bother explaining to me that this is "not a nice thing to do inside a module", I am well aware of it. This is just a quick fix to a specific problem and I share with others who may have hit it as well, that's all. As the GPL license says "no assumed useability for any purpose...." :) Enjoy. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |