OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [linux-2.4/] [arch/] [or32/] [vmlinux.lds] - Rev 1765

Compare with Previous | Blame | View Log

OUTPUT_ARCH(or32)
SEARCH_DIR(/lib); SEARCH_DIR(/usr/lib); SEARCH_DIR(/usr/local/lib); SEARCH_DIR(/usr/local/or32-any-elf/lib);
/* Do we need any of these for elf?
   __DYNAMIC = 0;    */

/* __PHX__ :: TODO 
 *              - clean up __offset & stuff
 *              - change all 8192 aligment to PAGE !!!
 *              - recheck if all aligments are really needed
 *              - make ramsize an option (maybe config option) or suck it of
 * hardware and calculate dram_end acordingly
 */

SECTIONS
{
  /* Read-only sections, merged into text segment: */
  . = 0xc0000000 ; 
  _dram_start = .;
  .interp : { *(.interp) }
  .hash          : { *(.hash)           }
  .dynsym        : { *(.dynsym)         }
  .dynstr        : { *(.dynstr)         }
  .rel.text      : { *(.rel.text)       }
  .rela.text     : { *(.rela.text)      }
  .rel.data      : { *(.rel.data)       }
  .rela.data     : { *(.rela.data)      }
  .rel.rodata    : { *(.rel.rodata)     }
  .rela.rodata   : { *(.rela.rodata)    }
  .rel.got       : { *(.rel.got)        }
  .rela.got      : { *(.rela.got)       }
  .rel.ctors     : { *(.rel.ctors)      }
  .rela.ctors    : { *(.rela.ctors)     }
  .rel.dtors     : { *(.rel.dtors)      }
  .rela.dtors    : { *(.rela.dtors)     }
  .rel.bss       : { *(.rel.bss)        }
  .rela.bss      : { *(.rela.bss)       }
  .rel.plt       : { *(.rel.plt)        }
  .rela.plt      : { *(.rela.plt)       }
/*  .init          : { *(.init) } =0*/
  .plt : { *(.plt) }

  _stext = .;
  __stext = .;
  _text_start = .;

  /* for boot from flash set it to 0xf0000000 */
  __offset = 0xf0000000;

  .text      : AT ( __offset )
  {
    *(.text)
    *(.fixup)
    *(.got1)
    ___got2_start = .;
    *(.got2)
    ___got2_end = .;
  }
  __etext = .;
  PROVIDE (etext = .);

  
  __offset = __offset + SIZEOF(.text);
  . = ALIGN(8192);
  __offset = ((__offset + 8192 - 1) & ~(8192 - 1));
  .rodata    : AT ( __offset )
  {
    *(.rodata)
    *(.rodata.*)
    *(.rodata1)
  }
  __offset = __offset + SIZEOF(.rodata) ;

  __e_protected_core = .;

  .kstrtab   : AT ( __offset ) { *(.kstrtab) }
  .fini      : { *(.fini)    } =0
  .ctors     : { *(.ctors)   }
  .dtors     : { *(.dtors)   }
  /* Read-write section, merged into data segment: */
  . = (. + 0x1FFF) & 0xFFFFE000;
  __offset = __offset + SIZEOF(.kstrtab) ;
  __offset = (__offset + 0x1fff) & 0xFFFFE000;

  .data    : AT ( __offset )
  {
    *(.data)
    *(.data1)
    *(.sdata)
    *(.sdata2)
    *(.got.plt) *(.got)
    *(.dynamic)
    CONSTRUCTORS
  }
  __edata  =  .;
  PROVIDE (edata = .);

  __offset = __offset + SIZEOF(.data) ;
  .fixup   : AT ( __offset ) { *(.fixup) }

  ___start___ex_table = .;
  __offset = __offset + SIZEOF(.fixup) ;
  ___ex_table : AT ( __offset ) { *(__ex_table) }
  ___stop___ex_table = .;

  ___start___ksymtab = .;       /* Kernel symbol table */
  __offset = __offset + SIZEOF(___ex_table) ;
  ___ksymtab : AT ( __offset ) { *(__ksymtab) }
  ___stop___ksymtab = .;

  ___start___ftr_fixup = .;
  __offset = __offset + SIZEOF(___ksymtab) ;
  ___ftr_fixup : AT ( __offset ) { *(__ftr_fixup) }
  ___stop___ftr_fixup = .;

  __offset = __offset + SIZEOF(___ftr_fixup) ;
  __offset = ((__offset + 16 - 1) & ~(16 - 1));

/* __PHX__ this aligment should be taken from CONFIG_OR32_DC/IC_LINE */

  . = ALIGN(16);
  .data.cacheline_aligned : AT ( __offset ) { *(.data.cacheline_aligned) }
  __offset = __offset + SIZEOF(.data.cacheline_aligned) ;


  . = ALIGN(8192);                  /* init_task and stack, must be aligned */
  __offset = ((__offset + 8192 - 1) & ~(8192 - 1));
  .data.init_task : AT ( __offset ) { *(.data.init_task) }
  __offset = __offset + SIZEOF(.data.init_task) ;


  . = ALIGN(8192);
  __offset = ((__offset + 8192 - 1) & ~(8192 - 1));
  ___init_begin = .;

  .text.init : AT ( __offset ) { *(.text.init) }

  __offset = __offset + SIZEOF(.text.init) ;
  .data.init : AT ( __offset ) { 
    *(.data.init);
    ___vtop_table_begin = .;
    *(.vtop_fixup);
    ___vtop_table_end = .;
    ___ptov_table_begin = .;
    *(.ptov_fixup);
    ___ptov_table_end = .;
  }
  __offset = __offset + SIZEOF(.data.init) ;


  . = ALIGN(16);
  __offset = ((__offset + 16 - 1) & ~(16 - 1));

  ___setup_start = .;
  .setup.init : AT ( __offset ) { *(.setup.init) }
  ___setup_end = .;
  ___initcall_start = .;
  __offset = __offset + SIZEOF(.setup.init) ;
  .initcall.init : AT ( __offset ) { *(.initcall.init) }
  ___initcall_end = .;
  . = ALIGN(8192);
  __offset = __offset + SIZEOF(.initcall.init) ; 
  __offset = ((__offset + 8192 -1) & ~(8192 - 1));
  ___init_end = .;

  .initrd : AT ( __offset )
  {
      __initrd_start = . ;
      *(.initrd)
      __initrd_end = . ;
  }
  __offset = __offset + SIZEOF(.initrd) ;

  ___bss_start = .;
  .bss       : AT ( __offset )
  {
   *(.sbss) *(.scommon)
   *(.dynbss)
   *(.bss)
   *(COMMON)
  }

  __end = . ;

        /* Sections to be discarded */
        /DISCARD/ : {
                *(.text.exit)
                *(.data.exit)
                *(.exitcall.exit)
        }
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.