mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
9cc305ec20
* elf32-spu.h (spu_elf_params): Add member emit_fixups. (spu_elf_size_sections): Declare prototype. * elf32-spu.c (spu_link_hash_table): Add member sfixup. (FIXUP_RECORD_SIZE, FIXUP_GET, FIXUP_PUT): New macros. (spu_elf_emit_fixup): New function. (spu_elf_relocate_section): Emit fixup for each SPU_ADDR32. (spu_elf_size_sections): New function. ld/ * emulparams/elf32_spu.sh (OTHER_READONLY_SECTIONS): Add .fixup section and __fixup_start symbol. * emultempl/spuelf.em (params): Initialize emit_fixups member. (spu_before_allocation): Call spu_elf_size_sections. (OPTION_SPU_EMIT_FIXUPS): Define. (PARSE_AND_LIST_LONGOPTS): Add --emit-fixups. (PARSE_AND_LIST_ARGS_CASES): Handle --emit-fixups. * ld.texinfo (--emit-fixups): Document. ld/testsuite/ * ld-spu/fixup.d: New. * ld-spu/fixup.s: New.
28 lines
771 B
Bash
28 lines
771 B
Bash
SCRIPT_NAME=elf
|
|
TEMPLATE_NAME=elf32
|
|
EXTRA_EM_FILE=spuelf
|
|
OUTPUT_FORMAT="elf32-spu"
|
|
NO_REL_RELOCS=yes
|
|
ARCH=spu
|
|
MACHINE=
|
|
ALIGNMENT=16
|
|
TEXT_START_ADDR=0
|
|
INITIAL_READONLY_SECTIONS='.interrupt : { KEEP(*(.interrupt)) }'
|
|
if test -z "${CREATE_SHLIB}"; then
|
|
INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
|
|
.interp ${RELOCATING-0} : { *(.interp) }"
|
|
fi
|
|
OTHER_END_SYMBOLS='PROVIDE (__stack = 0x3fff0);'
|
|
NO_SMALL_DATA=true
|
|
EMBEDDED=true
|
|
MAXPAGESIZE=0x80
|
|
DATA_ADDR="ALIGN(${MAXPAGESIZE})"
|
|
OTHER_BSS_SECTIONS=".toe ALIGN(128) : { *(.toe) } = 0"
|
|
OTHER_SECTIONS=".note.spu_name 0 : { KEEP(*(.note.spu_name)) }
|
|
._ea 0 : { KEEP(*(._ea)) KEEP(*(._ea.*)) }"
|
|
OTHER_READONLY_SECTIONS="
|
|
.fixup ${RELOCATING-0} : {
|
|
PROVIDE (__fixup_start = .);
|
|
KEEP(*(.fixup))
|
|
}"
|