elf.sc and shared library for binutils

Ian Lance Taylor ian@cygnus.com
Mon Feb 27 21:39:00 GMT 1995


   From: Mike Meissner <meissner@cygnus.com>
   Date: Mon, 27 Feb 1995 09:54:13 -0500

   If you don't do this, each program will be one physical page larger,
   since the pages in the data area would start on a new page, leaving a
   hole in the program file as it exists on disk between the text and
   data.

The linker already does this.  The issue at hand is more subtle.  It
is how to handle a program whose text segment ends precisely on a page
boundary.  Ideally the data segment should start on the next page,
immediately following the text segment.  Currently the linker will
skip a page, wasting a page of virtual memory address space.  Fixing
this is complex; see the comment in ld/scripttempl/elf.sc.

Ian




More information about the Gas2 mailing list