]>
git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - sim/d10v/interp.c
5 #include "remote-sim.h"
9 #define IMEM_SIZE 18 /* D10V instruction memory size is 18 bits */
10 #define DMEM_SIZE 16 /* Data memory is 64K (but only 32K internal RAM) */
11 #define UMEM_SIZE 17 /* each unified memory region is 17 bits */
13 enum _leftright
{ LEFT_FIRST
, RIGHT_FIRST
};
16 static SIM_OPEN_KIND sim_kind
;
17 static bfd_vma start_address
;
19 host_callback
*d10v_callback
;
20 unsigned long ins_type_counters
[ (int)INS_MAX
];
24 static int init_text_p
= 0;
25 /* non-zero if we opened prog_bfd */
26 static int prog_bfd_was_opened_p
;
32 static long hash
PARAMS ((long insn
, int format
));
33 static struct hash_entry
*lookup_hash
PARAMS ((uint32 ins
, int size
));
34 static void get_operands
PARAMS ((struct simops
*s
, uint32 ins
));
35 static void do_long
PARAMS ((uint32 ins
));
36 static void do_2_short
PARAMS ((uint16 ins1
, uint16 ins2
, enum _leftright leftright
));
37 static void do_parallel
PARAMS ((uint16 ins1
, uint16 ins2
));
38 static char *add_commas
PARAMS ((char *buf
, int sizeof_buf
, unsigned long value
));
39 extern void sim_size
PARAMS ((int power
));
40 static void init_system
PARAMS ((void));
41 extern void sim_set_profile
PARAMS ((int n
));
42 extern void sim_set_profile_size
PARAMS ((int n
));
45 #if defined(__GNUC__) && defined(__OPTIMIZE__)
46 #define INLINE __inline__
55 struct hash_entry
*next
;
62 struct hash_entry hash_table
[MAX_HASH
+1];
69 if (format
& LONG_OPCODE
)
70 return ((insn
& 0x3F000000) >> 24);
72 return((insn
& 0x7E00) >> 9);
75 INLINE
static struct hash_entry
*
76 lookup_hash (ins
, size
)
83 h
= &hash_table
[(ins
& 0x3F000000) >> 24];
85 h
= &hash_table
[(ins
& 0x7E00) >> 9];
87 while ((ins
& h
->mask
) != h
->opcode
|| h
->size
!= size
)
91 (*d10v_callback
->printf_filtered
) (d10v_callback
, "ERROR looking up hash for %x at PC %x\n",ins
, PC
);
100 get_operands (struct simops
*s
, uint32 ins
)
102 int i
, shift
, bits
, flags
;
104 for (i
=0; i
< s
->numops
; i
++)
106 shift
= s
->operands
[3*i
];
107 bits
= s
->operands
[3*i
+1];
108 flags
= s
->operands
[3*i
+2];
109 mask
= 0x7FFFFFFF >> (31 - bits
);
110 OP
[i
] = (ins
>> shift
) & mask
;
121 for (s
= prog_bfd
->sections
; s
; s
= s
->next
)
122 if (strcmp (bfd_get_section_name (prog_bfd
, s
), ".text") == 0)
125 text_start
= bfd_get_section_vma (prog_bfd
, s
);
126 text_end
= text_start
+ bfd_section_size (prog_bfd
, s
);
131 return (PC
<< 2) + text_start
;
138 struct hash_entry
*h
;
140 if ((d10v_debug
& DEBUG_INSTRUCTION
) != 0)
141 (*d10v_callback
->printf_filtered
) (d10v_callback
, "do_long 0x%x\n", ins
);
143 h
= lookup_hash (ins
, 1);
144 get_operands (h
->ops
, ins
);
145 State
.ins_type
= INS_LONG
;
146 ins_type_counters
[ (int)State
.ins_type
]++;
151 do_2_short (ins1
, ins2
, leftright
)
153 enum _leftright leftright
;
155 struct hash_entry
*h
;
157 enum _ins_type first
, second
;
160 if ((d10v_debug
& DEBUG_INSTRUCTION
) != 0)
161 (*d10v_callback
->printf_filtered
) (d10v_callback
, "do_2_short 0x%x (%s) -> 0x%x\n",
162 ins1
, (leftright
) ? "left" : "right", ins2
);
165 if (leftright
== LEFT_FIRST
)
169 ins_type_counters
[ (int)INS_LEFTRIGHT
]++;
175 ins_type_counters
[ (int)INS_RIGHTLEFT
]++;
178 h
= lookup_hash (ins1
, 0);
179 get_operands (h
->ops
, ins1
);
180 State
.ins_type
= first
;
181 ins_type_counters
[ (int)State
.ins_type
]++;
184 /* If the PC has changed (ie, a jump), don't do the second instruction */
185 if (orig_pc
== PC
&& !State
.exception
)
187 h
= lookup_hash (ins2
, 0);
188 get_operands (h
->ops
, ins2
);
189 State
.ins_type
= second
;
190 ins_type_counters
[ (int)State
.ins_type
]++;
191 ins_type_counters
[ (int)INS_CYCLES
]++;
194 else if (orig_pc
!= PC
&& !State
.exception
)
195 ins_type_counters
[ (int)INS_COND_JUMP
]++;
199 do_parallel (ins1
, ins2
)
202 struct hash_entry
*h1
, *h2
;
204 if ((d10v_debug
& DEBUG_INSTRUCTION
) != 0)
205 (*d10v_callback
->printf_filtered
) (d10v_callback
, "do_parallel 0x%x || 0x%x\n", ins1
, ins2
);
207 ins_type_counters
[ (int)INS_PARALLEL
]++;
208 h1
= lookup_hash (ins1
, 0);
209 h2
= lookup_hash (ins2
, 0);
211 if (h1
->ops
->exec_type
== PARONLY
)
213 get_operands (h1
->ops
, ins1
);
214 State
.ins_type
= INS_LEFT_COND_TEST
;
215 ins_type_counters
[ (int)State
.ins_type
]++;
219 ins_type_counters
[ (int)INS_COND_TRUE
]++;
220 get_operands (h2
->ops
, ins2
);
221 State
.ins_type
= INS_RIGHT_COND_EXE
;
222 ins_type_counters
[ (int)State
.ins_type
]++;
226 ins_type_counters
[ (int)INS_COND_FALSE
]++;
228 else if (h2
->ops
->exec_type
== PARONLY
)
230 get_operands (h2
->ops
, ins2
);
231 State
.ins_type
= INS_RIGHT_COND_TEST
;
232 ins_type_counters
[ (int)State
.ins_type
]++;
236 ins_type_counters
[ (int)INS_COND_TRUE
]++;
237 get_operands (h1
->ops
, ins1
);
238 State
.ins_type
= INS_LEFT_COND_EXE
;
239 ins_type_counters
[ (int)State
.ins_type
]++;
243 ins_type_counters
[ (int)INS_COND_FALSE
]++;
247 get_operands (h1
->ops
, ins1
);
248 State
.ins_type
= INS_LEFT_PARALLEL
;
249 ins_type_counters
[ (int)State
.ins_type
]++;
251 if (!State
.exception
)
253 get_operands (h2
->ops
, ins2
);
254 State
.ins_type
= INS_RIGHT_PARALLEL
;
255 ins_type_counters
[ (int)State
.ins_type
]++;
262 add_commas(buf
, sizeof_buf
, value
)
268 char *endbuf
= buf
+ sizeof_buf
- 1;
278 *--endbuf
= (value
% 10) + '0';
279 } while ((value
/= 10) != 0);
297 free (State
.umem
[i
]);
298 State
.umem
[i
] = NULL
;
305 State
.imem
= (uint8
*)calloc(1,1<<IMEM_SIZE
);
306 State
.dmem
= (uint8
*)calloc(1,1<<DMEM_SIZE
);
308 State
.umem
[i
] = NULL
;
309 State
.umem
[0] = (uint8
*)calloc(1,1<<UMEM_SIZE
);
310 State
.umem
[1] = (uint8
*)calloc(1,1<<UMEM_SIZE
);
311 State
.umem
[2] = (uint8
*)calloc(1,1<<UMEM_SIZE
);
312 State
.umem
[127] = (uint8
*)calloc(1,1<<UMEM_SIZE
);
313 if (!State
.imem
|| !State
.dmem
|| !State
.umem
[0] || !State
.umem
[1] || !State
.umem
[2] || !State
.umem
[127] )
315 (*d10v_callback
->printf_filtered
) (d10v_callback
, "Memory allocation failed.\n");
324 if ((d10v_debug
& DEBUG_MEMSIZE
) != 0)
327 (*d10v_callback
->printf_filtered
) (d10v_callback
,
328 "Allocated %s bytes instruction memory and\n",
329 add_commas (buffer
, sizeof (buffer
), (1UL<<IMEM_SIZE
)));
331 (*d10v_callback
->printf_filtered
) (d10v_callback
, " %s bytes data memory.\n",
332 add_commas (buffer
, sizeof (buffer
), (1UL<<IMEM_SIZE
)));
345 xfer_mem (addr
, buffer
, size
, write
)
347 unsigned char *buffer
;
355 if ((d10v_debug
& DEBUG_INSTRUCTION
) != 0)
358 (*d10v_callback
->printf_filtered
) (d10v_callback
, "sim_write %d bytes to 0x%x\n", size
, addr
);
360 (*d10v_callback
->printf_filtered
) (d10v_callback
, "sim_read %d bytes from 0x%x\n", size
, addr
);
364 /* to access data, we use the following mapping */
365 /* 0x01000000 - 0x0103ffff : instruction memory */
366 /* 0x02000000 - 0x0200ffff : data memory */
367 /* 0x00000000 - 0x00ffffff : unified memory */
369 if ( (addr
& 0x03000000) == 0)
373 segment
= addr
>> UMEM_SIZE
;
375 if (!State
.umem
[segment
])
378 (*d10v_callback
->printf_filtered
) (d10v_callback
,"Allocating %s bytes unified memory to region %d\n",
379 add_commas (buffer
, sizeof (buffer
), (1UL<<IMEM_SIZE
)), segment
);
381 State
.umem
[segment
] = (uint8
*)calloc(1,1<<UMEM_SIZE
);
383 if (!State
.umem
[segment
])
385 (*d10v_callback
->printf_filtered
) (d10v_callback
, "Memory allocation failed.\n");
388 /* FIXME: need to check size and read/write multiple segments if necessary */
390 memcpy (State
.umem
[segment
]+addr
, buffer
, size
) ;
392 memcpy (buffer
, State
.umem
[segment
]+addr
, size
);
394 else if ( (addr
& 0x03000000) == 0x02000000)
398 if (size
> (1<<(DMEM_SIZE
-1)))
400 (*d10v_callback
->printf_filtered
) (d10v_callback
, "ERROR: data section is only %d bytes.\n",1<<(DMEM_SIZE
-1));
404 memcpy (State
.dmem
+addr
, buffer
, size
);
406 memcpy (buffer
, State
.dmem
+addr
, size
);
408 else if ( (addr
& 0x03000000) == 0x01000000)
410 /* INSTRUCTION MEMORY */
412 if (size
> (1<<IMEM_SIZE
))
414 (*d10v_callback
->printf_filtered
) (d10v_callback
, "ERROR: inst section is only %d bytes.\n",1<<IMEM_SIZE
);
418 memcpy (State
.imem
+addr
, buffer
, size
);
420 memcpy (buffer
, State
.imem
+addr
, size
);
424 (*d10v_callback
->printf_filtered
) (d10v_callback
, "ERROR: address 0x%x is not in valid range\n",addr
);
425 (*d10v_callback
->printf_filtered
) (d10v_callback
, "Instruction addresses start at 0x01000000\n");
426 (*d10v_callback
->printf_filtered
) (d10v_callback
, "Data addresses start at 0x02000000\n");
427 (*d10v_callback
->printf_filtered
) (d10v_callback
, "Unified addresses start at 0x00000000\n");
438 sim_write (sd
, addr
, buffer
, size
)
441 unsigned char *buffer
;
444 return xfer_mem( addr
, buffer
, size
, 1);
448 sim_read (sd
, addr
, buffer
, size
)
451 unsigned char *buffer
;
454 return xfer_mem( addr
, buffer
, size
, 0);
459 sim_open (kind
, argv
)
464 struct hash_entry
*h
;
465 static int init_p
= 0;
471 for (p
= argv
+ 1; *p
; ++p
)
473 /* Ignore endian specification. */
474 if (strcmp (*p
, "-E") == 0)
478 if (strcmp (*p
, "-t") == 0)
482 (*d10v_callback
->printf_filtered
) (d10v_callback
, "ERROR: unsupported option(s): %s\n",*p
);
485 /* put all the opcodes in the hash table */
488 for (s
= Simops
; s
->func
; s
++)
490 h
= &hash_table
[hash(s
->opcode
,s
->format
)];
492 /* go to the last entry in the chain */
498 h
->next
= (struct hash_entry
*) calloc(1,sizeof(struct hash_entry
));
500 perror ("malloc failure");
506 h
->opcode
= s
->opcode
;
507 h
->size
= s
->is_long
;
511 /* Fudge our descriptor. */
517 sim_close (sd
, quitting
)
521 if (prog_bfd
!= NULL
&& prog_bfd_was_opened_p
)
522 bfd_close (prog_bfd
);
529 (*d10v_callback
->printf_filtered
) (d10v_callback
, "sim_set_profile %d\n",n
);
533 sim_set_profile_size (n
)
536 (*d10v_callback
->printf_filtered
) (d10v_callback
, "sim_set_profile_size %d\n",n
);
550 if ( (addr
& 0xfff0) != 0xff00)
552 (*d10v_callback
->printf_filtered
) (d10v_callback
, "Data address 0x%lx is in I/O space, pc = 0x%lx.\n",
553 (long)addr
, (long)decode_pc ());
554 State
.exception
= SIGBUS
;
557 return State
.dmem
+ addr
;
564 /* instruction memory */
565 return (DMAP
& 0xf) * 0x4000 + State
.imem
;
568 /* this is ugly because we allocate unified memory in 128K segments and */
569 /* dmap addresses 16k segments */
570 seg
= (DMAP
& 0x3ff) >> 3;
571 if (State
.umem
[seg
] == NULL
)
573 (*d10v_callback
->printf_filtered
) (d10v_callback
, "ERROR: unified memory region %d unmapped, pc = 0x%lx\n",
574 seg
, (long)decode_pc ());
575 State
.exception
= SIGBUS
;
577 return State
.umem
[seg
] + (DMAP
& 7) * 0x4000;
580 return State
.dmem
+ addr
;
587 uint32 pc
= ((uint32
)PC
) << 2;
596 return State
.imem
+ pc
;
598 if (State
.umem
[imap
& 0xff] == NULL
)
600 (*d10v_callback
->printf_filtered
) (d10v_callback
, "ERROR: unified memory region %d unmapped, pc = 0x%lx\n",
601 imap
& 0xff, (long)PC
);
602 State
.exception
= SIGBUS
;
606 return State
.umem
[imap
& 0xff] + pc
;
610 static int stop_simulator
;
628 /* Run (or resume) the program. */
630 sim_resume (sd
, step
, siggnal
)
637 /* (*d10v_callback->printf_filtered) (d10v_callback, "sim_resume (%d,%d) PC=0x%x\n",step,siggnal,PC); */
639 prev
= signal(SIGINT
, sim_ctrl_c
);
640 stop_simulator
= step
;
644 inst
= get_longword( pc_addr() );
645 State
.pc_changed
= 0;
646 ins_type_counters
[ (int)INS_CYCLES
]++;
647 switch (inst
& 0xC0000000)
650 /* long instruction */
651 do_long (inst
& 0x3FFFFFFF);
655 do_2_short ( inst
& 0x7FFF, (inst
& 0x3FFF8000) >> 15, 0);
659 do_2_short ((inst
& 0x3FFF8000) >> 15, inst
& 0x7FFF, 1);
662 do_parallel ((inst
& 0x3FFF8000) >> 15, inst
& 0x7FFF);
666 if (State
.RP
&& PC
== RPT_E
)
674 else if (!State
.pc_changed
)
677 while ( !State
.exception
&& !stop_simulator
);
679 if (step
&& !State
.exception
)
680 State
.exception
= SIGTRAP
;
682 signal(SIGINT
, prev
);
692 sim_resume (sd
, 0, 0);
697 sim_info (sd
, verbose
)
706 unsigned long left
= ins_type_counters
[ (int)INS_LEFT
] + ins_type_counters
[ (int)INS_LEFT_COND_EXE
];
707 unsigned long left_nops
= ins_type_counters
[ (int)INS_LEFT_NOPS
];
708 unsigned long left_parallel
= ins_type_counters
[ (int)INS_LEFT_PARALLEL
];
709 unsigned long left_cond
= ins_type_counters
[ (int)INS_LEFT_COND_TEST
];
710 unsigned long left_total
= left
+ left_parallel
+ left_cond
+ left_nops
;
712 unsigned long right
= ins_type_counters
[ (int)INS_RIGHT
] + ins_type_counters
[ (int)INS_RIGHT_COND_EXE
];
713 unsigned long right_nops
= ins_type_counters
[ (int)INS_RIGHT_NOPS
];
714 unsigned long right_parallel
= ins_type_counters
[ (int)INS_RIGHT_PARALLEL
];
715 unsigned long right_cond
= ins_type_counters
[ (int)INS_RIGHT_COND_TEST
];
716 unsigned long right_total
= right
+ right_parallel
+ right_cond
+ right_nops
;
718 unsigned long unknown
= ins_type_counters
[ (int)INS_UNKNOWN
];
719 unsigned long ins_long
= ins_type_counters
[ (int)INS_LONG
];
720 unsigned long parallel
= ins_type_counters
[ (int)INS_PARALLEL
];
721 unsigned long leftright
= ins_type_counters
[ (int)INS_LEFTRIGHT
];
722 unsigned long rightleft
= ins_type_counters
[ (int)INS_RIGHTLEFT
];
723 unsigned long cond_true
= ins_type_counters
[ (int)INS_COND_TRUE
];
724 unsigned long cond_false
= ins_type_counters
[ (int)INS_COND_FALSE
];
725 unsigned long cond_jump
= ins_type_counters
[ (int)INS_COND_JUMP
];
726 unsigned long cycles
= ins_type_counters
[ (int)INS_CYCLES
];
727 unsigned long total
= (unknown
+ left_total
+ right_total
+ ins_long
);
729 int size
= strlen (add_commas (buf1
, sizeof (buf1
), total
));
730 int parallel_size
= strlen (add_commas (buf1
, sizeof (buf1
),
731 (left_parallel
> right_parallel
) ? left_parallel
: right_parallel
));
732 int cond_size
= strlen (add_commas (buf1
, sizeof (buf1
), (left_cond
> right_cond
) ? left_cond
: right_cond
));
733 int nop_size
= strlen (add_commas (buf1
, sizeof (buf1
), (left_nops
> right_nops
) ? left_nops
: right_nops
));
734 int normal_size
= strlen (add_commas (buf1
, sizeof (buf1
), (left
> right
) ? left
: right
));
736 (*d10v_callback
->printf_filtered
) (d10v_callback
,
737 "executed %*s left instruction(s), %*s normal, %*s parallel, %*s EXExxx, %*s nops\n",
738 size
, add_commas (buf1
, sizeof (buf1
), left_total
),
739 normal_size
, add_commas (buf2
, sizeof (buf2
), left
),
740 parallel_size
, add_commas (buf3
, sizeof (buf3
), left_parallel
),
741 cond_size
, add_commas (buf4
, sizeof (buf4
), left_cond
),
742 nop_size
, add_commas (buf5
, sizeof (buf5
), left_nops
));
744 (*d10v_callback
->printf_filtered
) (d10v_callback
,
745 "executed %*s right instruction(s), %*s normal, %*s parallel, %*s EXExxx, %*s nops\n",
746 size
, add_commas (buf1
, sizeof (buf1
), right_total
),
747 normal_size
, add_commas (buf2
, sizeof (buf2
), right
),
748 parallel_size
, add_commas (buf3
, sizeof (buf3
), right_parallel
),
749 cond_size
, add_commas (buf4
, sizeof (buf4
), right_cond
),
750 nop_size
, add_commas (buf5
, sizeof (buf5
), right_nops
));
753 (*d10v_callback
->printf_filtered
) (d10v_callback
,
754 "executed %*s long instruction(s)\n",
755 size
, add_commas (buf1
, sizeof (buf1
), ins_long
));
758 (*d10v_callback
->printf_filtered
) (d10v_callback
,
759 "executed %*s parallel instruction(s)\n",
760 size
, add_commas (buf1
, sizeof (buf1
), parallel
));
763 (*d10v_callback
->printf_filtered
) (d10v_callback
,
764 "executed %*s instruction(s) encoded L->R\n",
765 size
, add_commas (buf1
, sizeof (buf1
), leftright
));
768 (*d10v_callback
->printf_filtered
) (d10v_callback
,
769 "executed %*s instruction(s) encoded R->L\n",
770 size
, add_commas (buf1
, sizeof (buf1
), rightleft
));
773 (*d10v_callback
->printf_filtered
) (d10v_callback
,
774 "executed %*s unknown instruction(s)\n",
775 size
, add_commas (buf1
, sizeof (buf1
), unknown
));
778 (*d10v_callback
->printf_filtered
) (d10v_callback
,
779 "executed %*s instruction(s) due to EXExxx condition being true\n",
780 size
, add_commas (buf1
, sizeof (buf1
), cond_true
));
783 (*d10v_callback
->printf_filtered
) (d10v_callback
,
784 "skipped %*s instruction(s) due to EXExxx condition being false\n",
785 size
, add_commas (buf1
, sizeof (buf1
), cond_false
));
788 (*d10v_callback
->printf_filtered
) (d10v_callback
,
789 "skipped %*s instruction(s) due to conditional branch succeeding\n",
790 size
, add_commas (buf1
, sizeof (buf1
), cond_jump
));
792 (*d10v_callback
->printf_filtered
) (d10v_callback
,
793 "executed %*s cycle(s)\n",
794 size
, add_commas (buf1
, sizeof (buf1
), cycles
));
796 (*d10v_callback
->printf_filtered
) (d10v_callback
,
797 "executed %*s total instructions\n",
798 size
, add_commas (buf1
, sizeof (buf1
), total
));
802 sim_create_inferior (sd
, argv
, env
)
809 (*d10v_callback
->printf_filtered
) (d10v_callback
, "sim_create_inferior: PC=0x%x\n", start_address
);
812 /* reset all state information */
813 memset (&State
.regs
, 0, (int)&State
.imem
- (int)&State
.regs
[0]);
816 PC
= start_address
>> 2;
818 /* cpu resets imap0 to 0 and imap1 to 0x7f, but D10V-EVA board */
819 /* resets imap0 and imap1 to 0x1000. */
837 sim_set_callbacks (sd
, p
)
845 sim_stop_reason (sd
, reason
, sigrc
)
847 enum sim_stop
*reason
;
850 /* (*d10v_callback->printf_filtered) (d10v_callback, "sim_stop_reason: PC=0x%x\n",PC<<2); */
852 switch (State
.exception
)
854 case SIG_D10V_STOP
: /* stop instruction */
855 *reason
= sim_exited
;
859 case SIG_D10V_EXIT
: /* exit trap */
860 *reason
= sim_exited
;
861 *sigrc
= State
.regs
[2];
864 default: /* some signal */
865 *reason
= sim_stopped
;
866 *sigrc
= State
.exception
;
872 sim_fetch_register (sd
, rn
, memory
)
875 unsigned char *memory
;
881 WRITE_64 (memory
, State
.a
[rn
-35]);
883 WRITE_16 (memory
, IMAP0
);
885 WRITE_16 (memory
, IMAP1
);
887 WRITE_16 (memory
, DMAP
);
889 WRITE_16 (memory
, State
.regs
[rn
]);
893 sim_store_register (sd
, rn
, memory
)
896 unsigned char *memory
;
902 State
.a
[rn
-35] = READ_64 (memory
) & MASK40
;
904 SET_DMAP( READ_16(memory
) );
906 SET_IMAP1( READ_16(memory
) );
908 SET_IMAP0( READ_16(memory
) );
910 State
.regs
[rn
]= READ_16 (memory
);
915 sim_do_command (sd
, cmd
)
919 (*d10v_callback
->printf_filtered
) (d10v_callback
, "sim_do_command: %s\n",cmd
);
923 sim_load (sd
, prog
, abfd
, from_tty
)
929 extern bfd
*sim_load_file (); /* ??? Don't know where this should live. */
931 if (prog_bfd
!= NULL
&& prog_bfd_was_opened_p
)
932 bfd_close (prog_bfd
);
933 prog_bfd
= sim_load_file (sd
, myname
, d10v_callback
, prog
, abfd
,
934 sim_kind
== SIM_OPEN_DEBUG
);
935 if (prog_bfd
== NULL
)
937 start_address
= bfd_get_start_address (prog_bfd
);
938 prog_bfd_was_opened_p
= abfd
== NULL
;