This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] MIPS bfd: abi 64 ld -r


Alexandre Oliva wrote:
> On Sep  4, 2002, Alan Modra <amodra@bigpond.net.au> wrote:
[snip]
> Unfortunately, it's not that simple.  Assembling that same object file
> with GNU as will produce RELA relocations that the IRIX linker can't
> cope with.  It says:
> 
> ld32: FATAL   11 : Object file format error (t.o): invalid section offset

This is caused by an empty relocation section at the very end of the
object file. The appended patch fixes this (and the native linker
later runs in an internal error, apparently when handling .rela.data).


Thiemo


2002-09-18  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>

	/bfd/ChangeLog
	* elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
	empty relocation sections.


diff -BurpNX /bigdisk/src/gcc-exclude source-orig/bfd/elfxx-mips.c source/bfd/elfxx-mips.c
--- source-orig/bfd/elfxx-mips.c	Wed Sep  4 23:01:40 2002
+++ source/bfd/elfxx-mips.c	Tue Sep 17 15:11:46 2002
@@ -3644,7 +3644,7 @@ _bfd_mips_elf_fake_sections (abfd, hdr, 
      sh_offset == object size, and ld doesn't allow that.  While the check
      is arguably bogus for empty or SHT_NOBITS sections, it can easily be
      avoided by not emitting those useless sections in the first place.  */
-  if ((IRIX_COMPAT (abfd) != ict_irix5 && (IRIX_COMPAT (abfd) != ict_irix6))
+  if (! SGI_COMPAT (abfd) && ! NEWABI_P(abfd)
       && (sec->flags & SEC_RELOC) != 0)
     {
       struct bfd_elf_section_data *esd;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]