This is the mail archive of the
mailing list for the glibc project.
Re: mmap stdio breaks GNU ld
'od -j' is also broken by mmap stdio.
I found this by code inspection: I happened to be looking at GNU
textutils when reading this thread, so I quickly scanned it for mmap
stdio problems. The 'od -j' problem is the only breakage that I found
in textutils. I'll send a patch to the textutils maintainer.
The obvious fix for 'od' is to use fseeko instead of lseek. This is a
tiny bit tricky since fseeko isn't available on older implementations.
I vaguely recall that the current 'od' code avoids fseeko because of
the portability hassle.
I wouldn't be surprised if other GNU programs also are broken by mmap
stdio, but I don't think it'll be a major catastrophe.