| 445 |
theseven |
1 |
|
|
|
2 |
README - elf2flt
|
|
|
3 |
----------------
|
|
|
4 |
|
|
|
5 |
Copyright (C) 2001-2003, SnapGear (www.snapgear.com)
|
|
|
6 |
davidm@snapgear.com
|
|
|
7 |
gerg@snapgear.com
|
|
|
8 |
|
|
|
9 |
This is Free Software, under the GNU Public Licence v2 or greater. See
|
|
|
10 |
LICENSE.TXT for more details.
|
|
|
11 |
|
|
|
12 |
Elf2flt with PIC, ZFLAT and full reloc support. Currently supported
|
|
|
13 |
targets include: m68k/ColdFire, ARM, Sparc, NEC v850, MicroBlaze,
|
|
|
14 |
h8300, SuperH, and Blackfin.
|
|
|
15 |
|
|
|
16 |
COMPILING:
|
|
|
17 |
|
|
|
18 |
You need an appropriate libbfd.a and libiberty.a for your target to
|
|
|
19 |
build this tool. They are normally part of the binutils package.
|
|
|
20 |
|
|
|
21 |
To compile elf2flt do:
|
|
|
22 |
|
|
|
23 |
./configure --target=<ARCH> --with-libbfd=<libbfd.a> --with-libiberty=<libiberty.a>
|
|
|
24 |
make
|
|
|
25 |
make install
|
|
|
26 |
|
|
|
27 |
The <ARCH> argument to configure specifies what the target architecture is.
|
|
|
28 |
This should be the same target as you used to build the binutils and gcc
|
|
|
29 |
cross development tools. The --with-libbfd and --with-libiberty arguments
|
|
|
30 |
specify where the libbfd.a and libiberty.a library files are to use.
|
|
|
31 |
|
|
|
32 |
|
|
|
33 |
FILES:
|
|
|
34 |
|
|
|
35 |
README - this file
|
|
|
36 |
configure - autoconf configuration shell script
|
|
|
37 |
configure.in- original autoconf file
|
|
|
38 |
config.* - autoconf support scripts
|
|
|
39 |
Makefile.in - Makefile template used by configure
|
|
|
40 |
elf2flt.c - the source
|
|
|
41 |
flthdr.c - flat header manipulation program
|
|
|
42 |
flat.h - header from uClinux kernel sources
|
|
|
43 |
elf2flt.ld - an example linker script that works for C/C++ and uClinux
|
|
|
44 |
ld-elf2flt - A linker replacement that implements a -elf2flt option for the
|
|
|
45 |
linker and runs elf2flt automatically for you. It auto
|
|
|
46 |
detects PIC/non-PIC code and adjusts its option accordingly.
|
|
|
47 |
It uses the environment variable FLTFLAGS when running
|
|
|
48 |
elf2flt. It runs /.../m68k-elf-ld.real to do the actual
|
|
|
49 |
linking.
|
|
|
50 |
|
|
|
51 |
TIPS:
|
|
|
52 |
|
|
|
53 |
The ld-elf2flt produces 2 files as output. The binary flat file X, and
|
|
|
54 |
X.gdb which is used for debugging and PIC purposes.
|
|
|
55 |
|
|
|
56 |
The '-p' option requires an elf executable linked at address 0. The
|
|
|
57 |
elf2flt.ld provided will generate the correct format binary when linked
|
|
|
58 |
with the real linker with *no* '-r' option for the linker.
|
|
|
59 |
|
|
|
60 |
The '-r' flag can be added to PIC builds to get contiguous code/data. This
|
|
|
61 |
is good for loading application symbols into gdb (add-symbol-file XXX.gdb).
|
|
|
62 |
|