1 /* DLX specific support for 32-bit ELF
2 Copyright 2002, 2003, 2004 Free Software Foundation, Inc.
4 This file is part of BFD, the Binary File Descriptor library.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
26 int set_dlx_skip_hi16_flag
PARAMS ((int));
28 static bfd_boolean elf32_dlx_check_relocs
29 PARAMS ((bfd
*, struct bfd_link_info
*, asection
*,
30 const Elf_Internal_Rela
*));
31 static void elf32_dlx_info_to_howto
32 PARAMS ((bfd
*, arelent
*, Elf_Internal_Rela
*));
33 static void elf32_dlx_info_to_howto_rel
34 PARAMS ((bfd
*, arelent
*, Elf_Internal_Rela
*));
35 static bfd_reloc_status_type elf32_dlx_relocate16
36 PARAMS ((bfd
*, arelent
*, asymbol
*, PTR
, asection
*, bfd
*, char **));
37 static bfd_reloc_status_type elf32_dlx_relocate26
38 PARAMS ((bfd
*, arelent
*, asymbol
*, PTR
, asection
*, bfd
*, char **));
39 static reloc_howto_type
*elf32_dlx_reloc_type_lookup
40 PARAMS ((bfd
*, bfd_reloc_code_real_type
));
41 static bfd_reloc_status_type _bfd_dlx_elf_hi16_reloc
42 PARAMS ((bfd
*, arelent
*, asymbol
*, PTR
, asection
*, bfd
*, char **));
43 static reloc_howto_type
* dlx_rtype_to_howto
44 PARAMS ((unsigned int));
49 #define bfd_elf32_bfd_reloc_type_lookup elf32_dlx_reloc_type_lookup
50 #define elf_info_to_howto elf32_dlx_info_to_howto
51 #define elf_info_to_howto_rel elf32_dlx_info_to_howto_rel
52 #define elf_backend_check_relocs elf32_dlx_check_relocs
54 static reloc_howto_type dlx_elf_howto_table
[]=
57 HOWTO (R_DLX_NONE
, /* type */
59 0, /* size (0 = byte, 1 = short, 2 = long) */
61 FALSE
, /* pc_relative */
63 complain_overflow_dont
,/* complain_on_overflow */
64 bfd_elf_generic_reloc
, /* special_function */
65 "R_DLX_NONE", /* name */
66 FALSE
, /* partial_inplace */
69 FALSE
), /* pcrel_offset */
71 /* 8 bit relocation. */
72 HOWTO (R_DLX_RELOC_8
, /* type */
74 0, /* size (0 = byte, 1 = short, 2 = long) */
76 FALSE
, /* pc_relative */
78 complain_overflow_dont
,/* complain_on_overflow */
79 bfd_elf_generic_reloc
, /* special_function */
80 "R_DLX_RELOC_8", /* name */
81 TRUE
, /* partial_inplace */
84 FALSE
), /* pcrel_offset */
86 /* 16 bit relocation. */
87 HOWTO (R_DLX_RELOC_16
, /* type */
89 1, /* size (0 = byte, 1 = short, 2 = long) */
91 FALSE
, /* pc_relative */
93 complain_overflow_dont
,/* complain_on_overflow */
94 bfd_elf_generic_reloc
, /* special_function */
95 "R_DLX_RELOC_16", /* name */
96 TRUE
, /* partial_inplace */
97 0xffff, /* src_mask */
98 0xffff, /* dst_mask */
99 FALSE
), /* pcrel_offset */
102 /* 26 bit jump address. */
103 HOWTO (R_DLX_RELOC_26
, /* type */
105 2, /* size (0 = byte, 1 = short, 2 = long) */
107 FALSE
, /* pc_relative */
109 complain_overflow_dont
,/* complain_on_overflow */
110 /* This needs complex overflow detection, because the upper four
111 bits must match the PC + 4. */
112 bfd_elf_generic_reloc
, /* special_function */
113 "R_DLX_RELOC_26", /* name */
114 TRUE
, /* partial_inplace */
115 0x3ffffff, /* src_mask */
116 0x3ffffff, /* dst_mask */
117 FALSE
), /* pcrel_offset */
120 /* 32 bit relocation. */
121 HOWTO (R_DLX_RELOC_32
, /* type */
123 2, /* size (0 = byte, 1 = short, 2 = long) */
125 FALSE
, /* pc_relative */
127 complain_overflow_dont
,/* complain_on_overflow */
128 bfd_elf_generic_reloc
, /* special_function */
129 "R_DLX_RELOC_32", /* name */
130 TRUE
, /* partial_inplace */
131 0xffffffff, /* src_mask */
132 0xffffffff, /* dst_mask */
133 FALSE
), /* pcrel_offset */
135 /* GNU extension to record C++ vtable hierarchy */
136 HOWTO (R_DLX_GNU_VTINHERIT
, /* type */
138 2, /* size (0 = byte, 1 = short, 2 = long) */
140 FALSE
, /* pc_relative */
142 complain_overflow_dont
,/* complain_on_overflow */
143 NULL
, /* special_function */
144 "R_DLX_GNU_VTINHERIT", /* name */
145 FALSE
, /* partial_inplace */
148 FALSE
), /* pcrel_offset */
150 /* GNU extension to record C++ vtable member usage */
151 HOWTO (R_DLX_GNU_VTENTRY
, /* type */
153 2, /* size (0 = byte, 1 = short, 2 = long) */
155 FALSE
, /* pc_relative */
157 complain_overflow_dont
,/* complain_on_overflow */
158 _bfd_elf_rel_vtable_reloc_fn
,/* special_function */
159 "R_DLX_GNU_VTENTRY", /* name */
160 FALSE
, /* partial_inplace */
163 FALSE
) /* pcrel_offset */
166 /* 16 bit offset for pc-relative branches. */
167 static reloc_howto_type elf_dlx_gnu_rel16_s2
=
168 HOWTO (R_DLX_RELOC_16_PCREL
, /* type */
170 1, /* size (0 = byte, 1 = short, 2 = long) */
172 TRUE
, /* pc_relative */
174 complain_overflow_signed
, /* complain_on_overflow */
175 elf32_dlx_relocate16
, /* special_function */
176 "R_DLX_RELOC_16_PCREL",/* name */
177 TRUE
, /* partial_inplace */
178 0xffff, /* src_mask */
179 0xffff, /* dst_mask */
180 TRUE
); /* pcrel_offset */
182 /* 26 bit offset for pc-relative branches. */
183 static reloc_howto_type elf_dlx_gnu_rel26_s2
=
184 HOWTO (R_DLX_RELOC_26_PCREL
, /* type */
186 2, /* size (0 = byte, 1 = short, 2 = long) */
188 TRUE
, /* pc_relative */
190 complain_overflow_dont
,/* complain_on_overflow */
191 elf32_dlx_relocate26
, /* special_function */
192 "R_DLX_RELOC_26_PCREL",/* name */
193 TRUE
, /* partial_inplace */
194 0xffff, /* src_mask */
195 0xffff, /* dst_mask */
196 TRUE
); /* pcrel_offset */
198 /* High 16 bits of symbol value. */
199 static reloc_howto_type elf_dlx_reloc_16_hi
=
200 HOWTO (R_DLX_RELOC_16_HI
, /* type */
202 2, /* size (0 = byte, 1 = short, 2 = long) */
204 FALSE
, /* pc_relative */
206 complain_overflow_dont
, /* complain_on_overflow */
207 _bfd_dlx_elf_hi16_reloc
,/* special_function */
208 "R_DLX_RELOC_16_HI", /* name */
209 TRUE
, /* partial_inplace */
210 0xFFFF, /* src_mask */
211 0xffff, /* dst_mask */
212 FALSE
); /* pcrel_offset */
214 /* Low 16 bits of symbol value. */
215 static reloc_howto_type elf_dlx_reloc_16_lo
=
216 HOWTO (R_DLX_RELOC_16_LO
, /* type */
218 1, /* size (0 = byte, 1 = short, 2 = long) */
220 FALSE
, /* pc_relative */
222 complain_overflow_dont
,/* complain_on_overflow */
223 bfd_elf_generic_reloc
, /* special_function */
224 "R_DLX_RELOC_16_LO", /* name */
225 TRUE
, /* partial_inplace */
226 0xffff, /* src_mask */
227 0xffff, /* dst_mask */
228 FALSE
); /* pcrel_offset */
231 /* The gas default behavior is not to preform the %hi modifier so that the
232 GNU assembler can have the lower 16 bits offset placed in the insn, BUT
233 we do like the gas to indicate it is %hi reloc type so when we in the link
234 loader phase we can have the corrected hi16 vale replace the buggous lo16
235 value that was placed there by gas. */
237 static int skip_dlx_elf_hi16_reloc
= 0;
240 set_dlx_skip_hi16_flag (flag
)
243 skip_dlx_elf_hi16_reloc
= flag
;
247 static bfd_reloc_status_type
248 _bfd_dlx_elf_hi16_reloc (abfd
, reloc_entry
, symbol
, data
,
249 input_section
, output_bfd
, error_message
)
251 arelent
*reloc_entry
;
254 asection
*input_section
;
256 char **error_message
;
258 bfd_reloc_status_type ret
;
262 /* If the skip flag is set then we simply do the generic relocating, this
263 is more of a hack for dlx gas/gld, so we do not need to do the %hi/%lo
264 fixup like mips gld did. */
266 printf ("DEBUG: skip_dlx_elf_hi16_reloc = 0x%08x\n", skip_dlx_elf_hi16_reloc
);
268 if (skip_dlx_elf_hi16_reloc
)
269 return bfd_elf_generic_reloc (abfd
, reloc_entry
, symbol
, data
,
270 input_section
, output_bfd
, error_message
);
272 /* If we're relocating, and this an external symbol, we don't want
273 to change anything. */
274 if (output_bfd
!= (bfd
*) NULL
275 && (symbol
->flags
& BSF_SECTION_SYM
) == 0
276 && reloc_entry
->addend
== 0)
278 reloc_entry
->address
+= input_section
->output_offset
;
284 if (bfd_is_und_section (symbol
->section
)
285 && output_bfd
== (bfd
*) NULL
)
286 ret
= bfd_reloc_undefined
;
290 unsigned long vallo
, val
;
292 vallo
= bfd_get_16 (abfd
, (bfd_byte
*) data
+ reloc_entry
->address
);
293 printf ("DEBUG: The relocation address = 0x%08x\n", reloc_entry
->address
);
294 printf ("DEBUG: The symbol = 0x%08x\n", vallo
);
295 printf ("DEBUG: The symbol name = %s\n", bfd_asymbol_name (symbol
));
296 printf ("DEBUG: The symbol->value = 0x%08x\n", symbol
->value
);
297 printf ("DEBUG: The vma = 0x%08x\n", symbol
->section
->output_section
->vma
);
298 printf ("DEBUG: The output_offset = 0x%08x\n", symbol
->section
->output_offset
);
299 printf ("DEBUG: The input_offset = 0x%08x\n", input_section
->output_offset
);
300 printf ("DEBUG: The input_vma = 0x%08x\n", input_section
->vma
);
301 printf ("DEBUG: The addend = 0x%08x\n", reloc_entry
->addend
);
305 relocation
= (bfd_is_com_section (symbol
->section
)) ? 0 : symbol
->value
;
306 relocation
+= symbol
->section
->output_section
->vma
;
307 relocation
+= symbol
->section
->output_offset
;
308 relocation
+= reloc_entry
->addend
;
309 relocation
+= bfd_get_16 (abfd
, (bfd_byte
*)data
+ reloc_entry
->address
);
311 sz
= input_section
->rawsize
? input_section
->rawsize
: input_section
->size
;
312 if (reloc_entry
->address
> sz
)
313 return bfd_reloc_outofrange
;
316 printf ("DEBUG: The finial relocation value = 0x%08x\n", relocation
);
319 bfd_put_16 (abfd
, (short)((relocation
>> 16) & 0xFFFF),
320 (bfd_byte
*)data
+ reloc_entry
->address
);
325 /* ELF relocs are against symbols. If we are producing relocatable
326 output, and the reloc is against an external symbol, and nothing
327 has given us any additional addend, the resulting reloc will also
328 be against the same symbol. In such a case, we don't want to
329 change anything about the way the reloc is handled, since it will
330 all be done at final link time. Rather than put special case code
331 into bfd_perform_relocation, all the reloc types use this howto
332 function. It just short circuits the reloc if producing
333 relocatable output against an external symbol. */
335 static bfd_reloc_status_type
336 elf32_dlx_relocate16 (abfd
, reloc_entry
, symbol
, data
,
337 input_section
, output_bfd
, error_message
)
339 arelent
*reloc_entry
;
342 asection
*input_section
;
344 char **error_message ATTRIBUTE_UNUSED
;
346 unsigned long insn
, vallo
, allignment
;
349 /* HACK: I think this first condition is necessary when producing
350 relocatable output. After the end of HACK, the code is identical
351 to bfd_elf_generic_reloc(). I would _guess_ the first change
352 belongs there rather than here. martindo 1998-10-23. */
354 if (skip_dlx_elf_hi16_reloc
)
355 return bfd_elf_generic_reloc (abfd
, reloc_entry
, symbol
, data
,
356 input_section
, output_bfd
, error_message
);
358 /* Check undefined section and undefined symbols */
359 if (bfd_is_und_section (symbol
->section
)
360 && output_bfd
== (bfd
*) NULL
)
361 return bfd_reloc_undefined
;
363 /* Can not support a long jump to sections other then .text */
364 if (strcmp (input_section
->name
, symbol
->section
->output_section
->name
) != 0)
367 "BFD Link Error: branch (PC rel16) to section (%s) not supported\n",
368 symbol
->section
->output_section
->name
);
369 return bfd_reloc_undefined
;
372 insn
= bfd_get_32 (abfd
, (bfd_byte
*)data
+ reloc_entry
->address
);
373 allignment
= 1 << (input_section
->output_section
->alignment_power
- 1);
374 vallo
= insn
& 0x0000FFFF;
377 vallo
= ~(vallo
| 0xFFFF0000) + 1;
379 /* vallo points to the vma of next instruction. */
380 vallo
+= (((unsigned long)(input_section
->output_section
->vma
+
381 input_section
->output_offset
) +
382 allignment
) & ~allignment
);
384 /* val is the displacement (PC relative to next instruction). */
385 val
= (symbol
->section
->output_offset
+
386 symbol
->section
->output_section
->vma
+
387 symbol
->value
) - vallo
;
389 printf ("DEBUG elf32_dlx_relocate: We are here\n");
390 printf ("DEBUG: The insn = 0x%08x\n", insn
);
391 printf ("DEBUG: The vallo = 0x%08x\n", vallo
);
392 printf ("DEBUG: The val = 0x%08x\n", val
);
393 printf ("DEBUG: The symbol name = %s\n", bfd_asymbol_name (symbol
));
394 printf ("DEBUG: The symbol->value = 0x%08x\n", symbol
->value
);
395 printf ("DEBUG: The vma = 0x%08x\n", symbol
->section
->output_section
->vma
);
396 printf ("DEBUG: The lma = 0x%08x\n", symbol
->section
->output_section
->lma
);
397 printf ("DEBUG: The alignment_power = 0x%08x\n", symbol
->section
->output_section
->alignment_power
);
398 printf ("DEBUG: The output_offset = 0x%08x\n", symbol
->section
->output_offset
);
399 printf ("DEBUG: The addend = 0x%08x\n", reloc_entry
->addend
);
402 if (abs ((int) val
) > 0x00007FFF)
403 return bfd_reloc_outofrange
;
405 insn
= (insn
& 0xFFFF0000) | (val
& 0x0000FFFF);
407 bfd_put_32 (abfd
, insn
,
408 (bfd_byte
*) data
+ reloc_entry
->address
);
413 static bfd_reloc_status_type
414 elf32_dlx_relocate26 (abfd
, reloc_entry
, symbol
, data
,
415 input_section
, output_bfd
, error_message
)
417 arelent
*reloc_entry
;
420 asection
*input_section
;
422 char **error_message ATTRIBUTE_UNUSED
;
424 unsigned long insn
, vallo
, allignment
;
427 /* HACK: I think this first condition is necessary when producing
428 relocatable output. After the end of HACK, the code is identical
429 to bfd_elf_generic_reloc(). I would _guess_ the first change
430 belongs there rather than here. martindo 1998-10-23. */
432 if (skip_dlx_elf_hi16_reloc
)
433 return bfd_elf_generic_reloc (abfd
, reloc_entry
, symbol
, data
,
434 input_section
, output_bfd
, error_message
);
436 /* Check undefined section and undefined symbols. */
437 if (bfd_is_und_section (symbol
->section
)
438 && output_bfd
== (bfd
*) NULL
)
439 return bfd_reloc_undefined
;
441 /* Can not support a long jump to sections other then .text */
442 if (strcmp (input_section
->name
, symbol
->section
->output_section
->name
) != 0)
445 "BFD Link Error: jump (PC rel26) to section (%s) not supported\n",
446 symbol
->section
->output_section
->name
);
447 return bfd_reloc_undefined
;
450 insn
= bfd_get_32 (abfd
, (bfd_byte
*)data
+ reloc_entry
->address
);
451 allignment
= 1 << (input_section
->output_section
->alignment_power
- 1);
452 vallo
= insn
& 0x03FFFFFF;
454 if (vallo
& 0x03000000)
455 vallo
= ~(vallo
| 0xFC000000) + 1;
457 /* vallo is the vma for the next instruction. */
458 vallo
+= (((unsigned long) (input_section
->output_section
->vma
+
459 input_section
->output_offset
) +
460 allignment
) & ~allignment
);
462 /* val is the displacement (PC relative to next instruction). */
463 val
= (symbol
->section
->output_offset
+
464 symbol
->section
->output_section
->vma
+ symbol
->value
)
467 printf ("DEBUG elf32_dlx_relocate26: We are here\n");
468 printf ("DEBUG: The insn = 0x%08x\n", insn
);
469 printf ("DEBUG: The vallo = 0x%08x\n", vallo
);
470 printf ("DEBUG: The val = 0x%08x\n", val
);
471 printf ("DEBUG: The abs(val) = 0x%08x\n", abs (val
));
472 printf ("DEBUG: The symbol name = %s\n", bfd_asymbol_name (symbol
));
473 printf ("DEBUG: The symbol->value = 0x%08x\n", symbol
->value
);
474 printf ("DEBUG: The vma = 0x%08x\n", symbol
->section
->output_section
->vma
);
475 printf ("DEBUG: The output_offset = 0x%08x\n", symbol
->section
->output_offset
);
476 printf ("DEBUG: The input_vma = 0x%08x\n", input_section
->output_section
->vma
);
477 printf ("DEBUG: The input_offset = 0x%08x\n", input_section
->output_offset
);
478 printf ("DEBUG: The input_name = %s\n", input_section
->name
);
479 printf ("DEBUG: The addend = 0x%08x\n", reloc_entry
->addend
);
482 if (abs ((int) val
) > 0x01FFFFFF)
483 return bfd_reloc_outofrange
;
485 insn
= (insn
& 0xFC000000) | (val
& 0x03FFFFFF);
486 bfd_put_32 (abfd
, insn
,
487 (bfd_byte
*) data
+ reloc_entry
->address
);
492 /* A mapping from BFD reloc types to DLX ELF reloc types.
493 Stolen from elf32-mips.c.
495 More about this table - for dlx elf relocation we do not really
496 need this table, if we have a rtype defined in this table will
497 caused tc_gen_relocate confused and die on us, but if we remove
498 this table it will caused more problem, so for now simple solution
499 is to remove those entries which may cause problem. */
502 bfd_reloc_code_real_type bfd_reloc_val
;
503 enum elf_dlx_reloc_type elf_reloc_val
;
506 static const struct elf_reloc_map dlx_reloc_map
[] =
508 { BFD_RELOC_NONE
, R_DLX_NONE
},
509 { BFD_RELOC_16
, R_DLX_RELOC_16
},
511 { BFD_RELOC_DLX_JMP26
, R_DLX_RELOC_26_PCREL
},
513 { BFD_RELOC_32
, R_DLX_RELOC_32
},
514 { BFD_RELOC_DLX_HI16_S
, R_DLX_RELOC_16_HI
},
515 { BFD_RELOC_DLX_LO16
, R_DLX_RELOC_16_LO
},
516 { BFD_RELOC_VTABLE_INHERIT
, R_DLX_GNU_VTINHERIT
},
517 { BFD_RELOC_VTABLE_ENTRY
, R_DLX_GNU_VTENTRY
}
521 /* Look through the relocs for a section during the first phase.
522 Since we don't do .gots or .plts, we just need to consider the
523 virtual table relocs for gc. */
526 elf32_dlx_check_relocs (abfd
, info
, sec
, relocs
)
528 struct bfd_link_info
*info
;
530 const Elf_Internal_Rela
*relocs
;
532 Elf_Internal_Shdr
*symtab_hdr
;
533 struct elf_link_hash_entry
**sym_hashes
, **sym_hashes_end
;
534 const Elf_Internal_Rela
*rel
;
535 const Elf_Internal_Rela
*rel_end
;
537 if (info
->relocatable
)
540 symtab_hdr
= &elf_tdata (abfd
)->symtab_hdr
;
541 sym_hashes
= elf_sym_hashes (abfd
);
542 sym_hashes_end
= sym_hashes
+ symtab_hdr
->sh_size
/ sizeof (Elf32_External_Sym
);
543 if (!elf_bad_symtab (abfd
))
544 sym_hashes_end
-= symtab_hdr
->sh_info
;
546 rel_end
= relocs
+ sec
->reloc_count
;
547 for (rel
= relocs
; rel
< rel_end
; rel
++)
549 struct elf_link_hash_entry
*h
;
550 unsigned long r_symndx
;
552 r_symndx
= ELF32_R_SYM (rel
->r_info
);
553 if (r_symndx
< symtab_hdr
->sh_info
)
556 h
= sym_hashes
[r_symndx
- symtab_hdr
->sh_info
];
558 switch (ELF32_R_TYPE (rel
->r_info
))
560 /* This relocation describes the C++ object vtable hierarchy.
561 Reconstruct it for later use during GC. */
562 case R_DLX_GNU_VTINHERIT
:
563 if (!bfd_elf_gc_record_vtinherit (abfd
, sec
, h
, rel
->r_offset
))
567 /* This relocation describes which C++ vtable entries are actually
568 used. Record for later use during GC. */
569 case R_DLX_GNU_VTENTRY
:
570 if (!bfd_elf_gc_record_vtentry (abfd
, sec
, h
, rel
->r_addend
))
579 /* Given a BFD reloc type, return a howto structure. */
581 static reloc_howto_type
*
582 elf32_dlx_reloc_type_lookup (abfd
, code
)
583 bfd
*abfd ATTRIBUTE_UNUSED
;
584 bfd_reloc_code_real_type code
;
588 for (i
= 0; i
< sizeof (dlx_reloc_map
) / sizeof (struct elf_reloc_map
); i
++)
589 if (dlx_reloc_map
[i
].bfd_reloc_val
== code
)
590 return &dlx_elf_howto_table
[(int) dlx_reloc_map
[i
].elf_reloc_val
];
595 bfd_set_error (bfd_error_bad_value
);
597 case BFD_RELOC_16_PCREL_S2
:
598 return &elf_dlx_gnu_rel16_s2
;
599 case BFD_RELOC_DLX_JMP26
:
600 return &elf_dlx_gnu_rel26_s2
;
601 case BFD_RELOC_HI16_S
:
602 return &elf_dlx_reloc_16_hi
;
604 return &elf_dlx_reloc_16_lo
;
608 static reloc_howto_type
*
609 dlx_rtype_to_howto (r_type
)
614 case R_DLX_RELOC_16_PCREL
:
615 return & elf_dlx_gnu_rel16_s2
;
617 case R_DLX_RELOC_26_PCREL
:
618 return & elf_dlx_gnu_rel26_s2
;
620 case R_DLX_RELOC_16_HI
:
621 return & elf_dlx_reloc_16_hi
;
623 case R_DLX_RELOC_16_LO
:
624 return & elf_dlx_reloc_16_lo
;
628 BFD_ASSERT (r_type
< (unsigned int) R_DLX_max
);
629 return & dlx_elf_howto_table
[r_type
];
635 elf32_dlx_info_to_howto (abfd
, cache_ptr
, dst
)
636 bfd
* abfd ATTRIBUTE_UNUSED
;
637 arelent
* cache_ptr ATTRIBUTE_UNUSED
;
638 Elf_Internal_Rela
* dst ATTRIBUTE_UNUSED
;
644 elf32_dlx_info_to_howto_rel (abfd
, cache_ptr
, dst
)
645 bfd
*abfd ATTRIBUTE_UNUSED
;
647 Elf_Internal_Rela
*dst
;
651 r_type
= ELF32_R_TYPE (dst
->r_info
);
652 cache_ptr
->howto
= dlx_rtype_to_howto (r_type
);
656 #define TARGET_BIG_SYM bfd_elf32_dlx_big_vec
657 #define TARGET_BIG_NAME "elf32-dlx"
658 #define ELF_ARCH bfd_arch_dlx
659 #define ELF_MACHINE_CODE EM_DLX
660 #define ELF_MAXPAGESIZE 1 /* FIXME: This number is wrong, It should be the page size in bytes. */
662 #include "elf32-target.h"