Blame ld/emulparams/shelf32.sh
|
Packit |
ba3681 |
# Note: this parameter script is sourced by the other
|
|
Packit |
ba3681 |
# sh[l]elf(32|64).sh parameter scripts.
|
|
Packit |
ba3681 |
SCRIPT_NAME=elf
|
|
Packit |
ba3681 |
OUTPUT_FORMAT=${OUTPUT_FORMAT-"elf32-sh64"}
|
|
Packit |
ba3681 |
NO_REL_RELOCS=yes
|
|
Packit |
ba3681 |
TEXT_START_ADDR=0x1000
|
|
Packit |
ba3681 |
MAXPAGESIZE=128
|
|
Packit |
ba3681 |
ARCH=sh
|
|
Packit |
ba3681 |
MACHINE=sh5
|
|
Packit |
ba3681 |
ALIGNMENT=8
|
|
Packit |
ba3681 |
TEMPLATE_NAME=elf32
|
|
Packit |
ba3681 |
GENERATE_SHLIB_SCRIPT=yes
|
|
Packit |
ba3681 |
EMBEDDED=yes
|
|
Packit |
ba3681 |
|
|
Packit |
ba3681 |
DATA_START_SYMBOLS='PROVIDE (___data = .);'
|
|
Packit |
ba3681 |
|
|
Packit |
ba3681 |
# If data is located right after .text (not explicitly specified),
|
|
Packit |
ba3681 |
# then we need to align it to an 8-byte boundary.
|
|
Packit |
ba3681 |
OTHER_READONLY_SECTIONS='
|
|
Packit |
ba3681 |
PROVIDE (___rodata = DEFINED (.rodata) ? .rodata : 0);
|
|
Packit |
ba3681 |
. = ALIGN (8);
|
|
Packit |
ba3681 |
'
|
|
Packit |
ba3681 |
|
|
Packit |
ba3681 |
# Make _edata and .bss aligned by smuggling in an alignment directive.
|
|
Packit |
ba3681 |
OTHER_GOT_SECTIONS='. = ALIGN (8);'
|
|
Packit |
ba3681 |
|
|
Packit |
ba3681 |
# These are for compatibility with the COFF toolchain.
|
|
Packit |
ba3681 |
ENTRY=start
|
|
Packit |
ba3681 |
CTOR_START='___ctors = .;'
|
|
Packit |
ba3681 |
CTOR_END='___ctors_end = .;'
|
|
Packit |
ba3681 |
DTOR_START='___dtors = .;'
|
|
Packit |
ba3681 |
DTOR_END='___dtors_end = .;'
|
|
Packit |
ba3681 |
|
|
Packit |
ba3681 |
STACK_ADDR="(DEFINED(_stack) ? _stack : ALIGN (0x40000) + 0x80000)"
|
|
Packit |
ba3681 |
STACK_SENTINEL="LONG(0xdeaddead)"
|
|
Packit |
ba3681 |
# We do not need .stack for shared library.
|
|
Packit |
ba3681 |
test -n "$CREATE_SHLIB" && unset STACK_ADDR
|
|
Packit |
ba3681 |
|
|
Packit |
ba3681 |
OTHER_SECTIONS=".cranges 0 : { *(.cranges) }"
|
|
Packit |
ba3681 |
|
|
Packit |
ba3681 |
# We need to adjust sizes in the .cranges section after relaxation, so
|
|
Packit |
ba3681 |
# we need an after_allocation function, and it goes in this file.
|
|
Packit |
ba3681 |
EXTRA_EM_FILE=${EXTRA_EM_FILE-sh64elf}
|