delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/07/19/11:06:39

Message-Id: <199907191506.PAA22994@out5.ibm.net>
From: "Mark E." <snowball3 AT bigfoot DOT com>
To: djgpp-workers AT delorie DOT com
Date: Mon, 19 Jul 1999 11:06:33 -0400
MIME-Version: 1.0
Subject: Binutils linker script template
X-mailer: Pegasus Mail for Win32 (v3.11)
Reply-To: djgpp-workers AT delorie DOT com

Hi again,

Well, I've played around with the linker script template so the output of 
go32.x is the same as djgpp.djl plus  the changes neccessary for 
.gnu.linkonce. I haven't made any changes to make the output format to 
coff-go32-exe when appropriate in the script template, should I also 
make this change?

Here's the revised template so far (any bad formatting was done by 
mail program):
# Linker script for 386 go32 (DJGPP)
# DJ Delorie (dj AT delorie DOT com)

test -z "$ENTRY" && ENTRY=start
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")

ENTRY(${ENTRY})

SECTIONS
{
  .text 
${RELOCATING+${TARGET_PAGE_SIZE}+SIZEOF_HEADERS}
 : {
    *(.text)
    *(.gnu.linkonce.t*)
    ${RELOCATING+etext  =  . ; _etext = .};
    ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
  }
  .data ${RELOCATING+ ${DATA_ALIGNMENT}} : {
    ${RELOCATING+djgpp_first_ctor = . ;
    *(.ctor)
    djgpp_last_ctor = .;}
    ${RELOCATING+djgpp_first_dtor = . ;
    *(.dtor)
    djgpp_last_dtor = . ;}
    *(.data)
    *(.gnu.linkonce.d*)
    *(.gnu.linkonce.r*)
    *(.gcc_exc*)
    ___EH_FRAME_BEGIN__ = . ;
    *(.eh_fram*)
    ___EH_FRAME_END__ = . ;
    LONG(0)
    ${RELOCATING+edata  =  . ; _edata = . ;}
    ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
  }
  .bss ${RELOCATING+ SIZEOF(.data) + 
ADDR(.data)} :
  { 					
    *(.bss)
    *(COMMON)
    ${RELOCATING+end = . ; _end = .};
    ${RELOCATING+. = ALIGN(${SEGMENT_SIZE});}
  }
}
EOF


--- 
Mark Elbrecht, snowball3 AT bigfoot DOT com
http://snowball.frogspace.net/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019