This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: --entry= (slightly off topic)
- To: "'Fabrice Gautier'" <Fabrice_Gautier at sdesigns dot com>, "'eCos Discussion'" <ecos-discuss at sourceware dot cygnus dot com>
- Subject: RE: [ECOS] --entry= (slightly off topic)
- From: "Trenton D. Adams" <tadams at theone dot dnsalias dot com>
- Date: Fri, 21 Sep 2001 09:03:28 -0600
I don't know why it wasn't working before, but it works now. I must
have done something odd that caused it not to work.
Will the all the 0x8000s be removed with a linker script then?
-----Original Message-----
From: Fabrice Gautier [mailto:Fabrice_Gautier@sdesigns.com]
Sent: Thursday, September 20, 2001 5:38 PM
To: 'Trenton D. Adams'; 'eCos Discussion'
Subject: RE: [ECOS] --entry= (slightly off topic)
> -----Original Message-----
> From: Trenton D. Adams [mailto:tadams@theone.dnsalias.com]
> Sent: Thursday, September 20, 2001 4:13 PM
> To: 'Fabrice Gautier'; 'eCos Discussion'
> Subject: RE: [ECOS] --entry= (slightly off topic)
>
>
> I get
>
> a.out: file format elf32-littlearm
> architecture: arm, flags 0x00000112:
> EXEC_P, HAS_SYMS, D_PAGED
> start address 0x00008000
Uh... Let's see:
Case 1:
$ arm-elf-gcc -nostdlib -nostartfiles test.c
/d/gnu-tools/H-i686-pc-cygwin/arm-elf/bin/ld: warning: cannot find entry
symbol
_start; defaulting to 00008000
$ arm-elf-objdump.exe -f a.out
a.out: file format elf32-littlearm
architecture: arm, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x00008000
Case 2:
$ arm-elf-gcc -nostdlib -nostartfiles -Wl,--entry=0x0 test.c
$ arm-elf-objdump.exe -f a.out
a.out: file format elf32-littlearm
architecture: arm, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
start address 0x00000000
Looks like it works for me...
But in both case I get
$ arm-elf-objdump.exe -h a.out
a.out: file format elf32-littlearm
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00000014 00008000 00008000 00008000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000000 00008114 00008114 00008114 2**0
CONTENTS, ALLOC, LOAD, DATA
2 .sbss 00000000 00008114 00008114 00008114 2**0
CONTENTS
3 .bss 00000000 00008114 00008114 00008114 2**0
ALLOC
4 .stack 00000000 00080000 00080000 00008114 2**0
CONTENTS
And sure enough if you are doing a bootloader you need a custom linker
script to specify the memory map. You can take the eCos scripts as an
example or see the ld documentation
(http://www.redhat.com/docs/manuals/gnupro/GNUPro-Toolkit-00r1/5_ut/b_Us
ingl
d/ld.html)
Regards,