www.delorie.com/djgpp/bugs/show.cgi   search  
Bug 000370

When Created: 04/23/2005 08:01:23
Against DJGPP version: 2.00
By whom: huangxiangkui@msn.com
Abstract: The file's size is not right
I am a Chinese studio in middle school.Perhaps Some mistake on Grammer or  
 word spending will be wrote in this letter.


I use gcc 3.3.4 to build a file.

the file is shown below.

.code16
.text

.globl start
start:
        movw $0x0000,%ax

.org 510
.word 0xAA55

I build it with the command below.

gcc -traditional -c -nostdinc -o boot.o boot.s
ld -Ttext 0x0000 -s --oformat binary -o boot.bin boot.o

When I built it,I found the size of boot.bin is not 512byte,is 1024byte.

I think it is some error in this.

And 

I thinke the code before is like this.

.code16
.text

.global _start
_start:
        movw $0x0000,%ax

.org 510
.word 0xAA55

but I couldn't buld it success by Djgpp in Windows XP

Thank you for your reading.
I wait for your return.

                                              Huangxiangkui
                                        email:Huangxiangkui@msn.com

Note added: 05/03/2005 06:44:15
By whom: no.thanks.invalid@hotmail.com
This is not a problem with DJGPP.

Tell ld to generate a link map file (-Map option) to understand the
problem.

(You need to provide your own link script file.)


Right,

                                    MartinS

Note added: 05/11/2005 08:13:55
By whom: huangxiangkui@msn.com
But how can I do?

Can you give me an example?

Note added: 06/01/2007 19:30:08
By whom: no.thanks.invalid@hotmail.com
The -Map option to ld?



  webmaster     delorie software   privacy  
  Copyright © 2010   by DJ Delorie     Updated Jul 2010