source: rtems-tools/linkers/rld-outputter.h @ 37a7a7c

4.104.115
Last change on this file since 37a7a7c was 37a7a7c, checked in by Peng Fan <van.freenix@…>, on 08/24/13 at 10:10:54

RA format support for rtems-ld

  1. Automatically place object files in archive files into a ra file, using new option --runtime-lib
  2. Add a new option --one-file to decide whether the collected object files should be merged into the rap file or not.

Signed-off-by: Peng Fan <van.freenix@…>

  • Property mode set to 100644
File size: 4.8 KB
Line 
1/*
2 * Copyright (c) 2011, Chris Johns <chrisj@rtems.org>
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16/**
17 * @file
18 *
19 * @ingroup rtems-ld
20 *
21 * @brief RTEMS Linker outputter handles the various output formats.
22 *
23 */
24
25#if !defined (_RLD_OUTPUTTER_H_)
26#define _RLD_OUTPUTTER_H_
27
28#include <rld-files.h>
29
30namespace rld
31{
32  namespace outputter
33  {
34    /**
35     * Output the object file list as a string.
36     *
37     * @param entry The name of the entry point symbol.
38     * @param exit The name of the exit point symbol.
39     * @param dependents The list of dependent object files
40     * @param cache The file cache for the link. Includes the object list
41     *              the user requested.
42     * @return std::string The list as a text string.
43     */
44    std::string script_text (const std::string&        entry,
45                             const std::string&        exit,
46                             const files::object_list& dependents,
47                             const files::cache&       cache);
48    /**
49     * Output the object files as an archive format file with the metadata as
50     * the first ELF file.
51     *
52     * @param name The name of the archive.
53     * @param entry The name of the entry point symbol.
54     * @param exit The name of the exit point symbol.
55     * @param dependents The list of dependent object files
56     * @param cache The file cache for the link. Includes the object list
57     *              the user requested.
58     */
59    void archive (const std::string&        name,
60                  const std::string&        entry,
61                  const std::string&        exit,
62                  const files::object_list& dependents,
63                  const files::cache&       cache);
64
65    void archivera (const std::string&        name,
66                    const files::object_list& dependents,
67                    files::cache&             cache,
68                    bool                      ra_exist);
69
70    /**
71     * Output the object file list as a script.
72     *
73     * @param name The name of the script.
74     * @param entry The name of the entry point symbol.
75     * @param exit The name of the exit point symbol.
76     * @param dependents The list of dependent object files
77     * @param cache The file cache for the link. Includes the object list
78     *              the user requested.
79     */
80    void script (const std::string&        name,
81                 const std::string&        entry,
82                 const std::string&        exit,
83                 const files::object_list& dependents,
84                 const files::cache&       cache);
85
86    /**
87     * Output the object files in an archive with the metadata.
88     *
89     * @param name The name of the script.
90     * @param entry The name of the entry point symbol.
91     * @param exit The name of the exit point symbol.
92     * @param dependents The list of dependent object files
93     * @param cache The file cache for the link. Includes the object list
94     *              the user requested.
95     */
96    void elf_application (const std::string&        name,
97                          const std::string&        entry,
98                          const std::string&        exit,
99                          const files::object_list& dependents,
100                          const files::cache&       cache);
101
102    /**
103     * Output the object files in an archive with the metadata.
104     *
105     * @param name The name of the script.
106     * @param entry The name of the entry point symbol.
107     * @param exit The name of the exit point symbol.
108     * @param dependents The list of dependent object files
109     * @param cache The file cache for the link. Includes the object list
110     *              the user requested.
111     * @param symbols The symbol table used to resolve the application.
112     */
113    void application (const std::string&        name,
114                      const std::string&        entry,
115                      const std::string&        exit,
116                      const files::object_list& dependents,
117                      const files::cache&       cache,
118                      const symbols::table&     symbols,
119                      bool                      one_file);
120
121  }
122}
123
124#endif
Note: See TracBrowser for help on using the repository browser.