* coff-arm.c (coff_arm_relocate_section): Don't emit
authorCatherine Moore <clm@redhat.com>
Tue, 25 May 1999 11:56:16 +0000 (11:56 +0000)
committerCatherine Moore <clm@redhat.com>
Tue, 25 May 1999 11:56:16 +0000 (11:56 +0000)
        base file entries for pc-relative values.

bfd/ChangeLog
bfd/coff-arm.c

index 9dcc8851f2f8e22b1b1e27868bdbce6c6b37d6b8..48cea47bb75ab3cbd7a3b8d016300c7d7e6adfbc 100644 (file)
@@ -1,3 +1,8 @@
+1999-05-25  Catherine Moore  <clm@cygnus.com>
+        * coff-arm.c (coff_arm_relocate_section): Don't emit
+        base file entries for pc-relative values.
+        
 1999-05-25  DJ Delorie  <dj@cygnus.com>
 
        * peicode.h (coff_swap_sym_in): When we create the actual section
index 594e757c91326baf8d5466a6a4eacbac0082fedb..52baa85671320b659e062d681a54d343ec65c5f2 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for ARM COFF files.
-   Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+   Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 98, 1999
    Free Software Foundation, Inc.
    Written by Cygnus Support.
 
@@ -934,8 +934,6 @@ static const insn32 a2t1_ldr_insn       = 0xe59fc000;
 static const insn32 a2t2_bx_r12_insn    = 0xe12fff1c;
 static const insn32 a2t3_func_addr_insn = 0x00000001;
 
-#define A2T3_OFFSET 8
-
 /*
    Thumb->ARM:                         Thumb->(non-interworking aware) ARM
 
@@ -959,8 +957,6 @@ static const insn16 t2a1_bx_pc_insn = 0x4778;
 static const insn16 t2a2_noop_insn  = 0x46c0;
 static const insn32 t2a3_b_insn     = 0xea000000;
 
-#define T2A3_OFFSET 8
-
 static const insn16 t2a1_push_insn  = 0xb540;
 static const insn16 t2a2_ldr_insn   = 0x4e03;
 static const insn16 t2a3_mov_insn   = 0x46fe;
@@ -1212,7 +1208,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
 
                           if (info->base_file)
                             arm_emit_base_file_entry (info, output_bfd, s, 
-                                                            my_offset + A2T3_OFFSET);
+                                                            my_offset + 8);
 
                        }
 
@@ -1319,6 +1315,9 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
                              /* Store the address of the function in the last word of the stub.  */
                              bfd_put_32 (output_bfd, h_val,
                                          s->contents + my_offset + 16);
+
+                              if (info->base_file)
+                                arm_emit_base_file_entry (info, output_bfd, s, my_offset + 16);
                            }
                          else
                            {
@@ -1341,9 +1340,6 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
                                          t2a3_b_insn | ((ret_offset >> 2) & 0x00FFFFFF),
                                          s->contents + my_offset + 4);
 
-                              if (info->base_file)
-                                arm_emit_base_file_entry (info, output_bfd, s,
-                                                           my_offset + T2A3_OFFSET);
                            }
                        }
 
@@ -1366,9 +1362,6 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
                                  contents + rel->r_vaddr
                                  - input_section->vma);
                      
-                      if (info->base_file)
-                        arm_emit_base_file_entry (info, output_bfd, input_section, rel->r_vaddr);
-
                      done = 1;
                     }
                 }