This is the mail archive of the binutils@sourceware.cygnus.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: revised patch for m32r gas relocations


Nick Clifton writes:
 > Hi Don,
 > 
 > : Mon Mar 27 15:28:00 2000  Donald Lindsay  <dlindsay@cygnus.com>
 > : 
 > : 	* elf32-m32r.c (m32r_elf_generic_reloc): new function. All
 > : 	HOWTO references to bfd_elf_generic_reloc, that have
 > : 	partial_inplace == true, now use the new function. The function
 > : 	is based on the recently rewritten m32r_elf_lo16_reloc(), and
 > : 	extends its fixes to the R_M32R_{16,24,32} relocs.
 > 
 > Approved.

Not so fast.

+   insn = bfd_get_32 (input_bfd, data + reloc_entry->address);
+   insn = (insn & (0xffffffff - reloc_entry->howto->src_mask))
+ 	| (relocation & reloc_entry->howto->dst_mask);
    bfd_put_32 (input_bfd, insn, data + reloc_entry->address);

This is used for 16 bit relocs too, right?
Shouldn't this be doing something akin to bfd_install_relocation
and only accessing as many bytes as necessary.

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