binutils-gdb/ld/emulparams/shelf32.sh

59 lines
1.9 KiB
Bash
Raw Normal View History

Contribute sh64-elf. 2002-01-24 Alexandre Oliva <aoliva@redhat.com> * emulparams/shelf32.sh (STACK_ADDR): Define as formerly defined in OTHER_RELOCATABLE_SECTIONS. 2002-01-18 Alexandre Oliva <aoliva@redhat.com> * emulparams/shelf32.sh (STACK_ADDR): Define. (OTHER_RELOCATABLE_SECTIONS): Renamed to... (OTHER_SECTIONS): this. Removed stack settings. * emulparams/shelf64.sh (OTHER_RELOCATABLE_SECTIONS): Do not set. (OTHER_SECTIONS): Reset after sourcing shelf32.sh. 2001-03-12 DJ Delorie <dj@redhat.com> * emultempl/sh64elf.em (sh64_elf_$_before_allocation): Disable relaxing if any shmedia or mixed sections are found. 2001-03-07 DJ Delorie <dj@redhat.com> * emultempl/sh64elf.em (sh64_elf_before_allocation): Pass f to einfo. Gracefully decline to output to non-elf formats. 2001-03-06 Hans-Peter Nilsson <hpn@redhat.com> * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS) <.stack>: Default to _end aligned to next multiple of 0x40000, plus 0x40000. * emulparams/shelf32.sh: Ditto. 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com> * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Tweak comment. 2001-01-10 Ben Elliston <bje@redhat.com> * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Avoid non-portable shell constructs. From Hans-Peter Nilsson. 2001-01-09 Hans-Peter Nilsson <hpn@cygnus.com> * emulparams/shelf64.sh (EXTRA_EM_FILE): Define empty. * Makefile.am (eshelf64.c, eshlelf64.c, eshlelf32.c): Adjust dependencies to the shell script include chain. * Makefile.in: Regenerate. 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com> * emultempl/sh64elf.em: Update and tweak comments. (sh64_elf_${EMULATION_NAME}_after_allocation): Always allocate and make a .cranges section SEC_IN_MEMORY. 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com> * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation): Don't stop when .cranges section found to be necessary; continue and set stored section contents flags for sections with non-mixed contents. Use a struct sh64_section_data container and sh64_elf_section_data to store contents-type flags. Remove unused update of "isec". (sh64_elf_${EMULATION_NAME}_after_allocation): Only process sections marked SHF_SH5_ISA32_MIXED. Use sh64_elf_section_data to access contents-type flags. Assert that the associated container is initialized. Use that container, not elf_gp_size, to hold size of linker-generated cranges contents. 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com> * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation): Exit early if there's already a .cranges section. When section flag difference is found, don't NULL-check cranges a second time. Tweak comments. (sh64_elf_${EMULATION_NAME}_after_allocation): Use size after merging, not max size, as size of ld-generated .cranges contents. Don't set ELF section flags in output section. When checking for needed .cranges descriptors, don't use a variable; compare incoming ELF section flags directly to SHF_SH5_ISA32_MIXED. Tweak comments. 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com> * emultempl/sh64elf.em: New file. * Makefile.am (eshelf32.c, eshlelf32.c): Adjust dependencies. * Makefile.in: Regenerate. * emulparams/shelf32.sh (OUTPUT_FORMAT): Only set if not set. (OTHER_RELOCATING_SECTIONS): Ditto. (EXTRA_EM_FILE): New, set to sh64elf if not set. * emulparams/shlelf32.sh: Stub out all settings except OUTPUT_FORMAT. Source shelf32.sh. * emulparams/shelf64.sh: Similar, but also keep ELF_SIZE and OTHER_RELOCATING_SECTIONS. (OTHER_RELOCATING_SECTIONS): Remove .cranges. * emulparams/shlelf64.sh: Stub out all settings except OUTPUT_FORMAT. Source shelf64.sh. 2000-12-15 Hans-Peter Nilsson <hpn@cygnus.com> * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS): Include .cranges section. (DATA_START_SYMBOLS): Define, provide ___data. (OTHER_READONLY_SYMBOLS): Define, provide ___rodata and align to 8 for consecutive .data section. (OTHER_GOT_SECTIONS): Define, align to 8 for consecutive .bss section after .data section. * emulparams/shlelf64.sh: Ditto. * emulparams/shelf32.sh: Ditto. (ALIGNMENT): Define to 8. * emulparams/shelf32.sh: Ditto. 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com> * configure.tgt (sh64-*-elf*): Assign targ_extra_libpath to get built-in linker scripts. 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com> * emulparams/shlelf64.sh: New. * emulparams/shelf64.sh: New. * configure.tgt (sh64-*-elf*): Add shelf64 and shlelf64 to targ_extra_emuls. * Makefile.am: Add support for shlelf64 and shelf64. * Makefile.in: Regenerate. 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com> * configure.tgt (sh64-*-elf*): Add shelf as default. Add shlelf to targ_extra_emuls. 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com> * emulparams/shelf32.sh: New file. * emulparams/shlelf32.sh: New file. * Makefile.am: Add support for shlelf32 and shelf32. * configure.tgt: Map sh64-*-elf* to shlelf32 and shelf32. * Makefile.in: Regenerate.
2002-02-08 07:39:01 +01:00
# Note: this parameter script is sourced by the other
# sh[l]elf(32|64).sh parameter scripts.
SCRIPT_NAME=elf
OUTPUT_FORMAT=${OUTPUT_FORMAT-"elf32-sh64"}
TEXT_START_ADDR=0x1000
MAXPAGESIZE=128
ARCH=sh
MACHINE=sh5
Contribute sh64-elf. 2002-01-24 Alexandre Oliva <aoliva@redhat.com> * emulparams/shelf32.sh (STACK_ADDR): Define as formerly defined in OTHER_RELOCATABLE_SECTIONS. 2002-01-18 Alexandre Oliva <aoliva@redhat.com> * emulparams/shelf32.sh (STACK_ADDR): Define. (OTHER_RELOCATABLE_SECTIONS): Renamed to... (OTHER_SECTIONS): this. Removed stack settings. * emulparams/shelf64.sh (OTHER_RELOCATABLE_SECTIONS): Do not set. (OTHER_SECTIONS): Reset after sourcing shelf32.sh. 2001-03-12 DJ Delorie <dj@redhat.com> * emultempl/sh64elf.em (sh64_elf_$_before_allocation): Disable relaxing if any shmedia or mixed sections are found. 2001-03-07 DJ Delorie <dj@redhat.com> * emultempl/sh64elf.em (sh64_elf_before_allocation): Pass f to einfo. Gracefully decline to output to non-elf formats. 2001-03-06 Hans-Peter Nilsson <hpn@redhat.com> * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS) <.stack>: Default to _end aligned to next multiple of 0x40000, plus 0x40000. * emulparams/shelf32.sh: Ditto. 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com> * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Tweak comment. 2001-01-10 Ben Elliston <bje@redhat.com> * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Avoid non-portable shell constructs. From Hans-Peter Nilsson. 2001-01-09 Hans-Peter Nilsson <hpn@cygnus.com> * emulparams/shelf64.sh (EXTRA_EM_FILE): Define empty. * Makefile.am (eshelf64.c, eshlelf64.c, eshlelf32.c): Adjust dependencies to the shell script include chain. * Makefile.in: Regenerate. 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com> * emultempl/sh64elf.em: Update and tweak comments. (sh64_elf_${EMULATION_NAME}_after_allocation): Always allocate and make a .cranges section SEC_IN_MEMORY. 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com> * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation): Don't stop when .cranges section found to be necessary; continue and set stored section contents flags for sections with non-mixed contents. Use a struct sh64_section_data container and sh64_elf_section_data to store contents-type flags. Remove unused update of "isec". (sh64_elf_${EMULATION_NAME}_after_allocation): Only process sections marked SHF_SH5_ISA32_MIXED. Use sh64_elf_section_data to access contents-type flags. Assert that the associated container is initialized. Use that container, not elf_gp_size, to hold size of linker-generated cranges contents. 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com> * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation): Exit early if there's already a .cranges section. When section flag difference is found, don't NULL-check cranges a second time. Tweak comments. (sh64_elf_${EMULATION_NAME}_after_allocation): Use size after merging, not max size, as size of ld-generated .cranges contents. Don't set ELF section flags in output section. When checking for needed .cranges descriptors, don't use a variable; compare incoming ELF section flags directly to SHF_SH5_ISA32_MIXED. Tweak comments. 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com> * emultempl/sh64elf.em: New file. * Makefile.am (eshelf32.c, eshlelf32.c): Adjust dependencies. * Makefile.in: Regenerate. * emulparams/shelf32.sh (OUTPUT_FORMAT): Only set if not set. (OTHER_RELOCATING_SECTIONS): Ditto. (EXTRA_EM_FILE): New, set to sh64elf if not set. * emulparams/shlelf32.sh: Stub out all settings except OUTPUT_FORMAT. Source shelf32.sh. * emulparams/shelf64.sh: Similar, but also keep ELF_SIZE and OTHER_RELOCATING_SECTIONS. (OTHER_RELOCATING_SECTIONS): Remove .cranges. * emulparams/shlelf64.sh: Stub out all settings except OUTPUT_FORMAT. Source shelf64.sh. 2000-12-15 Hans-Peter Nilsson <hpn@cygnus.com> * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS): Include .cranges section. (DATA_START_SYMBOLS): Define, provide ___data. (OTHER_READONLY_SYMBOLS): Define, provide ___rodata and align to 8 for consecutive .data section. (OTHER_GOT_SECTIONS): Define, align to 8 for consecutive .bss section after .data section. * emulparams/shlelf64.sh: Ditto. * emulparams/shelf32.sh: Ditto. (ALIGNMENT): Define to 8. * emulparams/shelf32.sh: Ditto. 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com> * configure.tgt (sh64-*-elf*): Assign targ_extra_libpath to get built-in linker scripts. 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com> * emulparams/shlelf64.sh: New. * emulparams/shelf64.sh: New. * configure.tgt (sh64-*-elf*): Add shelf64 and shlelf64 to targ_extra_emuls. * Makefile.am: Add support for shlelf64 and shelf64. * Makefile.in: Regenerate. 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com> * configure.tgt (sh64-*-elf*): Add shelf as default. Add shlelf to targ_extra_emuls. 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com> * emulparams/shelf32.sh: New file. * emulparams/shlelf32.sh: New file. * Makefile.am: Add support for shlelf32 and shelf32. * configure.tgt: Map sh64-*-elf* to shlelf32 and shelf32. * Makefile.in: Regenerate.
2002-02-08 07:39:01 +01:00
ALIGNMENT=8
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
EMBEDDED=yes
DATA_START_SYMBOLS='PROVIDE (___data = .);'
# If data is located right after .text (not explicitly specified),
# then we need to align it to an 8-byte boundary.
OTHER_READONLY_SECTIONS='
PROVIDE (___rodata = DEFINED (.rodata) ? .rodata : 0);
. = ALIGN (8);
'
# Make _edata and .bss aligned by smuggling in an alignment directive.
OTHER_GOT_SECTIONS='. = ALIGN (8);'
# These are for compatibility with the COFF toolchain.
ENTRY=start
CTOR_START='___ctors = .;'
CTOR_END='___ctors_end = .;'
DTOR_START='___dtors = .;'
DTOR_END='___dtors_end = .;'
# Do not use the varname=${varname-'string'} construct here; there are
# problems with that on some shells (e.g. on Solaris) where there is a bug
# that trigs when $varname contains a "}".
# The effect of the .stack definition is like setting STACK_ADDR to 0x80000,
# except that the setting can be overridden, e.g. --defsym _stack=0xff000,
# and that we put an extra sentinal value at the bottom.
# N.B. We can't use PROVIDE to set the default value in a symbol because
# the address is needed to place the .stack section, which in turn is needed
# to hold the sentinel value(s).
test -z "$CREATE_SHLIB" && OTHER_SECTIONS="
.stack ${RELOCATING-0}${RELOCATING+(DEFINED(_stack) ? _stack : ALIGN (0x40000) + 0x80000)} :
{
${RELOCATING+_stack = .;}
*(.stack)
LONG(0xdeaddead)
}
.cranges 0 : { *(.cranges) }
"
# We do not need .stack for shared library.
test -n "$CREATE_SHLIB" && OTHER_SECTIONS="
.cranges 0 : { *(.cranges) }
"
Contribute sh64-elf. 2002-01-24 Alexandre Oliva <aoliva@redhat.com> * emulparams/shelf32.sh (STACK_ADDR): Define as formerly defined in OTHER_RELOCATABLE_SECTIONS. 2002-01-18 Alexandre Oliva <aoliva@redhat.com> * emulparams/shelf32.sh (STACK_ADDR): Define. (OTHER_RELOCATABLE_SECTIONS): Renamed to... (OTHER_SECTIONS): this. Removed stack settings. * emulparams/shelf64.sh (OTHER_RELOCATABLE_SECTIONS): Do not set. (OTHER_SECTIONS): Reset after sourcing shelf32.sh. 2001-03-12 DJ Delorie <dj@redhat.com> * emultempl/sh64elf.em (sh64_elf_$_before_allocation): Disable relaxing if any shmedia or mixed sections are found. 2001-03-07 DJ Delorie <dj@redhat.com> * emultempl/sh64elf.em (sh64_elf_before_allocation): Pass f to einfo. Gracefully decline to output to non-elf formats. 2001-03-06 Hans-Peter Nilsson <hpn@redhat.com> * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS) <.stack>: Default to _end aligned to next multiple of 0x40000, plus 0x40000. * emulparams/shelf32.sh: Ditto. 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com> * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Tweak comment. 2001-01-10 Ben Elliston <bje@redhat.com> * emulparams/shelf32.sh (OTHER_RELOCATING_SECTIONS): Avoid non-portable shell constructs. From Hans-Peter Nilsson. 2001-01-09 Hans-Peter Nilsson <hpn@cygnus.com> * emulparams/shelf64.sh (EXTRA_EM_FILE): Define empty. * Makefile.am (eshelf64.c, eshlelf64.c, eshlelf32.c): Adjust dependencies to the shell script include chain. * Makefile.in: Regenerate. 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com> * emultempl/sh64elf.em: Update and tweak comments. (sh64_elf_${EMULATION_NAME}_after_allocation): Always allocate and make a .cranges section SEC_IN_MEMORY. 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com> * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation): Don't stop when .cranges section found to be necessary; continue and set stored section contents flags for sections with non-mixed contents. Use a struct sh64_section_data container and sh64_elf_section_data to store contents-type flags. Remove unused update of "isec". (sh64_elf_${EMULATION_NAME}_after_allocation): Only process sections marked SHF_SH5_ISA32_MIXED. Use sh64_elf_section_data to access contents-type flags. Assert that the associated container is initialized. Use that container, not elf_gp_size, to hold size of linker-generated cranges contents. 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com> * emultempl/sh64elf.em (sh64_elf_${EMULATION_NAME}_before_allocation): Exit early if there's already a .cranges section. When section flag difference is found, don't NULL-check cranges a second time. Tweak comments. (sh64_elf_${EMULATION_NAME}_after_allocation): Use size after merging, not max size, as size of ld-generated .cranges contents. Don't set ELF section flags in output section. When checking for needed .cranges descriptors, don't use a variable; compare incoming ELF section flags directly to SHF_SH5_ISA32_MIXED. Tweak comments. 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com> * emultempl/sh64elf.em: New file. * Makefile.am (eshelf32.c, eshlelf32.c): Adjust dependencies. * Makefile.in: Regenerate. * emulparams/shelf32.sh (OUTPUT_FORMAT): Only set if not set. (OTHER_RELOCATING_SECTIONS): Ditto. (EXTRA_EM_FILE): New, set to sh64elf if not set. * emulparams/shlelf32.sh: Stub out all settings except OUTPUT_FORMAT. Source shelf32.sh. * emulparams/shelf64.sh: Similar, but also keep ELF_SIZE and OTHER_RELOCATING_SECTIONS. (OTHER_RELOCATING_SECTIONS): Remove .cranges. * emulparams/shlelf64.sh: Stub out all settings except OUTPUT_FORMAT. Source shelf64.sh. 2000-12-15 Hans-Peter Nilsson <hpn@cygnus.com> * emulparams/shelf64.sh (OTHER_RELOCATING_SECTIONS): Include .cranges section. (DATA_START_SYMBOLS): Define, provide ___data. (OTHER_READONLY_SYMBOLS): Define, provide ___rodata and align to 8 for consecutive .data section. (OTHER_GOT_SECTIONS): Define, align to 8 for consecutive .bss section after .data section. * emulparams/shlelf64.sh: Ditto. * emulparams/shelf32.sh: Ditto. (ALIGNMENT): Define to 8. * emulparams/shelf32.sh: Ditto. 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com> * configure.tgt (sh64-*-elf*): Assign targ_extra_libpath to get built-in linker scripts. 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com> * emulparams/shlelf64.sh: New. * emulparams/shelf64.sh: New. * configure.tgt (sh64-*-elf*): Add shelf64 and shlelf64 to targ_extra_emuls. * Makefile.am: Add support for shlelf64 and shelf64. * Makefile.in: Regenerate. 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com> * configure.tgt (sh64-*-elf*): Add shelf as default. Add shlelf to targ_extra_emuls. 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com> * emulparams/shelf32.sh: New file. * emulparams/shlelf32.sh: New file. * Makefile.am: Add support for shlelf32 and shelf32. * configure.tgt: Map sh64-*-elf* to shlelf32 and shelf32. * Makefile.in: Regenerate.
2002-02-08 07:39:01 +01:00
# We need to adjust sizes in the .cranges section after relaxation, so
# we need an after_allocation function, and it goes in this file.
EXTRA_EM_FILE=${EXTRA_EM_FILE-sh64elf}