Subversion Repositories freemyipod

Rev

Rev 445 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 445 Rev 450
Line 1... Line 1...
1
 
1
 
2
README - elf2flt
2
README - elf2emcoreapp
3
----------------
3
----------------------
4
 
4
 
-
 
5
Copyright (C) 2011, Michael Sparmann
-
 
6
 
-
 
7
Based on elf2flt:
5
Copyright (C) 2001-2003, SnapGear (www.snapgear.com)
8
Copyright (C) 2001-2003, SnapGear (www.snapgear.com)
6
davidm@snapgear.com
9
davidm@snapgear.com
7
gerg@snapgear.com
10
gerg@snapgear.com
8
 
11
 
9
This is Free Software, under the GNU Public Licence v2 or greater.  See
12
This is Free Software, under the GNU Public Licence v2 or greater.  See
10
LICENSE.TXT for more details.
13
LICENSE.TXT for more details.
11
 
14
 
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:
15
COMPILING:
17
 
16
 
18
You need an appropriate libbfd.a and libiberty.a for your target to 
17
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.
18
build this tool. They are normally part of the binutils package.
20
 
19
 
21
To compile elf2flt do:
20
To compile elf2emcoreapp do:
22
 
21
 
23
    ./configure --target=<ARCH> --with-libbfd=<libbfd.a> --with-libiberty=<libiberty.a>
22
    ./configure --target=<ARCH> --with-libbfd=<libbfd.a> --with-libiberty=<libiberty.a>
24
    make
23
    make
25
    make install
24
    make install
26
 
25
 
Line 30... Line 29...
30
specify where the libbfd.a and libiberty.a library files are to use.
29
specify where the libbfd.a and libiberty.a library files are to use.
31
 
30
 
32
 
31
 
33
FILES:
32
FILES:
34
 
33
 
35
README      - this file
34
README          - this file
36
configure   - autoconf configuration shell script
35
configure       - autoconf configuration shell script
37
configure.in- original autoconf file
36
configure.in    - original autoconf file
38
config.*    - autoconf support scripts
37
config.*        - autoconf support scripts
39
Makefile.in - Makefile template used by configure
38
Makefile.in     - Makefile template used by configure
40
elf2flt.c   - the source
39
elf2emcoreapp.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
 
40
 
51
TIPS:
41
TIPS:
52
 
42
 
53
The ld-elf2flt produces 2 files as output.  The binary flat file X, and
43
If you are using the Rockbox toolchain, you'll need to kill rockboxdev.sh
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
44
after it compiled libbfd and before it removes the binutils build directory.
57
elf2flt.ld provided will generate the correct format binary when linked
45
Use the following configure command:
58
with the real linker with *no* '-r' option for the linker.
46
./configure --target=arm-elf-eabi \
59
 
-
 
60
The '-r' flag can be added to PIC builds to get contiguous code/data.  This
47
            --with-binutils-build-dir=/tmp/rbdev-build/build-binutils \
61
is good for loading application symbols into gdb (add-symbol-file XXX.gdb).
48
	    --with-libiberty=/usr/lib/libiberty.a
62
 
49
 
-
 
50
This worked fine for me. --TheSeven