2022-10-27 18:45:45 +00:00
|
|
|
# Copyright (C) 2014-2022 Free Software Foundation, Inc.
|
2018-12-28 15:25:28 +00:00
|
|
|
#
|
2015-08-28 15:32:19 +00:00
|
|
|
# Copying and distribution of this file, with or without modification,
|
|
|
|
# are permitted in any medium without royalty provided the copyright
|
|
|
|
# notice and this notice are preserved.
|
2022-10-27 18:45:45 +00:00
|
|
|
#
|
|
|
|
test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
|
|
|
|
test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
|
|
|
|
test -z "${ALIGNMENT}" && ALIGNMENT="2"
|
2015-08-28 15:32:19 +00:00
|
|
|
|
2012-03-26 19:18:29 +00:00
|
|
|
cat <<EOF
|
2022-10-27 18:45:45 +00:00
|
|
|
/* Copyright (C) 2014-2022 Free Software Foundation, Inc.
|
2015-08-28 15:32:19 +00:00
|
|
|
|
|
|
|
Copying and distribution of this script, with or without modification,
|
|
|
|
are permitted in any medium without royalty provided the copyright
|
|
|
|
notice and this notice are preserved. */
|
|
|
|
|
2022-10-27 18:45:45 +00:00
|
|
|
OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}",
|
|
|
|
"${LITTLE_OUTPUT_FORMAT}")
|
2012-03-26 19:18:29 +00:00
|
|
|
OUTPUT_ARCH(${ARCH})
|
|
|
|
|
2022-10-27 18:45:45 +00:00
|
|
|
${RELOCATING+${LIB_SEARCH_DIRS}}
|
2012-03-26 19:18:29 +00:00
|
|
|
${STACKZERO+${RELOCATING+${STACKZERO}}}
|
2022-10-27 18:45:45 +00:00
|
|
|
${SHLIB_PATH+${RELOCATING+${SHLIB_PATH}}}
|
|
|
|
${RELOCATING+${EXECUTABLE_SYMBOLS}}
|
2012-03-26 19:18:29 +00:00
|
|
|
${RELOCATING+PROVIDE (__stack = 0);}
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
${RELOCATING+. = ${TEXT_START_ADDR};}
|
|
|
|
.text :
|
|
|
|
{
|
|
|
|
CREATE_OBJECT_SYMBOLS
|
|
|
|
*(.text)
|
|
|
|
${RELOCATING+_etext = .;}
|
|
|
|
${RELOCATING+__etext = .;}
|
|
|
|
${PAD_TEXT+${RELOCATING+. = ${DATA_ALIGNMENT};}}
|
|
|
|
}
|
2022-10-27 18:45:45 +00:00
|
|
|
${RELOCATING+. = ${DATA_SEG_ADDR};}
|
2012-03-26 19:18:29 +00:00
|
|
|
.data :
|
|
|
|
{
|
|
|
|
*(.data)
|
2022-10-27 18:45:45 +00:00
|
|
|
${CONSTRUCTING+CONSTRUCTORS}
|
2012-03-26 19:18:29 +00:00
|
|
|
${RELOCATING+_edata = .;}
|
|
|
|
${RELOCATING+__edata = .;}
|
|
|
|
}
|
|
|
|
.bss :
|
|
|
|
{
|
|
|
|
${RELOCATING+ __bss_start = .};
|
|
|
|
*(.bss)
|
|
|
|
*(COMMON)
|
2022-10-27 18:45:45 +00:00
|
|
|
${RELOCATING+. = ALIGN(${ALIGNMENT});}
|
|
|
|
${RELOCATING+_end = . };
|
|
|
|
${RELOCATING+__end = . };
|
2012-03-26 19:18:29 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
EOF
|