This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
"Pierre Saucourt-Harmel (r54698)" wrote:
- To: "Peter Barada (r1aaaa)" <r1aaaa at email dot sps dot mot dot com>, dkorn at pixelpower dot com, crossgcc at sourceware dot cygnus dot com
- Subject: Re: Build a short executable
- From: "Pierre Saucourt-Harmel (r54698)" <pierre dot saucourt-harmel at motorola dot com>
- Date: Thu, 11 Jan 2001 14:42:14 +0100
- Organization: Motorola
- References: <718D38CAB6E0D011B2C90060970C28A5642589@EXCHANGESERVER> <200101091706.MAA06423@hyper.wm.sps.mot.com> <3A5C37A7.22B3500C@motorola.com>
[ .... ]I found how to avoid the page-alignment, reducing the LOAD offset of each program header to the minimum. The --nmagic (the -n option does not seem to work) of the linker turns off the page-alignment. The ld.document about this option says:
The "objdump -p" gave me the following "program headers" :
Program Header:
LOAD off 0x00008000 vaddr 0x00000000 paddr 0x00000000 align 2**15
filesz 0x00000060 memsz 0x00000060 flags r-x
LOAD off 0x00010000 vaddr 0x00100000 paddr 0x00100000 align 2**15
filesz 0x00000884 memsz 0x00000a08 flags rw-
LOAD off 0x00018000 vaddr 0x07800000 paddr 0x07800000 align 2**15
filesz 0x00002c14 memsz 0x00002c14 flags r-x
private flags = 0: [interworking not enabled] [APCS-32] [floats passed in integer registers] [absolute position]Does any know if I can put all my sections in the same program header ? How can I start this program header to the minimal value ?
-------------clip---------------------------------
`-n'
`--nmagic'
Turn off page alignment of sections, and mark the output as
`NMAGIC' if possible.
-------------clip---------------------------------And now I obtain:
Program Header:
LOAD off 0x00000094 vaddr 0x00000000 paddr 0x00000000 align 2**2
filesz 0x00000060 memsz 0x00000060 flags r-x
LOAD off 0x000000f4 vaddr 0x00100000 paddr 0x00100000 align 2**2
filesz 0x00000884 memsz 0x00000a08 flags rw-
LOAD off 0x00000978 vaddr 0x07800000 paddr 0x07800000 align 2**2
filesz 0x00002c14 memsz 0x00002c14 flags r-x
private flags = 0: [interworking not enabled] [APCS-32] [floats passed in integer registers] [absolute position]And my executable file contains now 14288 bytes against 110168 bytes (stripping all symbols for both generations) !!
Pierre.
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |