source: rtems-tools/linkers/rld-rap.h @ b2b811c

4.104.115
Last change on this file since b2b811c was 803c60a, checked in by Chris Johns <chrisj@…>, on 11/30/12 at 21:05:47

RAP format up to relocation records completed.

Do not write the script into the RAP file rather just write the
init and fini labels. These are appended to the string table and
offsets in the string table added to the image.

Fi the sizes so the sections can be correctly loaded on the target.

  • Property mode set to 100644
File size: 2.3 KB
Line 
1/*
2 * Copyright (c) 2012, 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 RTEMS Application (RAP) Format management.
22 *
23 */
24
25#if !defined (_RLD_RAP_H_)
26#define _RLD_RAP_H_
27
28#include <rld-files.h>
29
30namespace rld
31{
32  namespace rap
33  {
34    /**
35     * Write a RAP format file.
36     *
37     * The symbol table is provided to allow incremental linking at some point
38     * in the future. I suspect this will also require extra options being
39     * added to control symbol visibility in the RAP file. For example an
40     * "application" may be self contained and does not need to export any
41     * symbols therefore no symbols are added and the only ones are part of the
42     * relocation records to bind to base image symbols. Another case is the
43     * need for an application to export symbols because it is using dlopen to
44     * load modules. Here the symbols maybe 'all' or it could be a user
45     * maintained list that are exported.
46     *
47     * @param app The application image to write too.
48     * @param init The application's initialisation entry point.
49     * @param exit The application's finish entry point .
50     * @param objects The list of object files in the application.
51     * @param symbols The symbol table used to create the application.
52     */
53    void write (files::image&             app,
54                const std::string&        init,
55                const std::string&        fini,
56                const files::object_list& objects,
57                const symbols::table&     symbols);
58  }
59}
60
61#endif
Note: See TracBrowser for help on using the repository browser.