* elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
[external/binutils.git] / bfd / elf32-m68hc11.c
1 /* Motorola 68HC11-specific support for 32-bit ELF
2    Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3    Contributed by Stephane Carrez (stcarrez@nerim.fr)
4    (Heavily copied from the D10V port by Martin Hunt (hunt@cygnus.com))
5
6 This file is part of BFD, the Binary File Descriptor library.
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
21
22 #include "bfd.h"
23 #include "sysdep.h"
24 #include "libbfd.h"
25 #include "elf-bfd.h"
26 #include "elf/m68hc11.h"
27
28 static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
29 PARAMS ((bfd * abfd, bfd_reloc_code_real_type code));
30 static void m68hc11_info_to_howto_rel
31 PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
32
33 static bfd_reloc_status_type m68hc11_elf_ignore_reloc
34 PARAMS ((bfd *abfd, arelent *reloc_entry,
35          asymbol *symbol, PTR data, asection *input_section,
36          bfd *output_bfd, char **error_message));
37
38 /* GC mark and sweep.  */
39 static asection *elf32_m68hc11_gc_mark_hook
40 PARAMS ((bfd *abfd, struct bfd_link_info *info,
41          Elf_Internal_Rela *rel, struct elf_link_hash_entry *h,
42          Elf_Internal_Sym *sym));
43 static boolean elf32_m68hc11_gc_sweep_hook
44 PARAMS ((bfd *abfd, struct bfd_link_info *info,
45          asection *sec, const Elf_Internal_Rela *relocs));
46
47 boolean _bfd_m68hc11_elf_merge_private_bfd_data PARAMS ((bfd*, bfd*));
48 boolean _bfd_m68hc11_elf_set_private_flags PARAMS ((bfd*, flagword));
49 boolean _bfd_m68hc11_elf_print_private_bfd_data PARAMS ((bfd*, PTR));
50
51 /* Use REL instead of RELA to save space */
52 #define USE_REL
53
54 /* The Motorola 68HC11 microcontroler only addresses 64Kb.
55    We must handle 8 and 16-bit relocations.  The 32-bit relocation
56    is defined but not used except by gas when -gstabs is used (which
57    is wrong).
58    The 3-bit and 16-bit PC rel relocation is only used by 68HC12.  */
59 static reloc_howto_type elf_m68hc11_howto_table[] = {
60   /* This reloc does nothing.  */
61   HOWTO (R_M68HC11_NONE,        /* type */
62          0,                     /* rightshift */
63          2,                     /* size (0 = byte, 1 = short, 2 = long) */
64          32,                    /* bitsize */
65          false,                 /* pc_relative */
66          0,                     /* bitpos */
67          complain_overflow_dont,/* complain_on_overflow */
68          bfd_elf_generic_reloc, /* special_function */
69          "R_M68HC11_NONE",      /* name */
70          false,                 /* partial_inplace */
71          0,                     /* src_mask */
72          0,                     /* dst_mask */
73          false),                /* pcrel_offset */
74
75   /* A 8 bit absolute relocation */
76   HOWTO (R_M68HC11_8,           /* type */
77          0,                     /* rightshift */
78          0,                     /* size (0 = byte, 1 = short, 2 = long) */
79          8,                     /* bitsize */
80          false,                 /* pc_relative */
81          0,                     /* bitpos */
82          complain_overflow_bitfield,    /* complain_on_overflow */
83          bfd_elf_generic_reloc, /* special_function */
84          "R_M68HC11_8",         /* name */
85          false,                 /* partial_inplace */
86          0x00ff,                /* src_mask */
87          0x00ff,                /* dst_mask */
88          false),                /* pcrel_offset */
89
90   /* A 8 bit absolute relocation (upper address) */
91   HOWTO (R_M68HC11_HI8,         /* type */
92          8,                     /* rightshift */
93          0,                     /* size (0 = byte, 1 = short, 2 = long) */
94          8,                     /* bitsize */
95          false,                 /* pc_relative */
96          0,                     /* bitpos */
97          complain_overflow_bitfield,    /* complain_on_overflow */
98          bfd_elf_generic_reloc, /* special_function */
99          "R_M68HC11_HI8",       /* name */
100          false,                 /* partial_inplace */
101          0x00ff,                /* src_mask */
102          0x00ff,                /* dst_mask */
103          false),                /* pcrel_offset */
104
105   /* A 8 bit absolute relocation (upper address) */
106   HOWTO (R_M68HC11_LO8,         /* type */
107          0,                     /* rightshift */
108          0,                     /* size (0 = byte, 1 = short, 2 = long) */
109          8,                     /* bitsize */
110          false,                 /* pc_relative */
111          0,                     /* bitpos */
112          complain_overflow_dont,        /* complain_on_overflow */
113          bfd_elf_generic_reloc, /* special_function */
114          "R_M68HC11_LO8",       /* name */
115          false,                 /* partial_inplace */
116          0x00ff,                /* src_mask */
117          0x00ff,                /* dst_mask */
118          false),                /* pcrel_offset */
119
120   /* A 8 bit PC-rel relocation */
121   HOWTO (R_M68HC11_PCREL_8,     /* type */
122          0,                     /* rightshift */
123          0,                     /* size (0 = byte, 1 = short, 2 = long) */
124          8,                     /* bitsize */
125          true,                  /* pc_relative */
126          0,                     /* bitpos */
127          complain_overflow_bitfield,    /* complain_on_overflow */
128          bfd_elf_generic_reloc, /* special_function */
129          "R_M68HC11_PCREL_8",   /* name */
130          false,                 /* partial_inplace */
131          0x00ff,                /* src_mask */
132          0x00ff,                /* dst_mask */
133          false),                /* pcrel_offset */
134
135   /* A 16 bit absolute relocation */
136   HOWTO (R_M68HC11_16,          /* type */
137          0,                     /* rightshift */
138          1,                     /* size (0 = byte, 1 = short, 2 = long) */
139          16,                    /* bitsize */
140          false,                 /* pc_relative */
141          0,                     /* bitpos */
142          complain_overflow_dont /*bitfield */ , /* complain_on_overflow */
143          bfd_elf_generic_reloc, /* special_function */
144          "R_M68HC11_16",        /* name */
145          false,                 /* partial_inplace */
146          0xffff,                /* src_mask */
147          0xffff,                /* dst_mask */
148          false),                /* pcrel_offset */
149
150   /* A 32 bit absolute relocation.  This one is never used for the
151      code relocation.  It's used by gas for -gstabs generation.  */
152   HOWTO (R_M68HC11_32,          /* type */
153          0,                     /* rightshift */
154          2,                     /* size (0 = byte, 1 = short, 2 = long) */
155          32,                    /* bitsize */
156          false,                 /* pc_relative */
157          0,                     /* bitpos */
158          complain_overflow_bitfield,    /* complain_on_overflow */
159          bfd_elf_generic_reloc, /* special_function */
160          "R_M68HC11_32",        /* name */
161          false,                 /* partial_inplace */
162          0xffffffff,            /* src_mask */
163          0xffffffff,            /* dst_mask */
164          false),                /* pcrel_offset */
165
166   /* A 3 bit absolute relocation */
167   HOWTO (R_M68HC11_3B,          /* type */
168          0,                     /* rightshift */
169          0,                     /* size (0 = byte, 1 = short, 2 = long) */
170          3,                     /* bitsize */
171          false,                 /* pc_relative */
172          0,                     /* bitpos */
173          complain_overflow_bitfield,    /* complain_on_overflow */
174          bfd_elf_generic_reloc, /* special_function */
175          "R_M68HC11_4B",        /* name */
176          false,                 /* partial_inplace */
177          0x003,                 /* src_mask */
178          0x003,                 /* dst_mask */
179          false),                /* pcrel_offset */
180
181   /* A 16 bit PC-rel relocation */
182   HOWTO (R_M68HC11_PCREL_16,    /* type */
183          0,                     /* rightshift */
184          1,                     /* size (0 = byte, 1 = short, 2 = long) */
185          16,                    /* bitsize */
186          true,                  /* pc_relative */
187          0,                     /* bitpos */
188          complain_overflow_dont,        /* complain_on_overflow */
189          bfd_elf_generic_reloc, /* special_function */
190          "R_M68HC11_PCREL_16",  /* name */
191          false,                 /* partial_inplace */
192          0xffff,                /* src_mask */
193          0xffff,                /* dst_mask */
194          false),                /* pcrel_offset */
195
196   /* GNU extension to record C++ vtable hierarchy */
197   HOWTO (R_M68HC11_GNU_VTINHERIT,       /* type */
198          0,                     /* rightshift */
199          1,                     /* size (0 = byte, 1 = short, 2 = long) */
200          0,                     /* bitsize */
201          false,                 /* pc_relative */
202          0,                     /* bitpos */
203          complain_overflow_dont,        /* complain_on_overflow */
204          NULL,                  /* special_function */
205          "R_M68HC11_GNU_VTINHERIT",     /* name */
206          false,                 /* partial_inplace */
207          0,                     /* src_mask */
208          0,                     /* dst_mask */
209          false),                /* pcrel_offset */
210
211   /* GNU extension to record C++ vtable member usage */
212   HOWTO (R_M68HC11_GNU_VTENTRY, /* type */
213          0,                     /* rightshift */
214          1,                     /* size (0 = byte, 1 = short, 2 = long) */
215          0,                     /* bitsize */
216          false,                 /* pc_relative */
217          0,                     /* bitpos */
218          complain_overflow_dont,        /* complain_on_overflow */
219          _bfd_elf_rel_vtable_reloc_fn,  /* special_function */
220          "R_M68HC11_GNU_VTENTRY",       /* name */
221          false,                 /* partial_inplace */
222          0,                     /* src_mask */
223          0,                     /* dst_mask */
224          false),                /* pcrel_offset */
225
226   /* A 24 bit relocation */
227   HOWTO (R_M68HC11_24,          /* type */
228          0,                     /* rightshift */
229          1,                     /* size (0 = byte, 1 = short, 2 = long) */
230          24,                    /* bitsize */
231          false,                 /* pc_relative */
232          0,                     /* bitpos */
233          complain_overflow_bitfield,    /* complain_on_overflow */
234          bfd_elf_generic_reloc, /* special_function */
235          "R_M68HC11_24",        /* name */
236          false,                 /* partial_inplace */
237          0xffff,                /* src_mask */
238          0xffff,                /* dst_mask */
239          false),                /* pcrel_offset */
240   
241   /* A 16-bit low relocation */
242   HOWTO (R_M68HC11_LO16,        /* type */
243          0,                     /* rightshift */
244          1,                     /* size (0 = byte, 1 = short, 2 = long) */
245          16,                    /* bitsize */
246          false,                 /* pc_relative */
247          0,                     /* bitpos */
248          complain_overflow_bitfield,    /* complain_on_overflow */
249          bfd_elf_generic_reloc, /* special_function */
250          "R_M68HC11_LO16",      /* name */
251          false,                 /* partial_inplace */
252          0xffff,                /* src_mask */
253          0xffff,                /* dst_mask */
254          false),                /* pcrel_offset */
255
256   /* A page relocation */
257   HOWTO (R_M68HC11_PAGE,        /* type */
258          0,                     /* rightshift */
259          0,                     /* size (0 = byte, 1 = short, 2 = long) */
260          8,                     /* bitsize */
261          false,                 /* pc_relative */
262          0,                     /* bitpos */
263          complain_overflow_bitfield,    /* complain_on_overflow */
264          bfd_elf_generic_reloc, /* special_function */
265          "R_M68HC11_PAGE",      /* name */
266          false,                 /* partial_inplace */
267          0x00ff,                /* src_mask */
268          0x00ff,                /* dst_mask */
269          false),                /* pcrel_offset */
270
271   EMPTY_HOWTO (14),
272   EMPTY_HOWTO (15),
273   EMPTY_HOWTO (16),
274   EMPTY_HOWTO (17),
275   EMPTY_HOWTO (18),
276   EMPTY_HOWTO (19),
277   
278   /* Mark beginning of a jump instruction (any form).  */
279   HOWTO (R_M68HC11_RL_JUMP,     /* type */
280          0,                     /* rightshift */
281          1,                     /* size (0 = byte, 1 = short, 2 = long) */
282          0,                     /* bitsize */
283          false,                 /* pc_relative */
284          0,                     /* bitpos */
285          complain_overflow_dont,        /* complain_on_overflow */
286          m68hc11_elf_ignore_reloc,      /* special_function */
287          "R_M68HC11_RL_JUMP",   /* name */
288          true,                  /* partial_inplace */
289          0,                     /* src_mask */
290          0,                     /* dst_mask */
291          true),                 /* pcrel_offset */
292
293   /* Mark beginning of Gcc relaxation group instruction.  */
294   HOWTO (R_M68HC11_RL_GROUP,    /* type */
295          0,                     /* rightshift */
296          1,                     /* size (0 = byte, 1 = short, 2 = long) */
297          0,                     /* bitsize */
298          false,                 /* pc_relative */
299          0,                     /* bitpos */
300          complain_overflow_dont,        /* complain_on_overflow */
301          m68hc11_elf_ignore_reloc,      /* special_function */
302          "R_M68HC11_RL_GROUP",  /* name */
303          true,                  /* partial_inplace */
304          0,                     /* src_mask */
305          0,                     /* dst_mask */
306          true),                 /* pcrel_offset */
307 };
308
309 /* Map BFD reloc types to M68HC11 ELF reloc types.  */
310
311 struct m68hc11_reloc_map
312 {
313   bfd_reloc_code_real_type bfd_reloc_val;
314   unsigned char elf_reloc_val;
315 };
316
317 static const struct m68hc11_reloc_map m68hc11_reloc_map[] = {
318   {BFD_RELOC_NONE, R_M68HC11_NONE,},
319   {BFD_RELOC_8, R_M68HC11_8},
320   {BFD_RELOC_M68HC11_HI8, R_M68HC11_HI8},
321   {BFD_RELOC_M68HC11_LO8, R_M68HC11_LO8},
322   {BFD_RELOC_8_PCREL, R_M68HC11_PCREL_8},
323   {BFD_RELOC_16_PCREL, R_M68HC11_PCREL_16},
324   {BFD_RELOC_16, R_M68HC11_16},
325   {BFD_RELOC_32, R_M68HC11_32},
326   {BFD_RELOC_M68HC11_3B, R_M68HC11_3B},
327
328   {BFD_RELOC_VTABLE_INHERIT, R_M68HC11_GNU_VTINHERIT},
329   {BFD_RELOC_VTABLE_ENTRY, R_M68HC11_GNU_VTENTRY},
330
331   {BFD_RELOC_M68HC11_LO16, R_M68HC11_LO16},
332   {BFD_RELOC_M68HC11_PAGE, R_M68HC11_PAGE},
333   {BFD_RELOC_M68HC11_24, R_M68HC11_24},
334
335   {BFD_RELOC_M68HC11_RL_JUMP, R_M68HC11_RL_JUMP},
336   {BFD_RELOC_M68HC11_RL_GROUP, R_M68HC11_RL_GROUP},
337 };
338
339 static reloc_howto_type *
340 bfd_elf32_bfd_reloc_type_lookup (abfd, code)
341      bfd *abfd ATTRIBUTE_UNUSED;
342      bfd_reloc_code_real_type code;
343 {
344   unsigned int i;
345
346   for (i = 0;
347        i < sizeof (m68hc11_reloc_map) / sizeof (struct m68hc11_reloc_map);
348        i++)
349     {
350       if (m68hc11_reloc_map[i].bfd_reloc_val == code)
351         return &elf_m68hc11_howto_table[m68hc11_reloc_map[i].elf_reloc_val];
352     }
353
354   return NULL;
355 }
356
357 /* This function is used for relocs which are only used for relaxing,
358    which the linker should otherwise ignore.  */
359
360 static bfd_reloc_status_type
361 m68hc11_elf_ignore_reloc (abfd, reloc_entry, symbol, data, input_section,
362                           output_bfd, error_message)
363      bfd *abfd ATTRIBUTE_UNUSED;
364      arelent *reloc_entry;
365      asymbol *symbol ATTRIBUTE_UNUSED;
366      PTR data ATTRIBUTE_UNUSED;
367      asection *input_section;
368      bfd *output_bfd;
369      char **error_message ATTRIBUTE_UNUSED;
370 {
371   if (output_bfd != NULL)
372     reloc_entry->address += input_section->output_offset;
373   return bfd_reloc_ok;
374 }
375
376 /* Set the howto pointer for an M68HC11 ELF reloc.  */
377
378 static void
379 m68hc11_info_to_howto_rel (abfd, cache_ptr, dst)
380      bfd *abfd ATTRIBUTE_UNUSED;
381      arelent *cache_ptr;
382      Elf32_Internal_Rel *dst;
383 {
384   unsigned int r_type;
385
386   r_type = ELF32_R_TYPE (dst->r_info);
387   BFD_ASSERT (r_type < (unsigned int) R_M68HC11_max);
388   cache_ptr->howto = &elf_m68hc11_howto_table[r_type];
389 }
390
391 static asection *
392 elf32_m68hc11_gc_mark_hook (abfd, info, rel, h, sym)
393      bfd *abfd;
394      struct bfd_link_info *info ATTRIBUTE_UNUSED;
395      Elf_Internal_Rela *rel;
396      struct elf_link_hash_entry *h;
397      Elf_Internal_Sym *sym;
398 {
399   if (h != NULL)
400     {
401       switch (ELF32_R_TYPE (rel->r_info))
402         {
403         default:
404           switch (h->root.type)
405             {
406             case bfd_link_hash_defined:
407             case bfd_link_hash_defweak:
408               return h->root.u.def.section;
409
410             case bfd_link_hash_common:
411               return h->root.u.c.p->section;
412
413             default:
414               break;
415             }
416         }
417     }
418   else
419     {
420       if (!(elf_bad_symtab (abfd)
421             && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
422           && !((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
423                && sym->st_shndx != SHN_COMMON))
424         {
425           return bfd_section_from_elf_index (abfd, sym->st_shndx);
426         }
427     }
428   return NULL;
429 }
430
431 static boolean
432 elf32_m68hc11_gc_sweep_hook (abfd, info, sec, relocs)
433      bfd *abfd ATTRIBUTE_UNUSED;
434      struct bfd_link_info *info ATTRIBUTE_UNUSED;
435      asection *sec ATTRIBUTE_UNUSED;
436      const Elf_Internal_Rela *relocs ATTRIBUTE_UNUSED;
437 {
438   /* We don't use got and plt entries for 68hc11/68hc12.  */
439   return true;
440 }
441
442 \f
443 /* Set and control ELF flags in ELF header.  */
444
445 boolean
446 _bfd_m68hc11_elf_set_private_flags (abfd, flags)
447      bfd *abfd;
448      flagword flags;
449 {
450   BFD_ASSERT (!elf_flags_init (abfd)
451               || elf_elfheader (abfd)->e_flags == flags);
452
453   elf_elfheader (abfd)->e_flags = flags;
454   elf_flags_init (abfd) = true;
455   return true;
456 }
457
458 /* Merge backend specific data from an object file to the output
459    object file when linking.  */
460
461 boolean
462 _bfd_m68hc11_elf_merge_private_bfd_data (ibfd, obfd)
463      bfd *ibfd;
464      bfd *obfd;
465 {
466   flagword old_flags;
467   flagword new_flags;
468   boolean ok = true;
469
470   /* Check if we have the same endianess */
471   if (_bfd_generic_verify_endian_match (ibfd, obfd) == false)
472     return false;
473
474   if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour
475       || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
476     return true;
477
478   new_flags = elf_elfheader (ibfd)->e_flags;
479   elf_elfheader (obfd)->e_flags |= new_flags & EF_M68HC11_ABI;
480   old_flags = elf_elfheader (obfd)->e_flags;
481
482   if (! elf_flags_init (obfd))
483     {
484       elf_flags_init (obfd) = true;
485       elf_elfheader (obfd)->e_flags = new_flags;
486       elf_elfheader (obfd)->e_ident[EI_CLASS]
487         = elf_elfheader (ibfd)->e_ident[EI_CLASS];
488
489       if (bfd_get_arch (obfd) == bfd_get_arch (ibfd)
490           && bfd_get_arch_info (obfd)->the_default)
491         {
492           if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd),
493                                    bfd_get_mach (ibfd)))
494             return false;
495         }
496
497       return true;
498     }
499
500   /* Check ABI compatibility.  */
501   if ((new_flags & E_M68HC11_I32) != (old_flags & E_M68HC11_I32))
502     {
503       (*_bfd_error_handler)
504         (_("%s: linking files compiled for 16-bit integers (-mshort) "
505            "and others for 32-bit integers"),
506          bfd_archive_filename (ibfd));
507       ok = false;
508     }
509   if ((new_flags & E_M68HC11_F64) != (old_flags & E_M68HC11_F64))
510     {
511       (*_bfd_error_handler)
512         (_("%s: linking files compiled for 32-bit double (-fshort-double) "
513            "and others for 64-bit double"),
514          bfd_archive_filename (ibfd));
515       ok = false;
516     }
517   new_flags &= ~EF_M68HC11_ABI;
518   old_flags &= ~EF_M68HC11_ABI;
519
520   /* Warn about any other mismatches */
521   if (new_flags != old_flags)
522     {
523       (*_bfd_error_handler)
524         (_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
525          bfd_archive_filename (ibfd), (unsigned long) new_flags,
526          (unsigned long) old_flags);
527       ok = false;
528     }
529
530   if (! ok)
531     {
532       bfd_set_error (bfd_error_bad_value);
533       return false;
534     }
535
536   return true;
537 }
538
539 boolean
540 _bfd_m68hc11_elf_print_private_bfd_data (abfd, ptr)
541      bfd *abfd;
542      PTR ptr;
543 {
544   FILE *file = (FILE *) ptr;
545
546   BFD_ASSERT (abfd != NULL && ptr != NULL);
547
548   /* Print normal ELF private data.  */
549   _bfd_elf_print_private_bfd_data (abfd, ptr);
550
551   /* xgettext:c-format */
552   fprintf (file, _("private flags = %lx:"), elf_elfheader (abfd)->e_flags);
553
554   if (elf_elfheader (abfd)->e_flags & E_M68HC11_I32)
555     fprintf (file, _("[abi=32-bit int,"));
556   else
557     fprintf (file, _("[abi=16-bit int,"));
558
559   if (elf_elfheader (abfd)->e_flags & E_M68HC11_F64)
560     fprintf (file, _(" 64-bit double]"));
561   else
562     fprintf (file, _(" 32-bit double]"));
563
564   if (elf_elfheader (abfd)->e_flags & E_M68HC12_BANKS)
565     fprintf (file, _(" [memory=bank-model]"));
566   else
567     fprintf (file, _(" [memory=flat]"));
568
569   fputc ('\n', file);
570
571   return true;
572 }
573
574 /* Below is the only difference between elf32-m68hc12.c and elf32-m68hc11.c.
575    The Motorola spec says to use a different Elf machine code.  */
576 #define ELF_ARCH                bfd_arch_m68hc11
577 #define ELF_MACHINE_CODE        EM_68HC11
578 #define ELF_MAXPAGESIZE         0x1000
579
580 #define TARGET_BIG_SYM          bfd_elf32_m68hc11_vec
581 #define TARGET_BIG_NAME         "elf32-m68hc11"
582
583 #define elf_info_to_howto       0
584 #define elf_info_to_howto_rel   m68hc11_info_to_howto_rel
585 #define elf_backend_gc_mark_hook     elf32_m68hc11_gc_mark_hook
586 #define elf_backend_gc_sweep_hook    elf32_m68hc11_gc_sweep_hook
587 #define elf_backend_object_p    0
588 #define elf_backend_final_write_processing      0
589 #define elf_backend_can_gc_sections             1
590 #define bfd_elf32_bfd_merge_private_bfd_data \
591                                         _bfd_m68hc11_elf_merge_private_bfd_data
592 #define bfd_elf32_bfd_set_private_flags _bfd_m68hc11_elf_set_private_flags
593 #define bfd_elf32_bfd_print_private_bfd_data \
594                                         _bfd_m68hc11_elf_print_private_bfd_data
595
596 #include "elf32-target.h"