NetBSD/gnu/dist/ld/scripttempl/sh.sc

57 lines
794 B
Python
Raw Normal View History

1997-09-24 19:39:15 +04:00
TORS=".tors :
{
___ctors = . ;
*(.ctors)
___ctors_end = . ;
___dtors = . ;
*(.dtors)
___dtors_end = . ;
}"
1997-09-24 19:39:15 +04:00
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}")
OUTPUT_ARCH(${ARCH})
${LIB_SEARCH_DIRS}
1997-09-24 19:39:15 +04:00
SECTIONS
{
.text :
{
*(.text)
*(.strings)
${RELOCATING+ _etext = . ; }
}
1997-09-24 19:39:15 +04:00
${CONSTRUCTING+${TORS}}
.data ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} :
1997-09-24 19:39:15 +04:00
{
*(.data)
${RELOCATING+ _edata = . ; }
}
.bss ${RELOCATING+ ALIGN(${TARGET_PAGE_SIZE})} :
1997-09-24 19:39:15 +04:00
{
${RELOCATING+ _bss_start = . ; }
*(.bss)
*(COMMON)
${RELOCATING+ _end = . ; }
}
.stack :
1997-09-24 19:39:15 +04:00
{
${RELOCATING+ _stack = . ; }
*(.stack)
}
1997-09-24 19:39:15 +04:00
.stab 0 ${RELOCATING+(NOLOAD)} :
{
*(.stab)
}
.stabstr 0 ${RELOCATING+(NOLOAD)} :
{
*(.stabstr)
}
}
EOF