Changeset d224b11 in rtems-docs


Ignore:
Timestamp:
May 31, 2017, 10:59:36 AM (2 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
737092f
Parents:
7f89df8
Message:

User: Improvements to some of the tools commands.

Location:
user/tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • user/tools/exeinfo.rst

    r7f89df8 rd224b11  
    3131variable is set to a special section name. The linker is instructed via a
    3232special linker command file to collect these variables together to create a
    33 table. The start-up code in RTEMS loops over the table of addresses and calls
    34 each address or system initialisation function. Th especial section names given
    35 to the variables sort the table placing the initialisation calls in a specific
    36 and controlled order.
     33table. The start-up code in RTRMS loops over the table of addresses and calling
     34each address or system initialisation function. Special section names given to
     35the variables sorts the table placing the functions in a specific order.
    3736
    3837A user places a call to an API function in their application and the linker
    3938pulls the API code from the RTEMS kernel library adding it to the
    40 executable. The API code the linker loads references the variable containing
    41 the address of that API's system initialisation function. The linker loads the
     39executing. The API code the linker loads references the variable containing the
     40address of the that API's system initialisation function. The linker loads the
    4241API system initialisation code into the executable to resolve the external
    43 reference created by the variable. If the user does not reference the API the
    44 variable is not referenced and so not loaded into the executable resling in no
    45 API initialisation.
     42refernece created by the variable. If the user does not reference the API the
     43variables is loaded into the executable and no reference to the API system
     44initialisation code is made so it is not linked into the executable.
    4645
    4746The design automatically creates a unique system intialisation table for each
    48 executable and the code in RTEMS does not change. There are no special build
     47executable and the code in RTEMS does not change, there is no special build
    4948system tricks, or stub libraries.
    5049
  • user/tools/index.rst

    r7f89df8 rd224b11  
    44.. comment: All rights reserved.
    55
    6 Tools
    7 *****
     6<<<<<<< Updated upstream
     7Host Tools
     8**********
    89
    9 The RTEMS kernel is developed on a host computer where the user's application
    10 code is cross-compiled to the target hardware's processor instructions and
    11 linked to the RTEMS kernel and language runtime libraries, and any 3rd party
    12 packages. RTEMS is not a multiprocess operating system and self hosting the
    13 types of tools need to create executables is not feasable. As a result a range
    14 of support tools are needed and they need run on the wide range of avaliable
    15 host computers users wish to develop on. This section details the tools
    16 available on host computers RTEMS users and developers need to create RTEMS
    17 executables.
     10The RTEMS kernel is developed on host computers cross-compiled and linking the
     11kernel, language runtime libraries, 3rd party packages and application source
     12code so it can run on target hardware. RTEMS and some of the hardware it
     13support cannot self-host so we need a range of tools to support the wide range
     14of avaliable host computers users wish to develop on. This section details the
     15tools available on the host computers to help support RTEMS users and
     16developers.
    1817
    1918.. include:: linker.rst
  • user/tools/symbols.rst

    r7f89df8 rd224b11  
    99.. index:: Tools, rtems-syms
    1010
    11 The RTEMS Symbols (:program:`rtems-syms`) command is an RTEMS Tool to generate
    12 symbol tables used by the RTEMS Runtime Loader (RTL). The symbol table is
    13 loaded at run time with the exported base kernel image's symbols so dynamically
    14 loaded code can link to them.
     11The RTEMS Symbols (:program:`rtems-syms`) command is an RTEMS tool to generate
     12symbol tables used by the RTEMS Runtime Loader (RTL). The symbol table contains
     13the exported base kernel symbols user code dynamically loaded can reference.
    1514
    16 The RTEMS Runtime Loader supports embedding of a symbol table in the base
    17 kernel image or loading the symbol table at runtime. Embedding the table
    18 requires linking the symbol table with the base image and runtime loading loads
    19 the table using the dynamic loader when RTEMS is running.
     15The RTEMS Runtime Loader supports two methods of loading a symbol table,
     16embedded and runtime loading. Embedding the table requires linking the symbol
     17table with the base image and runtime loading loads the table using the dynamic
     18loader when RTEMS is running.
    2019
    2120.. sidebar:: *Filtering Symbols*
    2221
    23    Currently there is no filtering of symbols loaded into the symbol
    24    table. This means all base kernel image symbols are present in the symbol
    25    table when only a sub-set of the symbols may be referenced.
     22   Currently there is no filtering of symbols in the symbol table. This means
     23   all base kernel image symbols are present in the symbol table when only a
     24   sub-set of the symbols are referenced.
    2625
    2726Embedding the symbol table creates self contained images. A target may not have
    2827any external media, for example RTEMS tests, or there is a requirement to avoid
    29 the overhead of maintaining matching the symbol table files and kernel base
    30 images. Embedding the symbol table requires a 2-pass link process making the
    31 application's build system more complicated as well as lengthing the build
    32 time.
     28the management need to match the symbol table with the kernel base
     29image. Embedding the symbol table requires a 2-pass link process making the
     30application's build system more complicated.
    3331
    3432A dynamically loadable symbol table is simpler to create however the symbol
    35 table and the kernel base image must match or the behaviour is undefined. The
    36 :program:`rtems-syms` command is run against the base kernel image and the
    37 generated symbol table is installed on to the target hardware and loaded before
    38 any other modules. The symbol table object file contains a constructor that is
    39 called after being loaded and that code registers the symbol table.
     33table and the kernel base image must match or the behaviour is undefined. There
     34is currently no mechnanisum to ensure the symbol table and the kernel image
     35match The :program:`rtems-syms` command is run against the base kernel image
     36and the generated symbol table is installed on to the target hardware and
     37loaded before any other modules.
    4038
    4139Symbol Table
     
    4543using the target's RTEMS C compiler. The :program:`rtems-syms` command searches
    4644for the C compller under the prefix this command is installed under or the
    47 system path. If this fails the option ``-c`` or ``--cc`` to override the path
    48 to the compiler can be used.
     45system path. If the target's C compiler is not located in either of these paths
     46use the option ``-c`` or ``--cc`` to specify the path to the compiler.
    4947
    50 The :program:`rtems-syms` command loads the base kernel image's ELF file
    51 reading the symbols then creates a temporary C file it compiles using the RTEMS
    52 C compiler. The command automatically detects the architecture from the base
    53 kernel image's ELF file. The option ``-E`` or ``--exec-prefix`` can be used to
    54 override the executable prefix used.
     48The :program:`rtems-syms` command loads the base kernel image's ELF file and
     49reads the global or public symbols, creates a temporary C file and then
     50compiles it using the target's RTEMS C compiler. The command automatically
     51detects the architecture from the base kernel image's ELF file and uses it to
     52create the C compiler's name. The option ``-E`` or ``--exec-prefix`` can be
     53used to override the executable prefix used.
    5554
    56 It is important to supply suitable C compiler flags (cflags) so the symbol
    57 table can be linked or loaded.
     55It is important to supply suitable C compiler flags (``cflags``) that match the
     56kernel image's so the symbol table can be linked or loaded.
    5857
    59582-Pass Linking
     
    134133
    135134Create a dynamlically loaded symbol table for the ``minimum.exe`` sample
     135<<<<<<< Updated upstream
    136136program for the ``i386/pc686`` BSP:
     137=======
     138program for the ``i386/pc686``:
     139>>>>>>> Stashed changes
    137140
    138141.. code-block:: shell
Note: See TracChangeset for help on using the changeset viewer.