- Setting start address to execute raw binary file
- cc -nostartfiles -nostdlib -c stage2.c
- ld -s -T scrptfile.ld stage2.o /* I'm using ld just to set starting address of executable */
- objcopy -O binary stage2 stage2.bin /* delete all unuseful data */
- SECTIONS
- {
- . = 0x0500;
- .text : { *(.text)}
- .data : { *(.data)}
- .bss : { *(.bss)}
- }