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

4.104.115
Last change on this file since c46980e was c46980e, checked in by Chris Johns <chrisj@…>, on 11/21/12 at 02:04:47

Add entry point support.

  • Property mode set to 100644
File size: 3.4 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     * The types of output.
36     */
37    enum type
38    {
39      ot_script,
40      ot_archive,
41      ot_application
42    };
43
44    /**
45     * Output the object file list as a string.
46     *
47     * @param entry The name of the entry point symbol.
48     * @param dependents The list of dependent object files
49     * @param cache The file cache for the link. Includes the object list
50     *              the user requested.
51     * @return std::string The list as a text string.
52     */
53    std::string script_text (const std::string&        entry,
54                             const files::object_list& dependents,
55                             const files::cache&       cache);
56    /**
57     * Output the object files as an archive format file with the metadata as
58     * the first ELF file.
59     *
60     * @param name The name of the archive.
61     * @param entry The name of the entry point symbol.
62     * @param dependents The list of dependent object files
63     * @param cache The file cache for the link. Includes the object list
64     *              the user requested.
65     */
66    void archive (const std::string&        name,
67                  const std::string&        entry,
68                  const files::object_list& dependents,
69                  const files::cache&       cache);
70
71    /**
72     * Output the object file list as a script.
73     *
74     * @param name The name of the script.
75     * @param entry The name of the entry 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 files::object_list& dependents,
83                 const files::cache&       cache);
84
85    /**
86     * Output the object files as a compressed list of files.
87     *
88     * @param name The name of the script.
89     * @param entry The name of the entry point symbol.
90     * @param dependents The list of dependent object files
91     * @param cache The file cache for the link. Includes the object list
92     *              the user requested.
93     */
94    void application (const std::string&        name,
95                      const std::string&        entry,
96                      const files::object_list& dependents,
97                      const files::cache&       cache);
98
99  }
100}
101
102#endif
Note: See TracBrowser for help on using the repository browser.