www.delorie.com/gnu/docs/binutils/ld_27.html   search  
Buy GNU books!

Untitled Document

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ] Input section example

The following example is a complete linker script. It tells the linker to read all of the sections from file `all.o' and place them at the start of output section `outputa' which starts at location `0x10000'. All of section `.input1' from file `foo.o' follows immediately, in the same output section. All of section `.input2' from `foo.o' goes into output section `outputb', followed by section `.input1' from `foo1.o'. All of the remaining `.input1' and `.input2' sections from any files are written to output section `outputc'.

  outputa 0x10000 :
    foo.o (.input1)
  outputb :
    foo.o (.input2)
    foo1.o (.input1)
  outputc :

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003