26 Commits

Author SHA1 Message Date
Chris Johns
3d2db56f7d Fix warnings on Windows. 2018-11-29 05:45:21 +11:00
Chris Johns
82c8788b11 rtemstoolkit/rtl-file: Remove a file on close if requested
Close #3395
2018-04-14 14:15:07 +10:00
Chris Johns
efc4f099b4 Add release versioning support.
Support a top level VERSION file that defines an RTEMS release.

Fix the install of the python modules including thertems-test.

Update the git python module to the RSB version. Fix the options to
not call clean and to call dirty.

Update the version python module.

Fix the rtld C++ support to the VERSION file and the top level waf
script.
2015-12-09 20:08:19 +11:00
Chris Johns
2d5de2e120 Fix the error message. 2014-09-10 11:16:26 +10:00
Chris Johns
b7ad4a2431 linkers: If no RTEMS path is provied see if the prefix can be used. 2014-09-09 08:40:13 +10:00
Chris Johns
6506aa14aa RTEMS trace linker builds trace applications.
The trace linker builds the both_hello example in examples-v2.

Move the various string support functions into a C++ file and stop being
inlined. Make them return const std::string.

Add ld support to rld-cc.

Add search path support to rld-config so installed common files can be used.

Fix the path bugs.

Add an absolute path function to rld-path.
2014-09-08 16:06:48 +10:00
Chris Johns
b28e8b3115 Refactor the rld-rtems support to remove the globals. 2014-09-07 14:31:18 +10:00
Chris Johns
8807135964 Refactor the CC flags. Fix the various linkers. The trace linker is compiling. 2014-09-06 20:19:45 +10:00
Chris Johns
31bf37564b Remove march/mcpu and add RTEMS BSP and cflags support. 2014-09-05 18:18:11 +10:00
Chris Johns
40fd7a088a rld: Split the file into a path module for path specific functions.
This allows resued for other parts of the system not dependent on
objcet files or archives.
2014-09-01 13:26:47 +10:00
Peng Fan
e5165d2d0a Fix getopt_long usage
When passing shorhand options, getopt_long sometimes does not handle
them correctly.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
2014-09-01 09:59:01 +10:00
Chris Johns
a136346d14 Fix temporary file handling and add tempfile write support.
Move the static objects into the rld-process file and change the
clean up to a call.

Add support to write to tempfiles.
2014-08-05 23:01:15 +10:00
Peng Fan
53ed116b90 Implement a new tool 'rtems-ra'
rtems-ra supports converting an elf archive file into a rap archive file.
It also support add, replace and delete rap files from the rap archive
file.
2013-08-30 21:42:58 +08:00
Peng Fan
37a7a7c92f 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@gmail.com>
2013-08-29 19:41:49 +08:00
Peng Fan
59c3ebd7f4 Add rpath support 2013-08-04 22:35:42 +08:00
Peng Fan
39f48c9047 Add object file details to RAP format
This change added the object file details to the RAP format so aid debugging
support. The information can be optionally stripped for production images
not needed this information if space is an issue,with '--rap-strip' assigned
to rtems-ld.
2013-07-26 17:45:01 +08:00
Chris Johns
69a123b718 Support the gcc option '-Wl'.
Support and ignore the '-Wl,options' command line option to allow
build system that use this flag to call the RTEMS linker.
2013-03-01 13:58:56 +11:00
Chris Johns
6c4218becf Fix the trace help. 2013-03-01 11:51:37 +11:00
Chris Johns
544de91e99 Fix managing weak symbols.
Weak symbols where not being managed correctly. The symbols table
is now a class with externals and weaks as separate symtabs so
the externals can be searched first then the weaks and if not
found an unresolved error is raised. This was found creating
a libbsdport RAP file where the drivers in the all driver table
resolved to the weak symbols and so linking in nothing.

Fixing the weak symbols as found in the libbsdport library
triggered a new resolver bug. The object files now contain the
resolver state and this is used to determine if an object file
has been resolved or is currently being resolved avoiding
rescursive loops with dependent object files.

The resolver trace output is a little easier to read.
2012-12-29 10:20:22 +11:00
Chris Johns
b5a59dd96f Use cerr for errors and not cout. 2012-12-18 20:51:41 +11:00
Chris Johns
cad8b53e6e Updated to reflect the framework changes. 2012-11-26 11:09:06 +11:00
Chris Johns
7b2762fe14 Make the entry point an unresolved symbol. 2012-11-21 13:36:32 +11:00
Chris Johns
c46980ee88 Add entry point support. 2012-11-21 13:04:47 +11:00
Chris Johns
eb34811206 Output application format files.
Added support for an RTEMS RAP format application file. The format is:

 <header>
 <LZ77>
  <Application Script>
  <[1..n] ELF Object files>
 </LZ77>

Where the header is a text string of fields delimited by ',' and terminated
with a line feed (\n). It is variable length:

  RTEMS-APP,0000000,01.00.00,LZ77,00000000\n\0

  where:
   RTEMS-APP     : file tag for quick acceptance and rejection
   Length        : the length of the application in bytes including the
                 : header
   Version       : Version of the application format.
   Compress      : The compression format.
   Checksum      : CCITT CRC32 checksum.

Following the header is a nul ('\0') character then an LZ77 container
with the application loader script followed by the ELF object files.

Note, the script format will be documented else where.

Note, the final version may add a 32bit length field before each part
in the compressed container to delimit the size of the file to be
read. This is currently not in this version.
2012-11-21 11:07:12 +11:00
Chris Johns
9b66527beb Only look for standard library paths if standard libraries and enabled. 2012-11-19 13:13:52 +11:00
Chris Johns
977c3de534 Refactor the ELF support to allow ELF write suppport.
The refactoring allows better reuse of the ELF support and cleans up
some hacks from the generic file and archive handling improving the
separation of the file handling from the file format, ie ELF. The
handling of ELF object files and ELF object files inside archives
is cleaner.

The refactor cleaned up the symbol handling where the symbols now
reside in the ELF file object and references are take in symbol
pointer containers and symbol table containers.

The main purpose of the refactor is to allow support for creating
and writing ELF files.

Also added an rtems-syms command where special symbol support
can be added.
2012-11-17 17:34:33 +11:00