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


Untitled Document

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.6.8.4 Output section phdr

You can assign a section to a previously defined program segment by using `:phdr'. See section 3.8 PHDRS Command. If a section is assigned to one or more segments, then all subsequent allocated sections will be assigned to those segments as well, unless they use an explicitly :phdr modifier. You can use :NONE to tell the linker to not put the section in any segment at all.

Here is a simple example:
 
PHDRS { text PT_LOAD ; }
SECTIONS { .text : { *(.text) } :text }


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