Re: compiling PPC kernels using binutils-22.214.171.124.22-5
On Tue, 21 Mar 2000, Christopher C. Chimelis wrote:
> I'll figure this out. This whole security patch thing is overblown, IMO,
> but I can see how it could pose a problem in a very specialised case. I'm
> going to figure out why it's no longer doing temp files, since it really
> should (all that was commented out by the patch was the initial unlinking
> of the file, which shouldn't apply to linux anyway). It's very odd
> I may go ahead and update binutils to 126.96.36.199.31, though, since it fixes
> an ugly Alpha problem and may actually cover this as well (I just
> downloaded and am checking it out now). I'll supply you with the source,
> if you'd like, so you can check to see if this still happens. If you can,
> please file a bug against binutils with a severity of important or
> critical relating to the current behaviour. I may be able to override the
> old bug if this is the result...
Ok. I've got a patch that will work. Turns out that objcopy was never
comparing the input filename to the output filename to see if they're the
same (which would mean that a temp file would be needed). The unlink that
I took out closed the input file prior to writing to the output file, so
that's why it worked before. Once I took that out, it tried to write to
an open file, which fails and truncates the file.
I'm sending the patch upstream as well since this was recently brought up
on the binutils list as well. I'll also write back shortly with a source
package for you to test...
FYI, I've tested this bug and confirmed that it now creates a temp file
properly, so please test the rest of the package as it will be a new
Thanks a bunch!