This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ld script to emulparams conversion


Hello, all.

We have a vendor-provided LD script for a proprietary OS that looks like the following.
Anyway, I'm trying to build an internal gcc toolchain that'll make things a bit easier for us. Right now, I'm trying to write the ld/emulparams/myos_arm.sh and I'm not really sure what to do differently with .rodata, .glue_7t, etc.

Any hints? Are emulparams well defined somewhere? So far, I'm basing my work on:
http://wiki.osdev.org/OS_Specific_Toolchain

Thanks,
- Alex

ENTRY (custom_entry_name)
MEMORY {
  ROM_MAP (rx) : ORIGIN= 0xACONSTANT, LENGTH=8192k
  RAM_MAP (!rx): ORIGIN= 0xAVARIABLE, LENGTH=8192k
/* AVARIABLE could be one of two values, preferably determined by a GCC command line switch */
}
PHDRS { applic PT_LOAD;}
SECTIONS
{
   .cust_header :
   {
     Mos_header.o (.rodata*)
   } > ROM_MAP :appli

   .text :
   {
     PROVIDE(A_Custom_Symbol = .);
     *( .text)
     *( .rodata*)
     PROVIDE(Another_Cystom_Symbol = .);
     PROVIDE(Yet_Another_Sym = SIZEOF(.text));
     *(.glue_7t) *(.glue_7)
     _etext = .;
   } > ROM_MAP : appli

   .data : AT (_etext)
   {
     PROVIDE(Cutom_data_Symbol = .);
     *(.data)
     PROVIDE(Another_Custom_Data_Symbol = .);
     PROVIDE(Yet_Another_Data_Sym = SIZEOF(.data));
   } > RAM_MAP : appli

   .bss :
   {
     PROVIDE(Custom_BSS_Symbol = .);
     *( .bss)
     *( COMMON)
     PROVIDE(Another_Custom_BSS_Symbol = .);
     PROVIDE(Yet_Another_BSS_Sym = SIZEOF(.bss));
   } > RAM_MAP : appli

   .uninit (NOLOAD) :
   {
     PROVIDE(Custom_Uninit_Symbol = .);
     * (UNINIT)
     PROVIDE(Another_Custom_Uninit_Symbol = .);
     PROVIDE(end = .);
     PROVIDE(Yet_Another_Uninit_Sym = SIZEOF(.uninit));
   } > RAM_MAP :appli

   . = ALIGN(4);
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]