~ubuntu-branches/debian/squeeze/binutils/squeeze

« back to all changes in this revision

Viewing changes to ld/emultempl/armelf.em

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-09-10 17:05:30 UTC
  • mfrom: (1.4.5 upstream) (6.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090910170530-wa6gpju9pq5c56on
Tags: 2.19.91.20090910-1
* Snapshot, taken from the 2.20 release branch 20090910, corresponding
  to the 2.19.90 upstream snapshot.
* Fix Thumb-2 shared libraries (Daniel Jacobowitz), patch taken
  from the trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# This shell script emits a C file. -*- C -*-
2
2
#   Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
3
 
#   2004, 2005, 2007, 2008
 
3
#   2004, 2005, 2006, 2007, 2008, 2009
4
4
#   Free Software Foundation, Inc.
5
5
#
6
6
# This file is part of the GNU Binutils.
89
89
  gld${EMULATION_NAME}_before_allocation ();
90
90
}
91
91
 
92
 
static void
93
 
arm_elf_after_allocation (void)
94
 
{
95
 
  /* Call the standard elf routine.  */
96
 
  after_allocation_default ();
97
 
 
98
 
  {
99
 
    LANG_FOR_EACH_INPUT_STATEMENT (is)
100
 
      {
101
 
        /* Figure out where VFP11 erratum veneers (and the labels returning
102
 
           from same) have been placed.  */
103
 
        bfd_elf32_arm_vfp11_fix_veneer_locations (is->the_bfd, &link_info);
104
 
      }
105
 
  }
106
 
}
107
 
 
108
92
/* Fake input file for stubs.  */
109
93
static lang_input_statement_type *stub_file;
110
94
 
285
269
}
286
270
 
287
271
static void
288
 
gld${EMULATION_NAME}_finish (void)
 
272
gld${EMULATION_NAME}_after_allocation (void)
289
273
{
290
 
  struct bfd_link_hash_entry * h;
291
 
  unsigned int list_size = 10;
292
 
  asection **sec_list = xmalloc (list_size * sizeof (asection *));
293
 
  unsigned int sec_count = 0;
294
 
 
295
274
  if (!link_info.relocatable)
296
275
    {
297
276
      /* Build a sorted list of input text sections, then use that to process
298
277
         the unwind table index.  */
 
278
      unsigned int list_size = 10;
 
279
      asection **sec_list = xmalloc (list_size * sizeof (asection *));
 
280
      unsigned int sec_count = 0;
 
281
 
299
282
      LANG_FOR_EACH_INPUT_STATEMENT (is)
300
283
        {
301
284
          bfd *abfd = is->the_bfd;
375
358
 
376
359
  if (need_laying_out != -1)
377
360
    gld${EMULATION_NAME}_map_segments (need_laying_out);
 
361
}
 
362
 
 
363
static void
 
364
gld${EMULATION_NAME}_finish (void)
 
365
{
 
366
  struct bfd_link_hash_entry * h;
 
367
 
 
368
  {
 
369
    LANG_FOR_EACH_INPUT_STATEMENT (is)
 
370
      {
 
371
        /* Figure out where VFP11 erratum veneers (and the labels returning
 
372
           from same) have been placed.  */
 
373
        bfd_elf32_arm_vfp11_fix_veneer_locations (is->the_bfd, &link_info);
 
374
      }
 
375
  }
378
376
 
379
377
  if (! link_info.relocatable)
380
378
    {
659
657
# We have our own before_allocation etc. functions, but they call
660
658
# the standard routines, so give them a different name.
661
659
LDEMUL_BEFORE_ALLOCATION=arm_elf_before_allocation
662
 
LDEMUL_AFTER_ALLOCATION=arm_elf_after_allocation
 
660
LDEMUL_AFTER_ALLOCATION=gld${EMULATION_NAME}_after_allocation
663
661
LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=arm_elf_create_output_section_statements
664
662
 
665
663
# Replace the elf before_parse function with our own.