This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: ia64 unwind sorting fix
- To: Richard Henderson <rth at redhat dot com>
- Subject: Re: ia64 unwind sorting fix
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Wed, 8 Nov 2000 19:47:03 +1100 (EST)
- cc: binutils at sources dot redhat dot com
On Tue, 7 Nov 2000, Richard Henderson wrote:
> It turns out that re-reading the section contents from
> the file doesn't always work, because the output file
> is opened write-only. So I've tweeked section.c to be
> able to cache the relocated contents.
Hmm, I hit exactly the same problem a couple of weeks ago with hppa elf
unwind section. Cured with the following (which isn't merged back to
sourceware yet). Any reason why we shouldn't just open the output bfd
with "w+"? Then you can simply read back output section contents.
diff -wurp binutils-current/bfd/cache.c parisc/binutils/bfd/cache.c
--- binutils-current/bfd/cache.c Fri May 26 19:44:40 2000
+++ parisc/binutils/bfd/cache.c Tue Oct 24 23:05:03 2000
@@ -312,7 +312,7 @@ bfd_open_file (abfd)
if (stat (abfd->filename, &s) == 0 && s.st_size != 0)
unlink (abfd->filename);
#endif
- abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_WB);
+ abfd->iostream = (PTR) fopen (abfd->filename, FOPEN_WUB);
abfd->opened_once = true;
}
break;
Alan Modra
--
Linuxcare. Support for the Revolution.