Page 1 of 1

link.ld help

Posted: Mon Sep 04, 2006 6:37 pm
by thoover
ok, here is my link.ld

Code: Select all

OUTPUT_FORMAT("binary")
ENTRY(start)
phys = 0x00100000;
SECTIONS
{
  .text phys : AT(phys) {
    code = .;
    *(.text)
    . = ALIGN(4096);
  }
  .data : AT(phys + (data - code))
  {
    data = .;
    *(.data)
    . = ALIGN(4096);
  }
  .bss : AT(phys + (bss - code))
  {
    bss = .;
    *(.bss)
    . = ALIGN(4096);
  }
  end = .;
}
it makes a 4K, 4096byte binary file
can any one tell me how to get it to go to only the size i need even if it changes with out changing the file every change.

thanks

Re:link.ld help

Posted: Mon Sep 04, 2006 11:27 pm
by Candy
it makes a 4K, 4096byte binary file
can any one tell me how to get it to go to only the size i need even if it changes with out changing the file every change.

thanks
Stop aligning on 4k boundaries.