Patch to fix frv handling of mergeable sections

Richard Sandiford rsandifo@redhat.com
Wed Aug 27 09:29:00 GMT 2003


The frv port was mishandling relocs against mergeable sections.
Since the same code exists in most other ports, I thought this
patch qualified as obvious.  Installed after testing on frv-elf.

Richard


	* elf32-frv.c (elf32_frv_relocate_section): Use
	_bfd_elf_rela_local_sym.

Index: bfd/elf32-frv.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-frv.c,v
retrieving revision 1.6
diff -u -d -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.6 elf32-frv.c
--- bfd/elf32-frv.c	25 Jun 2003 06:40:24 -0000	1.6
+++ bfd/elf32-frv.c	27 Aug 2003 08:59:43 -0000
@@ -724,9 +724,7 @@ elf32_frv_relocate_section (output_bfd, 
 	{
 	  sym = local_syms + r_symndx;
 	  sec = local_sections [r_symndx];
-	  relocation = (sec->output_section->vma
-			+ sec->output_offset
-			+ sym->st_value);
+	  relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
 
 	  name = bfd_elf_string_from_elf_section
 	    (input_bfd, symtab_hdr->sh_link, sym->st_name);



More information about the Binutils mailing list