Page 1 of 1

GCC arguments

Posted: Mon Dec 23, 2002 9:18 am
by pini
Please, if you are using gcc to compile your kernel, could you give me the command-line arguments you're using ?

Re:GCC arguments

Posted: Mon Dec 23, 2002 9:47 am
by Whatever5k
I'm using a linker script...

Code: Select all

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"