Annotation of gcc/config/m88k/dgux.ld, revision 1.1.1.2

1.1       root        1: /* m88kdgux.ld - COFF linker directives for G++ on an AViiON
                      2: 
                      3:    This file is part of GNU CC.
                      4:    
                      5:    GNU CC is free software; you can redistribute it and/or modify
                      6:    it under the terms of the GNU General Public License as published by
                      7:    the Free Software Foundation; either version 2, or (at your option)
                      8:    any later version.
                      9:    
                     10:    GNU CC is distributed in the hope that it will be useful,
                     11:    but WITHOUT ANY WARRANTY; without even the implied warranty of
                     12:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     13:    GNU General Public License for more details.
                     14:    
                     15:    You should have received a copy of the GNU General Public License
                     16:    along with GNU CC; see the file COPYING.  If not, write to
1.1.1.2 ! root       17:    the Free Software Foundation, 59 Temple Place - Suite 330,
        !            18:    Boston, MA 02111-1307, USA.
1.1       root       19:    
                     20:    On The AViiON we start the output .text section somewhere after the
                     21:    first 64kb (0x10000) of logical address space so that the first
                     22:    64kb can be mapped out, thus catching references through null
                     23:    pointers.  We actually start at 0x10200 (for efficiency).  Ideally,
                     24:    we want the page offset of a given word of the .text (output)
                     25:    section to be the same as it's page offset in the actual (output)
                     26:    linked core file so that paging of the .text section is efficient.
                     27:    In order to do this we allow for up to 0x200 bytes of header stuff
                     28:    in the output (linked) object file.
                     29:    
                     30:    For .data, the OCS says that regions with different "protections"
                     31:    (i.e. read/write, read-only) should not share any 4 megabyte chunk
                     32:    of the logical address space, so we start the .data segment at the
                     33:    first (lowest) 4 MB boundary past the end of the .text segment.
                     34:    
                     35:    For some reason, you can't start right at the 4 MB boundary.  You
                     36:    have to start at some distance past that.  The distance must be
                     37:    equal to the distance from the start of the last 64 KB segment in
                     38:    the (output) .text segment to the actual end of the (output) .text
                     39:    segment.  */
                     40: 
                     41: SECTIONS {
                     42:   .text 0x10200 BLOCK(0x200) :
                     43:     { *(.init) *(.initp) *(.finip) *(.text) *(.tdesc) }
                     44: 
                     45:   GROUP BIND (((((ADDR(.text) + SIZEOF(.text) - 1) / 0x400000) + 1) * 0x400000) + ((ADDR(.text) + SIZEOF (.text)) % 0x10000)) :
                     46:     { .data : { *(.data) *(.ctors) *(.dtors) }
                     47:       .bss  : {} }
                     48: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.