[lkml]   [2003]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectolarge -- force O_LARGEFILE on app binaries.

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

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:


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
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:34    [W:0.042 / U:3.940 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site