gcc
Michal Moskal
malekith at pld.org.pl
Thu Aug 9 15:03:26 CEST 2001
On Thu, Aug 09, 2001 at 02:46:52PM +0200, Artur Frysiak wrote:
> On Thu, Aug 09, 2001 at 01:21:00PM +0200, Michal Moskal wrote:
> > On Wed, Aug 08, 2001 at 06:20:57PM +0200, Mariusz Mazur wrote:
> > > How do I convince gcc to produce pure bytecode (no elf headers,
> > > sections or else).
> >
> > You possibly gotta convince as, not gcc. AFAIK gas hasn't got such
> > options, opposite to nasm (but this won't help you much...).
> > Anyway, how do you think you will run it w/o relocation info and stuff?
>
> It's not true.
>
> From etherboot Makefile:
>
> # general rule for .bin (plain binary loader code), may be overridden
> bin/%.bin: bin/%.s
> $(AS32) $(ASFLAGS32) -o bin/$*.tmp $<
> $(OBJCOPY) -O binary bin/$*.tmp $@
> $(RM) bin/$*.tmp
>
> AS32=as
> ASFLAGS32=
Well, as hasn't, objcopy is used to extract binary data.
Anyway, one should note, that .bin file is generated from .s
file, which is surly written with care, not to need any relocation.
I guess it will be hard to make gcc such code (maybe -fPIC can help
but I don't think so).
--
: Michal ``,/\/\, '' Moskal | | : GCS {C,UL}++++$
: | |alekith @ |)|(| . org . pl : {E--, W, w-,M}-
: | : {b,e>+}++ !tv h
: Current project: http://aleph-0.dhs.org/ywindow/ : PLD Team member
More information about the pld-users-en
mailing list