* libbfd-in.h, bfd-in.h: Eliminate all PROTO calls, replace with
[deliverable/binutils-gdb.git] / bfd / bout.c
index 0e3c0ecf7a0444c0dd7fe8540c7856875f2079e1..8ab69c23cb38e9bc44c9024612fc9dfd4a13a3b8 100644 (file)
@@ -238,21 +238,20 @@ b_out_write_object_contents (abfd)
 
   bout_swap_exec_header_out (abfd, exec_hdr (abfd), &swapped_hdr);
 
-  bfd_seek (abfd, 0L, SEEK_SET);
+  bfd_seek (abfd, (file_ptr) 0, SEEK_SET);
   bfd_write ((PTR) &swapped_hdr, 1, EXEC_BYTES_SIZE, abfd);
 
   /* Now write out reloc info, followed by syms and strings */
   if (bfd_get_symcount (abfd) != 0) 
     {
-      bfd_seek (abfd,
-               (long)(N_SYMOFF(*exec_hdr(abfd))), SEEK_SET);
+      bfd_seek (abfd, (file_ptr)(N_SYMOFF(*exec_hdr(abfd))), SEEK_SET);
 
       aout_32_write_syms (abfd);
 
-      bfd_seek (abfd,  (long)(N_TROFF(*exec_hdr(abfd))), SEEK_SET);
+      bfd_seek (abfd, (file_ptr)(N_TROFF(*exec_hdr(abfd))), SEEK_SET);
 
       if (!b_out_squirt_out_relocs (abfd, obj_textsec (abfd))) return false;
-      bfd_seek (abfd, (long)(N_DROFF(*exec_hdr(abfd))), SEEK_SET);
+      bfd_seek (abfd, (file_ptr)(N_DROFF(*exec_hdr(abfd))), SEEK_SET);
 
       if (!b_out_squirt_out_relocs (abfd, obj_datasec (abfd))) return false;
     }
@@ -459,7 +458,7 @@ b_out_slurp_reloc_table (abfd, asect, symbols)
   return false;
 
  doit:
-  bfd_seek (abfd, (long)(asect->rel_filepos),  SEEK_SET);
+  bfd_seek (abfd, (file_ptr)(asect->rel_filepos),  SEEK_SET);
   count = reloc_size / sizeof (struct relocation_info);
 
   relocs = (struct relocation_info *) bfd_xmalloc (reloc_size);
@@ -889,6 +888,7 @@ DEFUN(get_value,(reloc, seclet),
 {
   bfd_vma value;
   asymbol *symbol = *(reloc->sym_ptr_ptr);
+
   /* A symbol holds a pointer to a section, and an offset from the
      base of the section.  To relocate, we find where the section will
      live in the output and add that in */
@@ -905,8 +905,7 @@ DEFUN(get_value,(reloc, seclet),
      symbol->section->output_offset +
       symbol->section->output_section->vma;
   }
-  
-  
+
   /* Add the value contained in the relocation */
   value += (short)((reloc->addend) & 0xffff);
   
@@ -963,7 +962,6 @@ DEFUN(abs32code,(input_section, symbols, r, shrink),
 
   if (-1<<23 < (long)gap && (long)gap < 1<<23 )
   { 
-
     /* Change the reloc type from 32bitcode possible 24, to 24bit
        possible 32 */
 
@@ -974,8 +972,6 @@ DEFUN(abs32code,(input_section, symbols, r, shrink),
     /* This will be four bytes smaller in the long run */
     shrink += 4 ;
     perform_slip(symbols, 4, input_section, r->address-shrink +4);
-
-         
   }      
   return shrink;      
 }
@@ -987,20 +983,17 @@ DEFUN(aligncode,(input_section, symbols, r, shrink),
       arelent *r AND
       unsigned int shrink) 
 {
-  bfd_vma value = get_value(r,0);
-
   bfd_vma dot = input_section->output_section->vma +  input_section->output_offset + r->address;       
   bfd_vma gap;
   bfd_vma old_end;
   bfd_vma new_end;
-    int shrink_delta;
-int size = r->howto->size;
+  int shrink_delta;
+  int size = r->howto->size;
+
   /* Reduce the size of the alignment so that it's still aligned but
      smaller  - the current size is already the same size as or bigger
      than the alignment required.  */
 
-
-
   /* calculate the first byte following the padding before we optimize */
   old_end = ((dot + size ) & ~size) + size+1;
   /* work out where the new end will be - remember that we're smaller
@@ -1014,7 +1007,6 @@ int size = r->howto->size;
 
   if (shrink_delta)
   { 
-
     /* Change the reloc so that it knows how far to align to */
     r->howto = howto_done_align_table + (r->howto - howto_align_table);
 
@@ -1023,9 +1015,6 @@ int size = r->howto->size;
     r->addend = old_end ;
 
     /* This will be N bytes smaller in the long run, adjust all the symbols */
-
-    
-
     perform_slip(symbols, shrink_delta, input_section, r->address - shrink );
     shrink += shrink_delta;
   }      
This page took 0.033841 seconds and 4 git commands to generate.