This is a test to see if the file is still locked.
[deliverable/binutils-gdb.git] / ld / mri.c
CommitLineData
3d2b83ea
SC
1/* Copyright (C) 1991 Free Software Foundation, Inc.
2
3This file is part of GLD, the Gnu Linker.
4
5GLD is free software; you can redistribute it and/or modify
6it under the terms of the GNU General Public License as published by
7the Free Software Foundation; either version 1, or (at your option)
8any later version.
9
10GLD is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with GLD; see the file COPYING. If not, write to
17the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
18
19
20/* This bit does the tree decoration when MRI style link scripts are parsed */
21
22/*
23 contributed by Steve Chamberlain
24 sac@cygnus.com
25
26*/
27
28#include "bfd.h"
29#include "sysdep.h"
30#include "ldlang.h"
31#include "mri.h"
32#include "ldexp.h"
33
34void
35DEFUN(mri_output_section, (name, vma),
36 CONST char *name AND
37 etree_type *vma)
38
39{
40 lang_output_section_statement_type *os;
41
42 os = lang_output_section_statement_lookup(name);
43
44 if (os->addr_tree == (etree_type *)NULL) {
45 os->addr_tree = vma;
46 }
47
48 os->flags = 0;
49 os->block_value = 0;
2e38b71d 50}
3d2b83ea
SC
51
52/* if any ABSOLUTE <name> are in the script, only load those files
53marked thus */
54
55void DEFUN(mri_only_load,(name), CONST char *name)
2e38b71d
SC
56{
57 lang_output_section_statement_type *os;
3d2b83ea 58
2e38b71d 59 os = lang_output_section_statement_lookup(name);
3d2b83ea 60
2e38b71d
SC
61 os->flags = 0;
62 os->block_value = 0;
3d2b83ea
SC
63
64}
65
66
67void
68DEFUN(mri_load,(name),
69 CONST char *name)
70{
71
72 lang_add_input_file(name, lang_input_file_is_file_enum, (char *)NULL);
73}
2e38b71d
SC
74
75
76void
77DEFUN(mri_order,(name),
78 CONST char *name)
79{
80einfo("Ignoring ORDER %s for the moment\n", name);
81
82}
83
84void
85DEFUN(mri_name,(name),
86 CONST char *name)
87{
88 lang_add_output(name);
89
90}
91
92
93void
94DEFUN(mri_format,(name),
95 CONST char *name)
96{
97 if (strcmp(name, "S") == 0)
98 {
99 lang_add_output_format("srec");
100 }
101 else if (strcmp(name, "IEEE") == 0)
102 {
103 lang_add_output_format("ieee");
104 }
105 else {
106 einfo("%P%F: unknown format type %s\n", name);
107 }
108}
This page took 0.032505 seconds and 4 git commands to generate.