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]

Re: YAH8LP (Yet another H8 Ld Problem :)


Hi Joel,
  My proposed patch for fixing the relocatable link is wrong.  Just as
well it wasn't applied.  coff_canonicalize_reloc gets called a second time
for non-relocatable links too  :-(

So, revert that patch from your source and apply this one instead, which
Does The Right Thing (I think)

bfd/ChangeLog
	* coff-h8300.c (special): Adjust reloc address.

Alan Modra
-- 
Linuxcare.  Support for the Revolution.


Index: coff-h8300.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-h8300.c,v
retrieving revision 1.6
diff -u -p -r1.6 coff-h8300.c
--- coff-h8300.c	2000/06/27 01:31:59	1.6
+++ coff-h8300.c	2000/11/04 12:34:07
@@ -198,7 +198,7 @@ h8300_coff_link_hash_table_create (abfd)
    the code in reloc.c assumes that we can manipulate the targets of
    the pcrel branches.  This isn't so, since the H8/300 can do relaxing, 
    which means that the gap after the instruction may not be enough to
-   contain the offset required for the branch, so we have to use the only
+   contain the offset required for the branch, so we have to use only
    the addend until the final link.  */
 
 static bfd_reloc_status_type
@@ -215,6 +215,8 @@ special (abfd, reloc_entry, symbol, data
   if (output_bfd == (bfd *) NULL)
     return bfd_reloc_continue;
 
+  /* Adjust the reloc address to that in the output section.  */
+  reloc_entry->address += input_section->output_offset;
   return bfd_reloc_ok;
 }
 


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