Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 11th, 2012  |  syntax: None  |  size: 0.35 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Setting start address to execute raw binary file
  2. cc -nostartfiles -nostdlib -c stage2.c
  3. ld -s -T scrptfile.ld stage2.o /* I'm using ld just to set starting address of executable */
  4. objcopy -O binary stage2 stage2.bin /* delete all unuseful data  */
  5.        
  6. SECTIONS
  7. {
  8.     . = 0x0500;
  9.     .text : { *(.text)}
  10.     .data : { *(.data)}
  11.     .bss : { *(.bss)}
  12. }