OSDev.org

The Place to Start for Operating System Developers
It is currently Sun Apr 28, 2024 7:29 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: GCC arguments
PostPosted: Mon Dec 23, 2002 9:18 am 
Please, if you are using gcc to compile your kernel, could you give me the command-line arguments you're using ?


Top
  
 
 Post subject: Re:GCC arguments
PostPosted: Mon Dec 23, 2002 9:47 am 
I'm using a linker script...

Code:
OUTPUT_FORMAT("elf32-i386")     /* we use ELF */
ENTRY(start)

physical_load_addr = 0x100000;  /* GRUB can't load below 1MB */
SECTIONS
{
    . = physical_load_addr;
    .text :
    {
        *(.text)
    }
    .rodata :
    {
        *(.rodata)      /* need this! */
    }
    .data :
    {
        *(.data)
    }
    .bss :
    {
        bss = .;
        *(COMMON)
        *(.bss)
    }
    end = .;
}

When linking, I use the "ld -T linker.ld ..."...
For gcc, it's just "gcc -c file.c"


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: 0xY, DotBot [Bot] and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group