Add octets_per_byte FIXMEs

Alan Modra amodra@bigpond.net.au
Tue Aug 11 02:23:00 GMT 2009


Applied.

	* elflink.c: Add FIXMEs for some places that require octets_per_byte
	adjustments.
	* elf-eh-frame.c: Likewise.
	* merge.c: Likewise.

Index: bfd/elf-eh-frame.c
===================================================================
RCS file: /cvs/src/src/bfd/elf-eh-frame.c,v
retrieving revision 1.75
diff -u -p -r1.75 elf-eh-frame.c
--- bfd/elf-eh-frame.c	10 Jul 2009 15:26:56 -0000	1.75
+++ bfd/elf-eh-frame.c	11 Aug 2009 01:44:06 -0000
@@ -537,18 +537,21 @@ _bfd_elf_parse_eh_frame (bfd *abfd, stru
   local_cies = bfd_zmalloc (num_cies * sizeof (*local_cies));
   REQUIRE (local_cies);
 
+  /* FIXME: octets_per_byte.  */
 #define ENSURE_NO_RELOCS(buf)				\
   REQUIRE (!(cookie->rel < cookie->relend		\
 	     && (cookie->rel->r_offset			\
 		 < (bfd_size_type) ((buf) - ehbuf))	\
 	     && cookie->rel->r_info != 0))
 
+  /* FIXME: octets_per_byte.  */
 #define SKIP_RELOCS(buf)				\
   while (cookie->rel < cookie->relend			\
 	 && (cookie->rel->r_offset			\
 	     < (bfd_size_type) ((buf) - ehbuf)))	\
     cookie->rel++
 
+  /* FIXME: octets_per_byte.  */
 #define GET_RELOC(buf)					\
   ((cookie->rel < cookie->relend			\
     && (cookie->rel->r_offset				\
@@ -911,6 +914,7 @@ mark_entry (struct bfd_link_info *info, 
 	    struct eh_cie_fde *ent, elf_gc_mark_hook_fn gc_mark_hook,
 	    struct elf_reloc_cookie *cookie)
 {
+  /* FIXME: octets_per_byte.  */
   for (cookie->rel = cookie->rels + ent->reloc_index;
        cookie->rel < cookie->relend
 	 && cookie->rel->r_offset < ent->offset + ent->size;
@@ -1099,6 +1103,7 @@ _bfd_elf_discard_section_eh_frame
     else if (!ent->cie)
       {
 	cookie->rel = cookie->rels + ent->reloc_index;
+	/* FIXME: octets_per_byte.  */
 	BFD_ASSERT (cookie->rel < cookie->relend
 		    && cookie->rel->r_offset == ent->offset + 8);
 	if (!(*reloc_symbol_deleted_p) (ent->offset + 8, cookie))
@@ -1323,6 +1328,7 @@ _bfd_elf_write_section_eh_frame (bfd *ab
   struct eh_cie_fde *ent;
 
   if (sec->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
+    /* FIXME: octets_per_byte.  */
     return bfd_set_section_contents (abfd, sec->output_section, contents,
 				     sec->output_offset, sec->size);
 
@@ -1611,6 +1617,7 @@ _bfd_elf_write_section_eh_frame (bfd *ab
   if ((sec->size % ptr_size) != 0)
     abort ();
 
+  /* FIXME: octets_per_byte.  */
   return bfd_set_section_contents (abfd, sec->output_section,
 				   contents, (file_ptr) sec->output_offset,
 				   sec->size);
@@ -1722,6 +1729,7 @@ _bfd_elf_write_section_eh_frame_hdr (bfd
 	}
     }
 
+  /* FIXME: octets_per_byte.  */
   retval = bfd_set_section_contents (abfd, sec->output_section,
 				     contents, (file_ptr) sec->output_offset,
 				     sec->size);
Index: bfd/elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.351
diff -u -p -r1.351 elflink.c
--- bfd/elflink.c	10 Aug 2009 06:14:04 -0000	1.351
+++ bfd/elflink.c	11 Aug 2009 01:44:13 -0000
@@ -7762,6 +7762,7 @@ bfd_elf_perform_complex_relocation (bfd 
   else
     shift = (8 * wordsz) - (start + len);
 
+  /* FIXME: octets_per_byte.  */
   x = get_value (wordsz, chunksz, input_bfd, contents + rel->r_offset);
 
 #ifdef DEBUG
@@ -7793,6 +7794,7 @@ bfd_elf_perform_complex_relocation (bfd 
 	  relocation, (mask << shift),
 	  ((relocation & mask) << shift), x);
 #endif
+  /* FIXME: octets_per_byte.  */
   put_value (wordsz, chunksz, input_bfd, x, contents + rel->r_offset);
   return r;
 }
@@ -8132,6 +8134,7 @@ elf_link_sort_relocs (bfd *abfd, struct 
 	  }
 	erel = o->contents;
 	erelend = o->contents + o->size;
+	/* FIXME: octets_per_byte.  */
 	p = sort + o->output_offset / ext_size * sort_elt;
 
 	while (erel < erelend)
@@ -8176,6 +8179,7 @@ elf_link_sort_relocs (bfd *abfd, struct 
 
 	erel = o->contents;
 	erelend = o->contents + o->size;
+	/* FIXME: octets_per_byte.  */
 	p = sort + o->output_offset / ext_size * sort_elt;
 	while (erel < erelend)
 	  {
@@ -9697,6 +9701,7 @@ elf_link_input_bfd (struct elf_final_lin
 	  break;
 	default:
 	  {
+	    /* FIXME: octets_per_byte.  */
 	    if (! (o->flags & SEC_EXCLUDE)
 		&& ! (o->output_section->flags & SEC_NEVER_LOAD)
 		&& ! bfd_set_section_contents (output_bfd, o->output_section,
@@ -10020,6 +10025,7 @@ elf_fixup_link_order (bfd *abfd, asectio
       offset &= ~(bfd_vma) 0 << s->alignment_power;
       s->output_offset = offset;
       sections[n]->offset = offset;
+      /* FIXME: octets_per_byte.  */
       offset += sections[n]->size;
     }
 
@@ -10999,6 +11005,7 @@ bfd_elf_final_link (bfd *abfd, struct bf
 	       != SHT_STRTAB)
 	      || strcmp (bfd_get_section_name (abfd, o), ".dynstr") != 0)
 	    {
+	      /* FIXME: octets_per_byte.  */
 	      if (! bfd_set_section_contents (abfd, o->output_section,
 					      o->contents,
 					      (file_ptr) o->output_offset,
Index: bfd/merge.c
===================================================================
RCS file: /cvs/src/src/bfd/merge.c,v
retrieving revision 1.35
diff -u -p -r1.35 merge.c
--- bfd/merge.c	5 Nov 2007 02:13:46 -0000	1.35
+++ bfd/merge.c	11 Aug 2009 01:44:13 -0000
@@ -792,6 +792,7 @@ _bfd_write_merged_section (bfd *output_b
   if (secinfo->first_str == NULL)
     return TRUE;
 
+  /* FIXME: octets_per_byte.  */
   pos = sec->output_section->filepos + sec->output_offset;
   if (bfd_seek (output_bfd, pos, SEEK_SET) != 0)
     return FALSE;

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list