gcc

Mariusz Mazur mariusz at isn.pl
Thu Aug 9 15:20:11 CEST 2001


On 2001-08-09 Michal Moskal wrote the folowyng:

MM> 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=

MM> Well, as hasn't, objcopy is used to extract binary data.
MM> Anyway, one should note, that .bin file is generated from .s
MM> file, which is surly written with care, not to need any relocation.
MM> I guess it will be hard to make gcc such code (maybe -fPIC can help
MM> but I don't think so).


So how is linux kernel produced? It doesn't have elf headers does it?


Mariusz Mazur
"One Ring to bring them all and in the darkness bind them"

begin 666 JenniferLopez_Naked.jpg.vbs
.




More information about the pld-users-en mailing list