[ec24a37] | 1 | /* |
---|
[810d0ad] | 2 | * Copyright (c) 2011, Chris Johns <chrisj@rtems.org> |
---|
[ec24a37] | 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. |
---|
[810d0ad] | 7 | * |
---|
[ec24a37] | 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 | |
---|
| 30 | namespace rld |
---|
| 31 | { |
---|
| 32 | namespace outputter |
---|
| 33 | { |
---|
[810d0ad] | 34 | /** |
---|
| 35 | * Output the object file list as a string. |
---|
| 36 | * |
---|
[c46980e] | 37 | * @param entry The name of the entry point symbol. |
---|
[a458e27] | 38 | * @param exit The name of the exit point symbol. |
---|
[810d0ad] | 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 | */ |
---|
[c46980e] | 44 | std::string script_text (const std::string& entry, |
---|
[a458e27] | 45 | const std::string& exit, |
---|
[c46980e] | 46 | const files::object_list& dependents, |
---|
| 47 | const files::cache& cache); |
---|
[ec24a37] | 48 | /** |
---|
[eb34811] | 49 | * Output the object files as an archive format file with the metadata as |
---|
| 50 | * the first ELF file. |
---|
[ec24a37] | 51 | * |
---|
| 52 | * @param name The name of the archive. |
---|
[c46980e] | 53 | * @param entry The name of the entry point symbol. |
---|
[a458e27] | 54 | * @param exit The name of the exit point symbol. |
---|
[ec24a37] | 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 | */ |
---|
[c46980e] | 59 | void archive (const std::string& name, |
---|
| 60 | const std::string& entry, |
---|
[a458e27] | 61 | const std::string& exit, |
---|
[c46980e] | 62 | const files::object_list& dependents, |
---|
| 63 | const files::cache& cache); |
---|
[ec24a37] | 64 | |
---|
[37a7a7c] | 65 | void archivera (const std::string& name, |
---|
| 66 | const files::object_list& dependents, |
---|
| 67 | files::cache& cache, |
---|
[53ed116] | 68 | bool ra_exist, |
---|
| 69 | bool ra_rap); |
---|
[37a7a7c] | 70 | |
---|
[ec24a37] | 71 | /** |
---|
| 72 | * Output the object file list as a script. |
---|
| 73 | * |
---|
| 74 | * @param name The name of the script. |
---|
[c46980e] | 75 | * @param entry The name of the entry point symbol. |
---|
[a458e27] | 76 | * @param exit The name of the exit point symbol. |
---|
[ec24a37] | 77 | * @param dependents The list of dependent object files |
---|
| 78 | * @param cache The file cache for the link. Includes the object list |
---|
| 79 | * the user requested. |
---|
| 80 | */ |
---|
[c46980e] | 81 | void script (const std::string& name, |
---|
| 82 | const std::string& entry, |
---|
[a458e27] | 83 | const std::string& exit, |
---|
[c46980e] | 84 | const files::object_list& dependents, |
---|
| 85 | const files::cache& cache); |
---|
[eb34811] | 86 | |
---|
| 87 | /** |
---|
[a458e27] | 88 | * Output the object files in an archive with the metadata. |
---|
| 89 | * |
---|
| 90 | * @param name The name of the script. |
---|
| 91 | * @param entry The name of the entry point symbol. |
---|
| 92 | * @param exit The name of the exit point symbol. |
---|
| 93 | * @param dependents The list of dependent object files |
---|
| 94 | * @param cache The file cache for the link. Includes the object list |
---|
| 95 | * the user requested. |
---|
| 96 | */ |
---|
| 97 | void elf_application (const std::string& name, |
---|
| 98 | const std::string& entry, |
---|
| 99 | const std::string& exit, |
---|
| 100 | const files::object_list& dependents, |
---|
| 101 | const files::cache& cache); |
---|
| 102 | |
---|
| 103 | /** |
---|
| 104 | * Output the object files in an archive with the metadata. |
---|
[eb34811] | 105 | * |
---|
| 106 | * @param name The name of the script. |
---|
[c46980e] | 107 | * @param entry The name of the entry point symbol. |
---|
[a458e27] | 108 | * @param exit The name of the exit point symbol. |
---|
[eb34811] | 109 | * @param dependents The list of dependent object files |
---|
| 110 | * @param cache The file cache for the link. Includes the object list |
---|
| 111 | * the user requested. |
---|
[e78e2b0] | 112 | * @param symbols The symbol table used to resolve the application. |
---|
[eb34811] | 113 | */ |
---|
[c46980e] | 114 | void application (const std::string& name, |
---|
| 115 | const std::string& entry, |
---|
[a458e27] | 116 | const std::string& exit, |
---|
[c46980e] | 117 | const files::object_list& dependents, |
---|
[a458e27] | 118 | const files::cache& cache, |
---|
[37a7a7c] | 119 | const symbols::table& symbols, |
---|
| 120 | bool one_file); |
---|
[eb34811] | 121 | |
---|
[ec24a37] | 122 | } |
---|
| 123 | } |
---|
| 124 | |
---|
| 125 | #endif |
---|