Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/ld/mri.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* mri.c -- handle MRI style linker scripts
    2    Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000
     2   Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2002
    33   Free Software Foundation, Inc.
    44
     
    3232#include "ldmisc.h"
    3333#include "mri.h"
    34 #include "ldgram.h"
     34#include <ldgram.h>
    3535#include "libiberty.h"
    3636
    3737struct section_name_struct {
    3838  struct section_name_struct *next;
    39   CONST char *name;
    40   CONST char *alias;
     39  const char *name;
     40  const char *alias;
    4141  etree_type *vma;
    4242  etree_type *align;
     
    6363static struct section_name_struct **
    6464lookup (name, list)
    65      CONST char *name;
     65     const char *name;
    6666     struct section_name_struct **list;
    6767{
     
    8585mri_add_to_list (list, name, vma, zalias, align, subalign)
    8686     struct section_name_struct **list;
    87      CONST char *name;
     87     const char *name;
    8888     etree_type *vma;
    89      CONST char *zalias;
     89     const char *zalias;
    9090     etree_type *align;
    9191     etree_type *subalign;
     
    104104void
    105105mri_output_section (name, vma)
    106      CONST char *name;
     106     const char *name;
    107107     etree_type *vma;
    108108{
     
    115115void
    116116mri_only_load (name)
    117      CONST char *name;
     117     const char *name;
    118118{
    119119  mri_add_to_list (&only_load, name, 0, 0, 0, 0);
     
    150150  /* Now build the statements for the ldlang machine.  */
    151151
    152   /* Attatch the addresses of any which have addresses,
     152  /* Attach the addresses of any which have addresses,
    153153     and add the ones not mentioned.  */
    154154  if (address != (struct section_name_struct *) NULL)
     
    221221          etree_type *align = 0;
    222222          etree_type *subalign = 0;
     223          struct wildcard_list *tmp;
    223224
    224225          /* See if an alignment has been specified.  */
     
    239240                                               (etree_type *) NULL);
    240241          base = 0;
    241           lang_add_wild (p->name, false, (char *) NULL, false, false, NULL);
     242          tmp = (struct wildcard_list *) xmalloc (sizeof *tmp);
     243          tmp->next = NULL;
     244          tmp->spec.name = p->name;
     245          tmp->spec.exclude_name_list = NULL;
     246          tmp->spec.sorted = FALSE;
     247          lang_add_wild (NULL, tmp, FALSE);
    242248
    243249          /* If there is an alias for this section, add it too.  */
    244250          for (aptr = alias; aptr; aptr = aptr->next)
    245251            if (strcmp (aptr->alias, p->name) == 0)
    246               lang_add_wild (aptr->name, false, (char *) NULL, false, false, NULL);
     252              {
     253                tmp = (struct wildcard_list *) xmalloc (sizeof *tmp);
     254                tmp->next = NULL;
     255                tmp->spec.name = aptr->name;
     256                tmp->spec.exclude_name_list = NULL;
     257                tmp->spec.sorted = FALSE;
     258                lang_add_wild (NULL, tmp, FALSE);
     259              }
    247260
    248261          lang_leave_output_section_statement
    249262            (0, "*default*", (struct lang_output_section_phdr_list *) NULL,
    250              "*default*");
     263             NULL);
    251264
    252265          p = p->next;
     
    259272void
    260273mri_load (name)
    261      CONST char *name;
     274     const char *name;
    262275{
    263276  base = 0;
     
    271284void
    272285mri_order (name)
    273      CONST char *name;
     286     const char *name;
    274287{
    275288  mri_add_to_list (&order, name, 0, 0, 0, 0);
     
    278291void
    279292mri_alias (want, is, isn)
    280      CONST char *want;
    281      CONST char *is;
     293     const char *want;
     294     const char *is;
    282295     int isn;
    283296{
     
    300313void
    301314mri_name (name)
    302      CONST char *name;
     315     const char *name;
    303316{
    304317  lang_add_output (name, 1);
     
    307320void
    308321mri_format (name)
    309      CONST char *name;
     322     const char *name;
    310323{
    311324  if (strcmp (name, "S") == 0)
     
    324337void
    325338mri_public (name, exp)
    326      CONST char *name;
     339     const char *name;
    327340     etree_type *exp;
    328341{
     
    332345void
    333346mri_align (name, exp)
    334      CONST char *name;
     347     const char *name;
    335348     etree_type *exp;
    336349{
     
    340353void
    341354mri_alignmod (name, exp)
    342      CONST char *name;
     355     const char *name;
    343356     etree_type *exp;
    344357{
Note: See TracChangeset for help on using the changeset viewer.