binutils-gdb/ld/scripttempl/elfarcv2.sc

321 lines
12 KiB
Python
Raw Normal View History

New ARC implementation. bfd * archures.c: Remove support for older ARC. Added support for new ARC cpus (ARC600, ARC601, ARC700, ARCV2). * bfd-in2.h: Likewise. * config.bfd: Likewise. * cpu-arc.c: Likewise. * elf32-arc.c: Totally changed file with a refactored inplementation of the ARC port. * libbfd.h: Added ARC specific relocation types. * reloc.c: Likewise. gas * config/tc-arc.c: Revamped file for ARC support. * config/tc-arc.h: Likewise. * doc/as.texinfo: Add new ARC options. * doc/c-arc.texi: Likewise. ld * configure.tgt: Added target arc-*-elf* and arc*-*-linux-uclibc*. * emulparams/arcebelf_prof.sh: New file * emulparams/arcebelf.sh: Likewise. * emulparams/arceblinux_prof.sh: Likewise. * emulparams/arceblinux.sh: Likewise. * emulparams/arcelf_prof.sh: Likewise. * emulparams/arcelf.sh: Likewise. * emulparams/arclinux_prof.sh: Likewise. * emulparams/arclinux.sh: Likewise. * emulparams/arcv2elfx.sh: Likewise. * emulparams/arcv2elf.sh: Likewise. * emultempl/arclinux.em: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise * Makefile.am: Add new ARC emulations. * Makefile.in: Regenerate. * NEWS: Mention the new feature. opcodes * arc-dis.c: Revamped file for ARC support * arc-dis.h: Likewise. * arc-ext.c: Likewise. * arc-ext.h: Likewise. * arc-opc.c: Likewise. * arc-fxi.h: New file. * arc-regs.h: Likewise. * arc-tbl.h: Likewise. binutils * readelf.c (get_machine_name): Remove A5 reference. Add ARCompact and ARCv2. (get_machine_flags): Handle EM_ARCV2 and EM_ARCOMPACT. (guess_is_rela): Likewise. (dump_relocations): Likewise. (is_32bit_abs_reloc): Likewise. (is_16bit_abs_reloc): Likewise. (is_none_reloc): Likewise. * NEWS: Mention the new feature. include * dis-asm.h (arc_get_disassembler): Correct declaration. * arc-reloc.def: Macro file with definition of all relocation types. * arc.h: Changed macros for the newly supported ARC cpus. Altered enum defining the supported relocations. * common.h: Changed EM_ARC_A5 definition to EM_ARC_COMPACT. Added macro for EM_ARC_COMPACT2. * arc-func.h: New file. * arc.h: Likewise.
2015-10-07 15:20:19 +02:00
#
# Unusual variables checked by this code:
# NOP - four byte opcode for no-op (defaults to 0)
# NO_SMALL_DATA - no .sbss/.sbss2/.sdata/.sdata2 sections if not
# empty.
# OTHER_READONLY_SECTIONS - other than .text .init .rodata ...
# (e.g., .PARISC.milli)
# When adding sections, do note that the names of some sections are used
# when specifying the start address of the next.
#
test -z "$ENTRY" && ENTRY=start
test -z "${BIG_OUTPUT_FORMAT}" && BIG_OUTPUT_FORMAT=${OUTPUT_FORMAT}
test -z "${LITTLE_OUTPUT_FORMAT}" && LITTLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
# If we request a big endian toolchain, give a big endian linker
ELF ld -r scripts "ld -r" generally should not combine object file sections with different names. For example, "ld -r" should not combine ".text", ".text.hot" and ".text.cold" into an output ".text" section. An exception needs to be made for linker created sections, for example, branch trampoline sections that might be created even for ld -r. "ld -r" also should not define symbols in linker scripts. Any definitions are likely to conflict with those defined at final link. A MEMORY spec is also not needed for ld -r. * Makefile.am (eelf32btsmip_fbsd.c, eelf32btsmipn32_fbsd.c), (eelf32epiphany.c, eelf32epiphany_4x4.c, eelf32ltsmip_fbsd.c), (eelf32ltsmipn32_fbsd.c, eelf32xc16x.c, eelf32xc16xl.c), (eelf32xc16xs.c, emcorepe.c, enios2elf.c, enios2linux.c), (eelf64btsmip_fbsd.c, eelf64ltsmip_fbsd.c): Correct dependencies. * Makefile.in: Regenerate. * emulparams/aarch64cloudabi.sh, * emulparams/aarch64fbsd.sh, * emulparams/aarch64linux.sh, * emulparams/aarch64linux32.sh, * emulparams/arc-nps.sh, * emulparams/elf32_spu.sh, * emulparams/elf32_tic6x_le.sh, * emulparams/elf32bmip.sh, * emulparams/elf32btsmipn32.sh, * emulparams/elf32lr5900n32.sh, * emulparams/elf32mep.sh, * emulparams/elf32metag.sh, * emulparams/elf64btsmip.sh, * emulparams/shelf_vxworks.sh, * emulparams/shlelf_fd.sh, * scripttempl/DWARF.sc, * scripttempl/alpha.sc, * scripttempl/alphavms.sc, * scripttempl/arclinux.sc, * scripttempl/armbpabi.sc, * scripttempl/avr.sc, * scripttempl/dlx.sc, * scripttempl/elf.sc, * scripttempl/elf32cr16.sc, * scripttempl/elf32cr16c.sc, * scripttempl/elf32crx.sc, * scripttempl/elf32msp430.sc, * scripttempl/elf32msp430_3.sc, * scripttempl/elf32xc16x.sc, * scripttempl/elf32xc16xl.sc, * scripttempl/elf32xc16xs.sc, * scripttempl/elf64hppa.sc, * scripttempl/elf_chaos.sc, * scripttempl/elfarc.sc, * scripttempl/elfarcv2.sc, * scripttempl/elfd10v.sc, * scripttempl/elfd30v.sc, * scripttempl/elfm68hc11.sc, * scripttempl/elfm68hc12.sc, * scripttempl/elfm9s12z.sc, * scripttempl/elfmicroblaze.sc, * scripttempl/elfxgate.sc, * scripttempl/elfxtensa.sc, * scripttempl/epiphany_4x4.sc, * scripttempl/ft32.sc, * scripttempl/hppaelf.sc, * scripttempl/ia64vms.sc, * scripttempl/ip2k.sc, * scripttempl/iq2000.sc, * scripttempl/mep.sc, * scripttempl/mmo.sc, * scripttempl/nds32elf.sc, * scripttempl/pru.sc, * scripttempl/sh.sc, * scripttempl/v850.sc, * scripttempl/v850_rh850.sc, * scripttempl/visium.sc, * scripttempl/xstormy16.sc: Condition various parts of scripts on ${RELOCATABLE} in order to prevent ld -r merging sections or defining symbols. Remove MEMORY and VERSION definitions from ld -r scripts too. * testsuite/ld-elf/group2.d, * testsuite/ld-elf/group4.d, * testsuite/ld-elf/group5.d, * testsuite/ld-elf/group6.d, * testsuite/ld-elf/group7.d, * testsuite/ld-elf/group8a.d, * testsuite/ld-elf/group8b.d, * testsuite/ld-elf/group9a.d, * testsuite/ld-elf/group9b.d, * testsuite/ld-elf/pr17550a.d, * testsuite/ld-elf/pr17550b.d, * testsuite/ld-elf/pr17550d.d: Don't xfail cr16 and crx. * testsuite/ld-elf/init-fini-arrays.d, * testsuite/ld-elf/pr22677.d: Likewise, and dont' xfail mep.
2018-10-12 03:36:40 +02:00
test -z "$GOT" && GOT=".got ${RELOCATING-0} : {${RELOCATING+ *(.got.plt)} *(.got) } ${RELOCATING+ > ${DATA_MEMORY}}"
New ARC implementation. bfd * archures.c: Remove support for older ARC. Added support for new ARC cpus (ARC600, ARC601, ARC700, ARCV2). * bfd-in2.h: Likewise. * config.bfd: Likewise. * cpu-arc.c: Likewise. * elf32-arc.c: Totally changed file with a refactored inplementation of the ARC port. * libbfd.h: Added ARC specific relocation types. * reloc.c: Likewise. gas * config/tc-arc.c: Revamped file for ARC support. * config/tc-arc.h: Likewise. * doc/as.texinfo: Add new ARC options. * doc/c-arc.texi: Likewise. ld * configure.tgt: Added target arc-*-elf* and arc*-*-linux-uclibc*. * emulparams/arcebelf_prof.sh: New file * emulparams/arcebelf.sh: Likewise. * emulparams/arceblinux_prof.sh: Likewise. * emulparams/arceblinux.sh: Likewise. * emulparams/arcelf_prof.sh: Likewise. * emulparams/arcelf.sh: Likewise. * emulparams/arclinux_prof.sh: Likewise. * emulparams/arclinux.sh: Likewise. * emulparams/arcv2elfx.sh: Likewise. * emulparams/arcv2elf.sh: Likewise. * emultempl/arclinux.em: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise * Makefile.am: Add new ARC emulations. * Makefile.in: Regenerate. * NEWS: Mention the new feature. opcodes * arc-dis.c: Revamped file for ARC support * arc-dis.h: Likewise. * arc-ext.c: Likewise. * arc-ext.h: Likewise. * arc-opc.c: Likewise. * arc-fxi.h: New file. * arc-regs.h: Likewise. * arc-tbl.h: Likewise. binutils * readelf.c (get_machine_name): Remove A5 reference. Add ARCompact and ARCv2. (get_machine_flags): Handle EM_ARCV2 and EM_ARCOMPACT. (guess_is_rela): Likewise. (dump_relocations): Likewise. (is_32bit_abs_reloc): Likewise. (is_16bit_abs_reloc): Likewise. (is_none_reloc): Likewise. * NEWS: Mention the new feature. include * dis-asm.h (arc_get_disassembler): Correct declaration. * arc-reloc.def: Macro file with definition of all relocation types. * arc.h: Changed macros for the newly supported ARC cpus. Altered enum defining the supported relocations. * common.h: Changed EM_ARC_A5 definition to EM_ARC_COMPACT. Added macro for EM_ARC_COMPACT2. * arc-func.h: New file. * arc.h: Likewise.
2015-10-07 15:20:19 +02:00
test "${ARC_ENDIAN}" == "big" && OUTPUT_FORMAT=${BIG_OUTPUT_FORMAT}
if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHINE}; fi
test -z "${ELFSIZE}" && ELFSIZE=32
test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8"
test "$LD_FLAG" = "N" && DATA_ADDR=.
ld whitespace fixes * pe-dll.c: Formatting, whitespace fixes. * NEWS: Whitespace fixes. * configure.ac: Likewise. * configure.tgt: Likewise. * deffilep.y: Likewise. * genscripts.sh: Likewise. * ld.texinfo: Likewise. * ldgram.y: Likewise. * ldlang.c: Likewise. * ldlex.l: Likewise. * lexsup.c: Likewise. * plugin.c: Likewise. * emulparams/arc-endianness.sh: Likewise. * emulparams/elf32_x86_64.sh: Likewise. * emulparams/elf64mmix.sh: Likewise. * emulparams/elf_x86_64.sh: Likewise. * emulparams/h8300elf.sh: Likewise. * emulparams/h8300elf_linux.sh: Likewise. * emulparams/vxworks.sh: Likewise. * emultempl/aarch64elf.em: Likewise. * emultempl/aix.em: Likewise. * emultempl/armelf.em: Likewise. * emultempl/avrelf.em: Likewise. * emultempl/beos.em: Likewise. * emultempl/hppaelf.em: Likewise. * emultempl/m68kcoff.em: Likewise. * emultempl/m68kelf.em: Likewise. * emultempl/metagelf.em: Likewise. * emultempl/msp430.em: Likewise. * emultempl/nds32elf.em: Likewise. * emultempl/pe.em: Likewise. * emultempl/pep.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/sh64elf.em: Likewise. * emultempl/spu_ovl.S: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/tic6xdsbt.em: Likewise. * emultempl/ticoff.em: Likewise. * emultempl/vms.em: Likewise. * po/Make-in: Likewise. * scripttempl/DWARF.sc: Likewise. * scripttempl/aix.sc: Likewise. * scripttempl/alpha.sc: Likewise. * scripttempl/alphavms.sc: Likewise. * scripttempl/aout.sc: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/armaout.sc: Likewise. * scripttempl/armbpabi.sc: Likewise. * scripttempl/armcoff.sc: Likewise. * scripttempl/avr.sc: Likewise. * scripttempl/crisaout.sc: Likewise. * scripttempl/delta68.sc: Likewise. * scripttempl/dlx.sc: Likewise. * scripttempl/elf.sc: Likewise. * scripttempl/elf32cr16.sc: Likewise. * scripttempl/elf32cr16c.sc: Likewise. * scripttempl/elf32crx.sc: Likewise. * scripttempl/elf32msp430.sc: Likewise. * scripttempl/elf32msp430_3.sc: Likewise. * scripttempl/elf32sh-symbian.sc: Likewise. * scripttempl/elf32xc16x.sc: Likewise. * scripttempl/elf32xc16xl.sc: Likewise. * scripttempl/elf32xc16xs.sc: Likewise. * scripttempl/elf64hppa.sc: Likewise. * scripttempl/elf_chaos.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise. * scripttempl/elfd10v.sc: Likewise. * scripttempl/elfd30v.sc: Likewise. * scripttempl/elfi370.sc: Likewise. * scripttempl/elfm68hc11.sc: Likewise. * scripttempl/elfm68hc12.sc: Likewise. * scripttempl/elfmicroblaze.sc: Likewise. * scripttempl/elfxgate.sc: Likewise. * scripttempl/elfxtensa.sc: Likewise. * scripttempl/epiphany_4x4.sc: Likewise. * scripttempl/epocpe.sc: Likewise. * scripttempl/h8300.sc: Likewise. * scripttempl/h8300h.sc: Likewise. * scripttempl/h8300hn.sc: Likewise. * scripttempl/h8300s.sc: Likewise. * scripttempl/h8300sn.sc: Likewise. * scripttempl/h8300sx.sc: Likewise. * scripttempl/h8300sxn.sc: Likewise. * scripttempl/h8500.sc: Likewise. * scripttempl/h8500b.sc: Likewise. * scripttempl/h8500c.sc: Likewise. * scripttempl/h8500m.sc: Likewise. * scripttempl/h8500s.sc: Likewise. * scripttempl/hppaelf.sc: Likewise. * scripttempl/i386beos.sc: Likewise. * scripttempl/i386coff.sc: Likewise. * scripttempl/i386go32.sc: Likewise. * scripttempl/i386msdos.sc: Likewise. * scripttempl/i860coff.sc: Likewise. * scripttempl/i960.sc: Likewise. * scripttempl/ia64vms.sc: Likewise. * scripttempl/ip2k.sc: Likewise. * scripttempl/iq2000.sc: Likewise. * scripttempl/m68kaux.sc: Likewise. * scripttempl/m68kcoff.sc: Likewise. * scripttempl/m88kbcs.sc: Likewise. * scripttempl/mcorepe.sc: Likewise. * scripttempl/mep.sc: Likewise. * scripttempl/mips.sc: Likewise. * scripttempl/mipsbsd.sc: Likewise. * scripttempl/mmo.sc: Likewise. * scripttempl/moxie.sc: Likewise. * scripttempl/nds32elf.sc: Likewise. * scripttempl/nw.sc: Likewise. * scripttempl/pe.sc: Likewise. * scripttempl/pep.sc: Likewise. * scripttempl/pj.sc: Likewise. * scripttempl/ppcpe.sc: Likewise. * scripttempl/psos.sc: Likewise. * scripttempl/riscix.sc: Likewise. * scripttempl/sh.sc: Likewise. * scripttempl/sparccoff.sc: Likewise. * scripttempl/st2000.sc: Likewise. * scripttempl/tic30aout.sc: Likewise. * scripttempl/tic30coff.sc: Likewise. * scripttempl/tic4xcoff.sc: Likewise. * scripttempl/tic54xcoff.sc: Likewise. * scripttempl/tic80coff.sc: Likewise. * scripttempl/v850.sc: Likewise. * scripttempl/v850_rh850.sc: Likewise. * scripttempl/vanilla.sc: Likewise. * scripttempl/visium.sc: Likewise. * scripttempl/w65.sc: Likewise. * scripttempl/xstormy16.sc: Likewise. * scripttempl/z80.sc: Likewise. * scripttempl/z8000.sc: Likewise. * configure: Regenerate.
2017-10-12 12:58:30 +02:00
CTOR=".ctors ${CONSTRUCTING-0} :
New ARC implementation. bfd * archures.c: Remove support for older ARC. Added support for new ARC cpus (ARC600, ARC601, ARC700, ARCV2). * bfd-in2.h: Likewise. * config.bfd: Likewise. * cpu-arc.c: Likewise. * elf32-arc.c: Totally changed file with a refactored inplementation of the ARC port. * libbfd.h: Added ARC specific relocation types. * reloc.c: Likewise. gas * config/tc-arc.c: Revamped file for ARC support. * config/tc-arc.h: Likewise. * doc/as.texinfo: Add new ARC options. * doc/c-arc.texi: Likewise. ld * configure.tgt: Added target arc-*-elf* and arc*-*-linux-uclibc*. * emulparams/arcebelf_prof.sh: New file * emulparams/arcebelf.sh: Likewise. * emulparams/arceblinux_prof.sh: Likewise. * emulparams/arceblinux.sh: Likewise. * emulparams/arcelf_prof.sh: Likewise. * emulparams/arcelf.sh: Likewise. * emulparams/arclinux_prof.sh: Likewise. * emulparams/arclinux.sh: Likewise. * emulparams/arcv2elfx.sh: Likewise. * emulparams/arcv2elf.sh: Likewise. * emultempl/arclinux.em: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise * Makefile.am: Add new ARC emulations. * Makefile.in: Regenerate. * NEWS: Mention the new feature. opcodes * arc-dis.c: Revamped file for ARC support * arc-dis.h: Likewise. * arc-ext.c: Likewise. * arc-ext.h: Likewise. * arc-opc.c: Likewise. * arc-fxi.h: New file. * arc-regs.h: Likewise. * arc-tbl.h: Likewise. binutils * readelf.c (get_machine_name): Remove A5 reference. Add ARCompact and ARCv2. (get_machine_flags): Handle EM_ARCV2 and EM_ARCOMPACT. (guess_is_rela): Likewise. (dump_relocations): Likewise. (is_32bit_abs_reloc): Likewise. (is_16bit_abs_reloc): Likewise. (is_none_reloc): Likewise. * NEWS: Mention the new feature. include * dis-asm.h (arc_get_disassembler): Correct declaration. * arc-reloc.def: Macro file with definition of all relocation types. * arc.h: Changed macros for the newly supported ARC cpus. Altered enum defining the supported relocations. * common.h: Changed EM_ARC_A5 definition to EM_ARC_COMPACT. Added macro for EM_ARC_COMPACT2. * arc-func.h: New file. * arc.h: Likewise.
2015-10-07 15:20:19 +02:00
{
${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of
the constructors, so we make sure it is
first. Because this is a wildcard, it
doesn't matter if the user does not
actually link against crtbegin.o; the
linker won't look for a file to match a
wildcard. The wildcard also means that it
doesn't matter which directory crtbegin.o
is in. */
KEEP (*crtbegin*.o(.ctors))
/* We don't want to include the .ctor section from
from the crtend.o file until after the sorted ctors.
The .ctor section from the crtend file contains the
end of ctors marker and it must be last */
KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
${CONSTRUCTING+${CTOR_END}}
} ${RELOCATING+ > ${DATA_MEMORY}}"
DTOR=".dtors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${DTOR_START}}
KEEP (*crtbegin*.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend*.o $OTHER_EXCLUDE_FILES) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
${CONSTRUCTING+${DTOR_END}}
} ${RELOCATING+ > ${DATA_MEMORY}}"
if test -z "${NO_SMALL_DATA}"; then
SBSS=".sbss ${RELOCATING-0} :
{
${RELOCATING+PROVIDE (__sbss_start = .);}
${RELOCATING+PROVIDE (___sbss_start = .);}
*(.dynsbss)
*(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
*(.scommon)
${RELOCATING+PROVIDE (__sbss_end = .);}
${RELOCATING+PROVIDE (___sbss_end = .);}
} ${RELOCATING+ > ${SDATA_MEMORY}}"
SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) } ${RELOCATING+ > ${SDATA_MEMORY}}"
SDATA="/* We want the small data sections together, so single-instruction offsets
can access them all, and initialized data all before uninitialized, so
we can shorten the on-disk segment size. */
.sdata ${RELOCATING-0} :
{
${RELOCATING+${SDATA_START_SYMBOLS}}
*(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
${RELOCATING+_edata = .;}
${RELOCATING+PROVIDE (edata = .);}
} ${RELOCATING+ > ${SDATA_MEMORY}}"
SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) } ${RELOCATING+ > ${SDATA_MEMORY}}"
REL_SDATA=".rel.sdata ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) }
.rela.sdata ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }"
REL_SBSS=".rel.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) }
.rela.sbss ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }"
REL_SDATA2=".rel.sdata2 ${RELOCATING-0} : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) }
.rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }"
REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) }
.rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }"
fi
#
# We provide two emulations: a fixed on that defines some memory banks
# and a configurable one that includes a user provided memory definition.
#
case $GENERIC_BOARD in
yes|1|YES)
MEMORY_DEF="
/* Get memory banks definition from some user configuration file.
This file must be located in some linker directory (search path
with -L<dir>). See fixed memory banks emulation script. */
INCLUDE memory.x;
"
;;
*)
MEMORY_DEF="
/* Fixed definition of the available memory banks.
See generic emulation script for a user defined configuration. */
MEMORY
{
ICCM : ORIGIN = 0x00000000, LENGTH = ${ICCM_SIZE}
DCCM : ORIGIN = ${RAM_START_ADDR}, LENGTH = ${RAM_SIZE}
}
/* Setup the stack on the top of the data memory bank. */
PROVIDE (__stack_top = (${RAM_START_ADDR} + ${RAM_SIZE} - 1) & -4);
PROVIDE (__end_heap = ${RAM_START_ADDR} + ${RAM_SIZE} - 1);
"
;;
esac
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", "${LITTLE_OUTPUT_FORMAT}")
OUTPUT_ARCH(${OUTPUT_ARCH})
${RELOCATING+ENTRY(${ENTRY})}
${RELOCATING+${LIB_SEARCH_DIRS}}
${RELOCATING+${EXECUTABLE_SYMBOLS}}
${RELOCATING+${MEMORY_DEF}}
SECTIONS
{
.ivt 0x00 :
{
KEEP (*(.ivt));
} ${RELOCATING+ > ${STARTUP_MEMORY}}
.startup 0x100:
{
KEEP (*crt0.o(.text.__startup))
} ${RELOCATING+ > ${STARTUP_MEMORY}}
/* Read-only sections, merged into text segment: */
${TEXT_DYNAMIC+${DYNAMIC}}
.hash ${RELOCATING-0} : { *(.hash) }
.dynsym ${RELOCATING-0} : { *(.dynsym) }
.dynstr ${RELOCATING-0} : { *(.dynstr) }
.gnu.version ${RELOCATING-0} : { *(.gnu.version) }
.gnu.version_d ${RELOCATING-0} : { *(.gnu.version_d) }
.gnu.version_r ${RELOCATING-0} : { *(.gnu.version_r) }
.rel.init ${RELOCATING-0} : { *(.rel.init) }
.rela.init ${RELOCATING-0} : { *(.rela.init) }
.rel.text ${RELOCATING-0} : { *(.rel.text${RELOCATING+ .rel.text.* .rel.gnu.linkonce.t.*}) }
.rela.text ${RELOCATING-0} : { *(.rela.text${RELOCATING+ .rela.text.* .rela.gnu.linkonce.t.*}) }
.rel.fini ${RELOCATING-0} : { *(.rel.fini) }
.rela.fini ${RELOCATING-0} : { *(.rela.fini) }
.rel.rodata ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
.rela.rodata ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .rela.gnu.linkonce.r.*}) }
.rel.data ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
.rela.data ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .rela.gnu.linkonce.d.*}) }
.rel.tdata ${RELOCATING-0} : { *(.rel.tdata${RELOCATING+ .rel.tdata.* .rel.gnu.linkonce.td.*}) }
.rela.tdata ${RELOCATING-0} : { *(.rela.tdata${RELOCATING+ .rela.tdata.* .rela.gnu.linkonce.td.*}) }
.rel.tbss ${RELOCATING-0} : { *(.rel.tbss${RELOCATING+ .rel.tbss.* .rel.gnu.linkonce.tb.*}) }
.rela.tbss ${RELOCATING-0} : { *(.rela.tbss${RELOCATING+ .rela.tbss.* .rela.gnu.linkonce.tb.*}) }
.rel.ctors ${RELOCATING-0} : { *(.rel.ctors) }
.rela.ctors ${RELOCATING-0} : { *(.rela.ctors) }
.rel.dtors ${RELOCATING-0} : { *(.rel.dtors) }
.rela.dtors ${RELOCATING-0} : { *(.rela.dtors) }
.rel.got ${RELOCATING-0} : { *(.rel.got) }
.rela.got ${RELOCATING-0} : { *(.rela.got) }
${REL_SDATA}
${REL_SBSS}
${REL_SDATA2}
${REL_SBSS2}
.rel.bss ${RELOCATING-0} : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) }
.rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
.jcr : { KEEP (*(.jcr)) } ${RELOCATING+> ${TEXT_MEMORY}}
.eh_frame : { KEEP (*(.eh_frame)) } ${RELOCATING+> ${TEXT_MEMORY}}
ELF ld -r scripts "ld -r" generally should not combine object file sections with different names. For example, "ld -r" should not combine ".text", ".text.hot" and ".text.cold" into an output ".text" section. An exception needs to be made for linker created sections, for example, branch trampoline sections that might be created even for ld -r. "ld -r" also should not define symbols in linker scripts. Any definitions are likely to conflict with those defined at final link. A MEMORY spec is also not needed for ld -r. * Makefile.am (eelf32btsmip_fbsd.c, eelf32btsmipn32_fbsd.c), (eelf32epiphany.c, eelf32epiphany_4x4.c, eelf32ltsmip_fbsd.c), (eelf32ltsmipn32_fbsd.c, eelf32xc16x.c, eelf32xc16xl.c), (eelf32xc16xs.c, emcorepe.c, enios2elf.c, enios2linux.c), (eelf64btsmip_fbsd.c, eelf64ltsmip_fbsd.c): Correct dependencies. * Makefile.in: Regenerate. * emulparams/aarch64cloudabi.sh, * emulparams/aarch64fbsd.sh, * emulparams/aarch64linux.sh, * emulparams/aarch64linux32.sh, * emulparams/arc-nps.sh, * emulparams/elf32_spu.sh, * emulparams/elf32_tic6x_le.sh, * emulparams/elf32bmip.sh, * emulparams/elf32btsmipn32.sh, * emulparams/elf32lr5900n32.sh, * emulparams/elf32mep.sh, * emulparams/elf32metag.sh, * emulparams/elf64btsmip.sh, * emulparams/shelf_vxworks.sh, * emulparams/shlelf_fd.sh, * scripttempl/DWARF.sc, * scripttempl/alpha.sc, * scripttempl/alphavms.sc, * scripttempl/arclinux.sc, * scripttempl/armbpabi.sc, * scripttempl/avr.sc, * scripttempl/dlx.sc, * scripttempl/elf.sc, * scripttempl/elf32cr16.sc, * scripttempl/elf32cr16c.sc, * scripttempl/elf32crx.sc, * scripttempl/elf32msp430.sc, * scripttempl/elf32msp430_3.sc, * scripttempl/elf32xc16x.sc, * scripttempl/elf32xc16xl.sc, * scripttempl/elf32xc16xs.sc, * scripttempl/elf64hppa.sc, * scripttempl/elf_chaos.sc, * scripttempl/elfarc.sc, * scripttempl/elfarcv2.sc, * scripttempl/elfd10v.sc, * scripttempl/elfd30v.sc, * scripttempl/elfm68hc11.sc, * scripttempl/elfm68hc12.sc, * scripttempl/elfm9s12z.sc, * scripttempl/elfmicroblaze.sc, * scripttempl/elfxgate.sc, * scripttempl/elfxtensa.sc, * scripttempl/epiphany_4x4.sc, * scripttempl/ft32.sc, * scripttempl/hppaelf.sc, * scripttempl/ia64vms.sc, * scripttempl/ip2k.sc, * scripttempl/iq2000.sc, * scripttempl/mep.sc, * scripttempl/mmo.sc, * scripttempl/nds32elf.sc, * scripttempl/pru.sc, * scripttempl/sh.sc, * scripttempl/v850.sc, * scripttempl/v850_rh850.sc, * scripttempl/visium.sc, * scripttempl/xstormy16.sc: Condition various parts of scripts on ${RELOCATABLE} in order to prevent ld -r merging sections or defining symbols. Remove MEMORY and VERSION definitions from ld -r scripts too. * testsuite/ld-elf/group2.d, * testsuite/ld-elf/group4.d, * testsuite/ld-elf/group5.d, * testsuite/ld-elf/group6.d, * testsuite/ld-elf/group7.d, * testsuite/ld-elf/group8a.d, * testsuite/ld-elf/group8b.d, * testsuite/ld-elf/group9a.d, * testsuite/ld-elf/group9b.d, * testsuite/ld-elf/pr17550a.d, * testsuite/ld-elf/pr17550b.d, * testsuite/ld-elf/pr17550d.d: Don't xfail cr16 and crx. * testsuite/ld-elf/init-fini-arrays.d, * testsuite/ld-elf/pr22677.d: Likewise, and dont' xfail mep.
2018-10-12 03:36:40 +02:00
.gcc_except_table : { *(.gcc_except_table${RELOCATING+ .gcc_except_table.*}) } ${RELOCATING+> ${TEXT_MEMORY}}
New ARC implementation. bfd * archures.c: Remove support for older ARC. Added support for new ARC cpus (ARC600, ARC601, ARC700, ARCV2). * bfd-in2.h: Likewise. * config.bfd: Likewise. * cpu-arc.c: Likewise. * elf32-arc.c: Totally changed file with a refactored inplementation of the ARC port. * libbfd.h: Added ARC specific relocation types. * reloc.c: Likewise. gas * config/tc-arc.c: Revamped file for ARC support. * config/tc-arc.h: Likewise. * doc/as.texinfo: Add new ARC options. * doc/c-arc.texi: Likewise. ld * configure.tgt: Added target arc-*-elf* and arc*-*-linux-uclibc*. * emulparams/arcebelf_prof.sh: New file * emulparams/arcebelf.sh: Likewise. * emulparams/arceblinux_prof.sh: Likewise. * emulparams/arceblinux.sh: Likewise. * emulparams/arcelf_prof.sh: Likewise. * emulparams/arcelf.sh: Likewise. * emulparams/arclinux_prof.sh: Likewise. * emulparams/arclinux.sh: Likewise. * emulparams/arcv2elfx.sh: Likewise. * emulparams/arcv2elf.sh: Likewise. * emultempl/arclinux.em: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise * Makefile.am: Add new ARC emulations. * Makefile.in: Regenerate. * NEWS: Mention the new feature. opcodes * arc-dis.c: Revamped file for ARC support * arc-dis.h: Likewise. * arc-ext.c: Likewise. * arc-ext.h: Likewise. * arc-opc.c: Likewise. * arc-fxi.h: New file. * arc-regs.h: Likewise. * arc-tbl.h: Likewise. binutils * readelf.c (get_machine_name): Remove A5 reference. Add ARCompact and ARCv2. (get_machine_flags): Handle EM_ARCV2 and EM_ARCOMPACT. (guess_is_rela): Likewise. (dump_relocations): Likewise. (is_32bit_abs_reloc): Likewise. (is_16bit_abs_reloc): Likewise. (is_none_reloc): Likewise. * NEWS: Mention the new feature. include * dis-asm.h (arc_get_disassembler): Correct declaration. * arc-reloc.def: Macro file with definition of all relocation types. * arc.h: Changed macros for the newly supported ARC cpus. Altered enum defining the supported relocations. * common.h: Changed EM_ARC_A5 definition to EM_ARC_COMPACT. Added macro for EM_ARC_COMPACT2. * arc-func.h: New file. * arc.h: Likewise.
2015-10-07 15:20:19 +02:00
.plt : { *(.plt) } ${RELOCATING+> ${TEXT_MEMORY}}
[ARC] Add JLI support. The following relocation types were added to GCC/binutils: ARC_JLI_SECTOFF is a relocation type in Metaware that is now used by GCC as well to adjust the index of function calls to functions with attribute jli_call_always. bfd/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elf32-arc.c (JLI): Define. * reloc.c: Add JLI relocations. gas/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/gas/arc/jli-1.d: New file. * testsuite/gas/arc/jli-1.s: Likewise. * testsuite/gas/arc/taux.d: Update for jli_base. include/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * elf/arc-reloc.def: Add JLI relocs howto. * opcode/arc-func.h (replace_jli): New function. ld/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * emulparams/arcelf.sh (JLI_START_TABLE): Define. * scripttempl/elfarc.sc: Handle jlitab section. * scripttempl/elfarcv2.sc: Likewise. * testsuite/ld-arc/arc.exp: Add JLI test. * testsuite/ld-arc/jli-script.ld: New file. * testsuite/ld-arc/jli-simple.dd: Likewise. * testsuite/ld-arc/jli-simple.rd: Likewise. * testsuite/ld-arc/jli-simple.s: Likewise. * testsuite/ld/testsuite/ld-arc/jli-overflow.s: Likewise. * testsuite/ld/testsuite/ld-arc/jli-overflow.d: Likewise. * testsuite/ld/testsuite/ld-arc/jli-overflow.err: Likewise. opcode/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * arc-opc.c (UIMM10_6_S_JLIOFF): Define. (UIMM3_23): Adjust accordingly. * arc-regs.h: Add/correct jli_base register. * arc-tbl.h (jli_s): Likewise.
2017-07-19 09:56:55 +02:00
.jlitab :
{
${RELOCATING+${JLI_START_TABLE}}
ELF ld -r scripts "ld -r" generally should not combine object file sections with different names. For example, "ld -r" should not combine ".text", ".text.hot" and ".text.cold" into an output ".text" section. An exception needs to be made for linker created sections, for example, branch trampoline sections that might be created even for ld -r. "ld -r" also should not define symbols in linker scripts. Any definitions are likely to conflict with those defined at final link. A MEMORY spec is also not needed for ld -r. * Makefile.am (eelf32btsmip_fbsd.c, eelf32btsmipn32_fbsd.c), (eelf32epiphany.c, eelf32epiphany_4x4.c, eelf32ltsmip_fbsd.c), (eelf32ltsmipn32_fbsd.c, eelf32xc16x.c, eelf32xc16xl.c), (eelf32xc16xs.c, emcorepe.c, enios2elf.c, enios2linux.c), (eelf64btsmip_fbsd.c, eelf64ltsmip_fbsd.c): Correct dependencies. * Makefile.in: Regenerate. * emulparams/aarch64cloudabi.sh, * emulparams/aarch64fbsd.sh, * emulparams/aarch64linux.sh, * emulparams/aarch64linux32.sh, * emulparams/arc-nps.sh, * emulparams/elf32_spu.sh, * emulparams/elf32_tic6x_le.sh, * emulparams/elf32bmip.sh, * emulparams/elf32btsmipn32.sh, * emulparams/elf32lr5900n32.sh, * emulparams/elf32mep.sh, * emulparams/elf32metag.sh, * emulparams/elf64btsmip.sh, * emulparams/shelf_vxworks.sh, * emulparams/shlelf_fd.sh, * scripttempl/DWARF.sc, * scripttempl/alpha.sc, * scripttempl/alphavms.sc, * scripttempl/arclinux.sc, * scripttempl/armbpabi.sc, * scripttempl/avr.sc, * scripttempl/dlx.sc, * scripttempl/elf.sc, * scripttempl/elf32cr16.sc, * scripttempl/elf32cr16c.sc, * scripttempl/elf32crx.sc, * scripttempl/elf32msp430.sc, * scripttempl/elf32msp430_3.sc, * scripttempl/elf32xc16x.sc, * scripttempl/elf32xc16xl.sc, * scripttempl/elf32xc16xs.sc, * scripttempl/elf64hppa.sc, * scripttempl/elf_chaos.sc, * scripttempl/elfarc.sc, * scripttempl/elfarcv2.sc, * scripttempl/elfd10v.sc, * scripttempl/elfd30v.sc, * scripttempl/elfm68hc11.sc, * scripttempl/elfm68hc12.sc, * scripttempl/elfm9s12z.sc, * scripttempl/elfmicroblaze.sc, * scripttempl/elfxgate.sc, * scripttempl/elfxtensa.sc, * scripttempl/epiphany_4x4.sc, * scripttempl/ft32.sc, * scripttempl/hppaelf.sc, * scripttempl/ia64vms.sc, * scripttempl/ip2k.sc, * scripttempl/iq2000.sc, * scripttempl/mep.sc, * scripttempl/mmo.sc, * scripttempl/nds32elf.sc, * scripttempl/pru.sc, * scripttempl/sh.sc, * scripttempl/v850.sc, * scripttempl/v850_rh850.sc, * scripttempl/visium.sc, * scripttempl/xstormy16.sc: Condition various parts of scripts on ${RELOCATABLE} in order to prevent ld -r merging sections or defining symbols. Remove MEMORY and VERSION definitions from ld -r scripts too. * testsuite/ld-elf/group2.d, * testsuite/ld-elf/group4.d, * testsuite/ld-elf/group5.d, * testsuite/ld-elf/group6.d, * testsuite/ld-elf/group7.d, * testsuite/ld-elf/group8a.d, * testsuite/ld-elf/group8b.d, * testsuite/ld-elf/group9a.d, * testsuite/ld-elf/group9b.d, * testsuite/ld-elf/pr17550a.d, * testsuite/ld-elf/pr17550b.d, * testsuite/ld-elf/pr17550d.d: Don't xfail cr16 and crx. * testsuite/ld-elf/init-fini-arrays.d, * testsuite/ld-elf/pr22677.d: Likewise, and dont' xfail mep.
2018-10-12 03:36:40 +02:00
${RELOCATING+jlitab*.o:(.jlitab*)}
*(.jlitab${RELOCATING+*})
[ARC] Add JLI support. The following relocation types were added to GCC/binutils: ARC_JLI_SECTOFF is a relocation type in Metaware that is now used by GCC as well to adjust the index of function calls to functions with attribute jli_call_always. bfd/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elf32-arc.c (JLI): Define. * reloc.c: Add JLI relocations. gas/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> * testsuite/gas/arc/jli-1.d: New file. * testsuite/gas/arc/jli-1.s: Likewise. * testsuite/gas/arc/taux.d: Update for jli_base. include/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * elf/arc-reloc.def: Add JLI relocs howto. * opcode/arc-func.h (replace_jli): New function. ld/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * emulparams/arcelf.sh (JLI_START_TABLE): Define. * scripttempl/elfarc.sc: Handle jlitab section. * scripttempl/elfarcv2.sc: Likewise. * testsuite/ld-arc/arc.exp: Add JLI test. * testsuite/ld-arc/jli-script.ld: New file. * testsuite/ld-arc/jli-simple.dd: Likewise. * testsuite/ld-arc/jli-simple.rd: Likewise. * testsuite/ld-arc/jli-simple.s: Likewise. * testsuite/ld/testsuite/ld-arc/jli-overflow.s: Likewise. * testsuite/ld/testsuite/ld-arc/jli-overflow.d: Likewise. * testsuite/ld/testsuite/ld-arc/jli-overflow.err: Likewise. opcode/ 2017-07-19 Claudiu Zissulescu <claziss@synopsys.com> John Eric Martin <John.Martin@emmicro-us.com> * arc-opc.c (UIMM10_6_S_JLIOFF): Define. (UIMM3_23): Adjust accordingly. * arc-regs.h: Add/correct jli_base register. * arc-tbl.h (jli_s): Likewise.
2017-07-19 09:56:55 +02:00
} ${RELOCATING+> ${TEXT_MEMORY}}
New ARC implementation. bfd * archures.c: Remove support for older ARC. Added support for new ARC cpus (ARC600, ARC601, ARC700, ARCV2). * bfd-in2.h: Likewise. * config.bfd: Likewise. * cpu-arc.c: Likewise. * elf32-arc.c: Totally changed file with a refactored inplementation of the ARC port. * libbfd.h: Added ARC specific relocation types. * reloc.c: Likewise. gas * config/tc-arc.c: Revamped file for ARC support. * config/tc-arc.h: Likewise. * doc/as.texinfo: Add new ARC options. * doc/c-arc.texi: Likewise. ld * configure.tgt: Added target arc-*-elf* and arc*-*-linux-uclibc*. * emulparams/arcebelf_prof.sh: New file * emulparams/arcebelf.sh: Likewise. * emulparams/arceblinux_prof.sh: Likewise. * emulparams/arceblinux.sh: Likewise. * emulparams/arcelf_prof.sh: Likewise. * emulparams/arcelf.sh: Likewise. * emulparams/arclinux_prof.sh: Likewise. * emulparams/arclinux.sh: Likewise. * emulparams/arcv2elfx.sh: Likewise. * emulparams/arcv2elf.sh: Likewise. * emultempl/arclinux.em: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise * Makefile.am: Add new ARC emulations. * Makefile.in: Regenerate. * NEWS: Mention the new feature. opcodes * arc-dis.c: Revamped file for ARC support * arc-dis.h: Likewise. * arc-ext.c: Likewise. * arc-ext.h: Likewise. * arc-opc.c: Likewise. * arc-fxi.h: New file. * arc-regs.h: Likewise. * arc-tbl.h: Likewise. binutils * readelf.c (get_machine_name): Remove A5 reference. Add ARCompact and ARCv2. (get_machine_flags): Handle EM_ARCV2 and EM_ARCOMPACT. (guess_is_rela): Likewise. (dump_relocations): Likewise. (is_32bit_abs_reloc): Likewise. (is_16bit_abs_reloc): Likewise. (is_none_reloc): Likewise. * NEWS: Mention the new feature. include * dis-asm.h (arc_get_disassembler): Correct declaration. * arc-reloc.def: Macro file with definition of all relocation types. * arc.h: Changed macros for the newly supported ARC cpus. Altered enum defining the supported relocations. * common.h: Changed EM_ARC_A5 definition to EM_ARC_COMPACT. Added macro for EM_ARC_COMPACT2. * arc-func.h: New file. * arc.h: Likewise.
2015-10-07 15:20:19 +02:00
.rodata ${RELOCATING-0} :
{
*(.rodata) ${RELOCATING+*(.rodata.*)} ${RELOCATING+*(.gnu.linkonce.r.*)}
} ${RELOCATING+> ${TEXT_MEMORY}}
.rodata1 ${RELOCATING-0} : { *(.rodata1) } ${RELOCATING+> ${TEXT_MEMORY}}
.init ${RELOCATING-0} :
{
${RELOCATING+${INIT_START}}
Add SORT_NONE to .init and .fini in scripts The special case for .init and .fini in update_wild_statements is ineffective for .init or .fini wildcards inside other output sections. The special case needs to be on the wildcard, not the output section. This patch is belt and braces, both fixing update_wild_statements and the scripts. * scripttempl/alpha.sc, * scripttempl/armbpabi.sc, * scripttempl/crisaout.sc, * scripttempl/elf32cr16.sc, * scripttempl/elf32crx.sc, * scripttempl/elf32xc16x.sc, * scripttempl/elf32xc16xl.sc, * scripttempl/elf32xc16xs.sc, * scripttempl/elf64hppa.sc, * scripttempl/elf_chaos.sc, * scripttempl/elfarc.sc, * scripttempl/elfarcv2.sc, * scripttempl/elfd30v.sc, * scripttempl/elfm68hc11.sc, * scripttempl/elfm68hc12.sc, * scripttempl/elfm9s12z.sc, * scripttempl/elfmicroblaze.sc, * scripttempl/elfxgate.sc, * scripttempl/elfxtensa.sc, * scripttempl/epiphany_4x4.sc, * scripttempl/ft32.sc, * scripttempl/i386beos.sc, * scripttempl/iq2000.sc, * scripttempl/mcorepe.sc, * scripttempl/mep.sc, * scripttempl/mips.sc, * scripttempl/moxie.sc, * scripttempl/pe.sc, * scripttempl/pep.sc, * scripttempl/ppcpe.sc, * scripttempl/tic4xcoff.sc, * scripttempl/tic80coff.sc, * scripttempl/v850.sc, * scripttempl/v850_rh850.sc, * scripttempl/visium.sc, * scripttempl/xstormy16.sc: Add KEEP and SORT_NONE to .init and .fini wildcards. * scripttempl/elf32xc16x.sc, * scripttempl/elf32xc16xl.sc, * scripttempl/elf32xc16xs.sc: Add .fini wildcard. * scripttempl/elf_chaos.sc: Add .init output section. * scripttempl/elfd30v.sc: Remove duplicate .init. * scripttempl/elfm68hc11.sc, * scripttempl/elfm68hc12.sc, * scripttempl/elfm9s12z.sc, * scripttempl/elfxgate.sc: Remove duplicate .init, and add .fini wildcard. * scripttempl/ppcpe.sc (INIT, FINI): Delete. * ldlang.c (update_wild_statements): Special case .init and .fini in the wildcard, not the output section.
2019-03-21 05:28:35 +01:00
KEEP (*(SORT_NONE(.init)))
New ARC implementation. bfd * archures.c: Remove support for older ARC. Added support for new ARC cpus (ARC600, ARC601, ARC700, ARCV2). * bfd-in2.h: Likewise. * config.bfd: Likewise. * cpu-arc.c: Likewise. * elf32-arc.c: Totally changed file with a refactored inplementation of the ARC port. * libbfd.h: Added ARC specific relocation types. * reloc.c: Likewise. gas * config/tc-arc.c: Revamped file for ARC support. * config/tc-arc.h: Likewise. * doc/as.texinfo: Add new ARC options. * doc/c-arc.texi: Likewise. ld * configure.tgt: Added target arc-*-elf* and arc*-*-linux-uclibc*. * emulparams/arcebelf_prof.sh: New file * emulparams/arcebelf.sh: Likewise. * emulparams/arceblinux_prof.sh: Likewise. * emulparams/arceblinux.sh: Likewise. * emulparams/arcelf_prof.sh: Likewise. * emulparams/arcelf.sh: Likewise. * emulparams/arclinux_prof.sh: Likewise. * emulparams/arclinux.sh: Likewise. * emulparams/arcv2elfx.sh: Likewise. * emulparams/arcv2elf.sh: Likewise. * emultempl/arclinux.em: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise * Makefile.am: Add new ARC emulations. * Makefile.in: Regenerate. * NEWS: Mention the new feature. opcodes * arc-dis.c: Revamped file for ARC support * arc-dis.h: Likewise. * arc-ext.c: Likewise. * arc-ext.h: Likewise. * arc-opc.c: Likewise. * arc-fxi.h: New file. * arc-regs.h: Likewise. * arc-tbl.h: Likewise. binutils * readelf.c (get_machine_name): Remove A5 reference. Add ARCompact and ARCv2. (get_machine_flags): Handle EM_ARCV2 and EM_ARCOMPACT. (guess_is_rela): Likewise. (dump_relocations): Likewise. (is_32bit_abs_reloc): Likewise. (is_16bit_abs_reloc): Likewise. (is_none_reloc): Likewise. * NEWS: Mention the new feature. include * dis-asm.h (arc_get_disassembler): Correct declaration. * arc-reloc.def: Macro file with definition of all relocation types. * arc.h: Changed macros for the newly supported ARC cpus. Altered enum defining the supported relocations. * common.h: Changed EM_ARC_A5 definition to EM_ARC_COMPACT. Added macro for EM_ARC_COMPACT2. * arc-func.h: New file. * arc.h: Likewise.
2015-10-07 15:20:19 +02:00
${RELOCATING+${INIT_END}}
} ${RELOCATING+ > ${TEXT_MEMORY}} =${NOP-0}
.text ${RELOCATING-0} :
{
${RELOCATING+${TEXT_START_SYMBOLS}}
*(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
Rename elf32.em to elf.em * emultempl/elf32.em: Remove "misnamed" comment. Rename to.. * emultempl/elf.em: ..this. * configure.ac (elf_list_options): Adjust TEMPLATE_NAME grep. * emulparams/aarch64cloudabi.sh (TEMPLATE_NAME): Set to elf. * emulparams/aarch64elf.sh: Likewise. * emulparams/aarch64elf32.sh: Likewise. * emulparams/aarch64fbsd.sh: Likewise. * emulparams/aarch64linux.sh: Likewise. * emulparams/aarch64linux32.sh: Likewise. * emulparams/arcelf.sh: Likewise. * emulparams/arcelf_prof.sh: Likewise. * emulparams/arclinux.sh: Likewise. * emulparams/arclinux_prof.sh: Likewise. * emulparams/arcv2elf.sh: Likewise. * emulparams/arcv2elfx.sh: Likewise. * emulparams/armelf.sh: Likewise. * emulparams/armelf_fuchsia.sh: Likewise. * emulparams/armelf_linux.sh: Likewise. * emulparams/armelf_phoenix.sh: Likewise. * emulparams/armnto.sh: Likewise. * emulparams/avr1.sh: Likewise. * emulparams/avr2.sh: Likewise. * emulparams/avr25.sh: Likewise. * emulparams/avr3.sh: Likewise. * emulparams/avr31.sh: Likewise. * emulparams/avr35.sh: Likewise. * emulparams/avr4.sh: Likewise. * emulparams/avr5.sh: Likewise. * emulparams/avr51.sh: Likewise. * emulparams/avr6.sh: Likewise. * emulparams/avrtiny.sh: Likewise. * emulparams/avrxmega1.sh: Likewise. * emulparams/avrxmega2.sh: Likewise. * emulparams/avrxmega3.sh: Likewise. * emulparams/avrxmega4.sh: Likewise. * emulparams/avrxmega5.sh: Likewise. * emulparams/avrxmega6.sh: Likewise. * emulparams/avrxmega7.sh: Likewise. * emulparams/criself.sh: Likewise. * emulparams/crislinux.sh: Likewise. * emulparams/cskyelf.sh: Likewise. * emulparams/d10velf.sh: Likewise. * emulparams/elf32_sparc.sh: Likewise. * emulparams/elf32_spu.sh: Likewise. * emulparams/elf32_tic6x_le.sh: Likewise. * emulparams/elf32_x86_64.sh: Likewise. * emulparams/elf32am33lin.sh: Likewise. * emulparams/elf32bfin.sh: Likewise. * emulparams/elf32bfinfd.sh: Likewise. * emulparams/elf32bmip.sh: Likewise. * emulparams/elf32bmipn32-defs.sh: Likewise. * emulparams/elf32cr16.sh: Likewise. * emulparams/elf32cr16c.sh: Likewise. * emulparams/elf32crx.sh: Likewise. * emulparams/elf32epiphany.sh: Likewise. * emulparams/elf32epiphany_4x4.sh: Likewise. * emulparams/elf32frvfd.sh: Likewise. * emulparams/elf32ip2k.sh: Likewise. * emulparams/elf32lm32.sh: Likewise. * emulparams/elf32lm32fd.sh: Likewise. * emulparams/elf32lriscv-defs.sh: Likewise. * emulparams/elf32m32c.sh: Likewise. * emulparams/elf32mb_linux.sh: Likewise. * emulparams/elf32mbel_linux.sh: Likewise. * emulparams/elf32mcore.sh: Likewise. * emulparams/elf32mep.sh: Likewise. * emulparams/elf32metag.sh: Likewise. * emulparams/elf32microblaze.sh: Likewise. * emulparams/elf32mipswindiss.sh: Likewise. * emulparams/elf32or1k.sh: Likewise. * emulparams/elf32ppccommon.sh: Likewise. * emulparams/elf32rl78.sh: Likewise. * emulparams/elf32rx.sh: Likewise. * emulparams/elf32tilegx.sh: Likewise. * emulparams/elf32tilepro.sh: Likewise. * emulparams/elf32vax.sh: Likewise. * emulparams/elf32visium.sh: Likewise. * emulparams/elf32xc16x.sh: Likewise. * emulparams/elf32xc16xl.sh: Likewise. * emulparams/elf32xc16xs.sh: Likewise. * emulparams/elf32xstormy16.sh: Likewise. * emulparams/elf32xtensa.sh: Likewise. * emulparams/elf64_aix.sh: Likewise. * emulparams/elf64_ia64.sh: Likewise. * emulparams/elf64_s390.sh: Likewise. * emulparams/elf64_sparc.sh: Likewise. * emulparams/elf64alpha.sh: Likewise. * emulparams/elf64bpf.sh: Likewise. * emulparams/elf64hppa.sh: Likewise. * emulparams/elf64mmix.sh: Likewise. * emulparams/elf64rdos.sh: Likewise. * emulparams/elf64tilegx.sh: Likewise. * emulparams/elf_i386.sh: Likewise. * emulparams/elf_i386_be.sh: Likewise. * emulparams/elf_i386_ldso.sh: Likewise. * emulparams/elf_i386_vxworks.sh: Likewise. * emulparams/elf_iamcu.sh: Likewise. * emulparams/elf_k1om.sh: Likewise. * emulparams/elf_l1om.sh: Likewise. * emulparams/elf_s390.sh: Likewise. * emulparams/elf_x86_64.sh: Likewise. * emulparams/h8300elf.sh: Likewise. * emulparams/h8300elf_linux.sh: Likewise. * emulparams/hppa64linux.sh: Likewise. * emulparams/hppaelf.sh: Likewise. * emulparams/hppalinux.sh: Likewise. * emulparams/i386lynx.sh: Likewise. * emulparams/i386moss.sh: Likewise. * emulparams/i386nto.sh: Likewise. * emulparams/m32relf.sh: Likewise. * emulparams/m32relf_linux.sh: Likewise. * emulparams/m68hc11elf.sh: Likewise. * emulparams/m68hc11elfb.sh: Likewise. * emulparams/m68hc12elf.sh: Likewise. * emulparams/m68hc12elfb.sh: Likewise. * emulparams/m68kelf.sh: Likewise. * emulparams/mn10300.sh: Likewise. * emulparams/nds32elf.sh: Likewise. * emulparams/nds32elf16m.sh: Likewise. * emulparams/nds32elf_linux.sh: Likewise. * emulparams/nios2elf.sh: Likewise. * emulparams/nios2linux.sh: Likewise. * emulparams/pruelf.sh: Likewise. * emulparams/score3_elf.sh: Likewise. * emulparams/shelf.sh: Likewise. * emulparams/shelf_nto.sh: Likewise. * emulparams/shelf_vxworks.sh: Likewise. * emulparams/shlelf_linux.sh: Likewise. * emulparams/shlelf_nto.sh: Likewise. * emulparams/v850.sh: Likewise. * emulparams/v850_rh850.sh: Likewise. * ldelf.c: Update comment. * ldelf.h: Likewise. * emultempl/aarch64elf.em: Likewise. * emultempl/alphaelf.em: Likewise. * emultempl/arclinux.em: Likewise. * emultempl/armelf.em: Likewise. * emultempl/avrelf.em: Likewise. * emultempl/bfin.em: Likewise. * emultempl/cr16elf.em: Likewise. * emultempl/crxelf.em: Likewise. * emultempl/cskyelf.em: Likewise. * emultempl/elf-generic.em: Likewise. * emultempl/elf-x86.em: Likewise. * emultempl/epiphanyelf_4x4.em: Likewise. * emultempl/hppaelf.em: Likewise. * emultempl/ia64elf.em: Likewise. * emultempl/m68hc1xelf.em: Likewise. * emultempl/m68kelf.em: Likewise. * emultempl/metagelf.em: Likewise. * emultempl/mmix-elfnmmo.em: Likewise. * emultempl/mmixelf.em: Likewise. * emultempl/mmo.em: Likewise. * emultempl/needrelax.em: Likewise. * emultempl/nios2elf.em: Likewise. * emultempl/ppc32elf.em: Likewise. * emultempl/ppc64elf.em: Likewise. * emultempl/pruelf.em: Likewise. * emultempl/rxelf.em: Likewise. * emultempl/scoreelf.em: Likewise. * emultempl/spuelf.em: Likewise. * emultempl/tic6xdsbt.em: Likewise. * emultempl/v850elf.em: Likewise. * emultempl/vms.em: Likewise. * emultempl/vxworks.em: Likewise. * emultempl/xtensaelf.em: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/armbpabi.sc: Likewise. * scripttempl/elf.sc: Likewise. * scripttempl/elf64bpf.sc: Likewise. * scripttempl/elf64hppa.sc: Likewise. * scripttempl/elf_chaos.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise. * scripttempl/elfd10v.sc: Likewise. * scripttempl/elfm68hc11.sc: Likewise. * scripttempl/elfm68hc12.sc: Likewise. * scripttempl/elfm9s12z.sc: Likewise. * scripttempl/elfxgate.sc: Likewise. * scripttempl/elfxtensa.sc: Likewise. * scripttempl/epiphany_4x4.sc: Likewise. * scripttempl/iq2000.sc: Likewise. * scripttempl/mep.sc: Likewise. * scripttempl/nds32elf.sc: Likewise. * scripttempl/v850.sc: Likewise. * scripttempl/v850_rh850.sc: Likewise. * scripttempl/xstormy16.sc: Likewise. * testsuite/ld-arm/arm-dyn.ld: Likewise. * testsuite/ld-arm/arm-lib.ld: Likewise. * testsuite/ld-arm/arm-no-rel-plt.ld: Likewise. * testsuite/ld-arm/fdpic-main.ld: Likewise. * testsuite/ld-arm/fdpic-shared.ld: Likewise. * testsuite/ld-elf/elf.exp: Likewise. * testsuite/ld-elf/orphan-region.d: Likewise. * testsuite/ld-elf/orphan.d: Likewise. * testsuite/ld-elf/pr349.d: Likewise. * testsuite/ld-elf/warn2.d: Likewise. * testsuite/ld-elfvsb/elf-offset.ld: Likewise. * testsuite/ld-mips-elf/mips-dyn.ld: Likewise. * testsuite/ld-mips-elf/mips-lib.ld: Likewise. * testsuite/ld-scripts/dynamic-sections.t: Likewise. * testsuite/ld-shared/elf-offset.ld: Likewise. * configure: Regenerate.
2019-09-10 04:57:29 +02:00
/* .gnu.warning sections are handled specially by elf.em. */
New ARC implementation. bfd * archures.c: Remove support for older ARC. Added support for new ARC cpus (ARC600, ARC601, ARC700, ARCV2). * bfd-in2.h: Likewise. * config.bfd: Likewise. * cpu-arc.c: Likewise. * elf32-arc.c: Totally changed file with a refactored inplementation of the ARC port. * libbfd.h: Added ARC specific relocation types. * reloc.c: Likewise. gas * config/tc-arc.c: Revamped file for ARC support. * config/tc-arc.h: Likewise. * doc/as.texinfo: Add new ARC options. * doc/c-arc.texi: Likewise. ld * configure.tgt: Added target arc-*-elf* and arc*-*-linux-uclibc*. * emulparams/arcebelf_prof.sh: New file * emulparams/arcebelf.sh: Likewise. * emulparams/arceblinux_prof.sh: Likewise. * emulparams/arceblinux.sh: Likewise. * emulparams/arcelf_prof.sh: Likewise. * emulparams/arcelf.sh: Likewise. * emulparams/arclinux_prof.sh: Likewise. * emulparams/arclinux.sh: Likewise. * emulparams/arcv2elfx.sh: Likewise. * emulparams/arcv2elf.sh: Likewise. * emultempl/arclinux.em: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise * Makefile.am: Add new ARC emulations. * Makefile.in: Regenerate. * NEWS: Mention the new feature. opcodes * arc-dis.c: Revamped file for ARC support * arc-dis.h: Likewise. * arc-ext.c: Likewise. * arc-ext.h: Likewise. * arc-opc.c: Likewise. * arc-fxi.h: New file. * arc-regs.h: Likewise. * arc-tbl.h: Likewise. binutils * readelf.c (get_machine_name): Remove A5 reference. Add ARCompact and ARCv2. (get_machine_flags): Handle EM_ARCV2 and EM_ARCOMPACT. (guess_is_rela): Likewise. (dump_relocations): Likewise. (is_32bit_abs_reloc): Likewise. (is_16bit_abs_reloc): Likewise. (is_none_reloc): Likewise. * NEWS: Mention the new feature. include * dis-asm.h (arc_get_disassembler): Correct declaration. * arc-reloc.def: Macro file with definition of all relocation types. * arc.h: Changed macros for the newly supported ARC cpus. Altered enum defining the supported relocations. * common.h: Changed EM_ARC_A5 definition to EM_ARC_COMPACT. Added macro for EM_ARC_COMPACT2. * arc-func.h: New file. * arc.h: Likewise.
2015-10-07 15:20:19 +02:00
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} ${RELOCATING+ > ${TEXT_MEMORY}} =${NOP-0}
.fini ${RELOCATING-0} :
{
${RELOCATING+${FINI_START}}
Add SORT_NONE to .init and .fini in scripts The special case for .init and .fini in update_wild_statements is ineffective for .init or .fini wildcards inside other output sections. The special case needs to be on the wildcard, not the output section. This patch is belt and braces, both fixing update_wild_statements and the scripts. * scripttempl/alpha.sc, * scripttempl/armbpabi.sc, * scripttempl/crisaout.sc, * scripttempl/elf32cr16.sc, * scripttempl/elf32crx.sc, * scripttempl/elf32xc16x.sc, * scripttempl/elf32xc16xl.sc, * scripttempl/elf32xc16xs.sc, * scripttempl/elf64hppa.sc, * scripttempl/elf_chaos.sc, * scripttempl/elfarc.sc, * scripttempl/elfarcv2.sc, * scripttempl/elfd30v.sc, * scripttempl/elfm68hc11.sc, * scripttempl/elfm68hc12.sc, * scripttempl/elfm9s12z.sc, * scripttempl/elfmicroblaze.sc, * scripttempl/elfxgate.sc, * scripttempl/elfxtensa.sc, * scripttempl/epiphany_4x4.sc, * scripttempl/ft32.sc, * scripttempl/i386beos.sc, * scripttempl/iq2000.sc, * scripttempl/mcorepe.sc, * scripttempl/mep.sc, * scripttempl/mips.sc, * scripttempl/moxie.sc, * scripttempl/pe.sc, * scripttempl/pep.sc, * scripttempl/ppcpe.sc, * scripttempl/tic4xcoff.sc, * scripttempl/tic80coff.sc, * scripttempl/v850.sc, * scripttempl/v850_rh850.sc, * scripttempl/visium.sc, * scripttempl/xstormy16.sc: Add KEEP and SORT_NONE to .init and .fini wildcards. * scripttempl/elf32xc16x.sc, * scripttempl/elf32xc16xl.sc, * scripttempl/elf32xc16xs.sc: Add .fini wildcard. * scripttempl/elf_chaos.sc: Add .init output section. * scripttempl/elfd30v.sc: Remove duplicate .init. * scripttempl/elfm68hc11.sc, * scripttempl/elfm68hc12.sc, * scripttempl/elfm9s12z.sc, * scripttempl/elfxgate.sc: Remove duplicate .init, and add .fini wildcard. * scripttempl/ppcpe.sc (INIT, FINI): Delete. * ldlang.c (update_wild_statements): Special case .init and .fini in the wildcard, not the output section.
2019-03-21 05:28:35 +01:00
KEEP (*(SORT_NONE(.fini)))
New ARC implementation. bfd * archures.c: Remove support for older ARC. Added support for new ARC cpus (ARC600, ARC601, ARC700, ARCV2). * bfd-in2.h: Likewise. * config.bfd: Likewise. * cpu-arc.c: Likewise. * elf32-arc.c: Totally changed file with a refactored inplementation of the ARC port. * libbfd.h: Added ARC specific relocation types. * reloc.c: Likewise. gas * config/tc-arc.c: Revamped file for ARC support. * config/tc-arc.h: Likewise. * doc/as.texinfo: Add new ARC options. * doc/c-arc.texi: Likewise. ld * configure.tgt: Added target arc-*-elf* and arc*-*-linux-uclibc*. * emulparams/arcebelf_prof.sh: New file * emulparams/arcebelf.sh: Likewise. * emulparams/arceblinux_prof.sh: Likewise. * emulparams/arceblinux.sh: Likewise. * emulparams/arcelf_prof.sh: Likewise. * emulparams/arcelf.sh: Likewise. * emulparams/arclinux_prof.sh: Likewise. * emulparams/arclinux.sh: Likewise. * emulparams/arcv2elfx.sh: Likewise. * emulparams/arcv2elf.sh: Likewise. * emultempl/arclinux.em: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise * Makefile.am: Add new ARC emulations. * Makefile.in: Regenerate. * NEWS: Mention the new feature. opcodes * arc-dis.c: Revamped file for ARC support * arc-dis.h: Likewise. * arc-ext.c: Likewise. * arc-ext.h: Likewise. * arc-opc.c: Likewise. * arc-fxi.h: New file. * arc-regs.h: Likewise. * arc-tbl.h: Likewise. binutils * readelf.c (get_machine_name): Remove A5 reference. Add ARCompact and ARCv2. (get_machine_flags): Handle EM_ARCV2 and EM_ARCOMPACT. (guess_is_rela): Likewise. (dump_relocations): Likewise. (is_32bit_abs_reloc): Likewise. (is_16bit_abs_reloc): Likewise. (is_none_reloc): Likewise. * NEWS: Mention the new feature. include * dis-asm.h (arc_get_disassembler): Correct declaration. * arc-reloc.def: Macro file with definition of all relocation types. * arc.h: Changed macros for the newly supported ARC cpus. Altered enum defining the supported relocations. * common.h: Changed EM_ARC_A5 definition to EM_ARC_COMPACT. Added macro for EM_ARC_COMPACT2. * arc-func.h: New file. * arc.h: Likewise.
2015-10-07 15:20:19 +02:00
${RELOCATING+${FINI_END}}
${RELOCATING+PROVIDE (__etext = .);}
${RELOCATING+PROVIDE (_etext = .);}
${RELOCATING+PROVIDE (etext = .);}
} ${RELOCATING+ > ${TEXT_MEMORY}} =${NOP-0}
${RELOCATING+${OTHER_READONLY_SECTIONS}}
/* Start of the data section image in ROM. */
${RELOCATING+__data_image = .;}
${RELOCATING+PROVIDE (__data_image = .);}
.data ${RELOCATING-0} :
{
${RELOCATING+ PROVIDE (__data_start = .) ; }
/* --gc-sections will delete empty .data. This leads to wrong start
addresses for subsequent sections because -Tdata= from the command
line will have no effect, see PR13697. Thus, keep .data */
KEEP (*(.data))
${RELOCATING+${DATA_START_SYMBOLS}}
ELF ld -r scripts "ld -r" generally should not combine object file sections with different names. For example, "ld -r" should not combine ".text", ".text.hot" and ".text.cold" into an output ".text" section. An exception needs to be made for linker created sections, for example, branch trampoline sections that might be created even for ld -r. "ld -r" also should not define symbols in linker scripts. Any definitions are likely to conflict with those defined at final link. A MEMORY spec is also not needed for ld -r. * Makefile.am (eelf32btsmip_fbsd.c, eelf32btsmipn32_fbsd.c), (eelf32epiphany.c, eelf32epiphany_4x4.c, eelf32ltsmip_fbsd.c), (eelf32ltsmipn32_fbsd.c, eelf32xc16x.c, eelf32xc16xl.c), (eelf32xc16xs.c, emcorepe.c, enios2elf.c, enios2linux.c), (eelf64btsmip_fbsd.c, eelf64ltsmip_fbsd.c): Correct dependencies. * Makefile.in: Regenerate. * emulparams/aarch64cloudabi.sh, * emulparams/aarch64fbsd.sh, * emulparams/aarch64linux.sh, * emulparams/aarch64linux32.sh, * emulparams/arc-nps.sh, * emulparams/elf32_spu.sh, * emulparams/elf32_tic6x_le.sh, * emulparams/elf32bmip.sh, * emulparams/elf32btsmipn32.sh, * emulparams/elf32lr5900n32.sh, * emulparams/elf32mep.sh, * emulparams/elf32metag.sh, * emulparams/elf64btsmip.sh, * emulparams/shelf_vxworks.sh, * emulparams/shlelf_fd.sh, * scripttempl/DWARF.sc, * scripttempl/alpha.sc, * scripttempl/alphavms.sc, * scripttempl/arclinux.sc, * scripttempl/armbpabi.sc, * scripttempl/avr.sc, * scripttempl/dlx.sc, * scripttempl/elf.sc, * scripttempl/elf32cr16.sc, * scripttempl/elf32cr16c.sc, * scripttempl/elf32crx.sc, * scripttempl/elf32msp430.sc, * scripttempl/elf32msp430_3.sc, * scripttempl/elf32xc16x.sc, * scripttempl/elf32xc16xl.sc, * scripttempl/elf32xc16xs.sc, * scripttempl/elf64hppa.sc, * scripttempl/elf_chaos.sc, * scripttempl/elfarc.sc, * scripttempl/elfarcv2.sc, * scripttempl/elfd10v.sc, * scripttempl/elfd30v.sc, * scripttempl/elfm68hc11.sc, * scripttempl/elfm68hc12.sc, * scripttempl/elfm9s12z.sc, * scripttempl/elfmicroblaze.sc, * scripttempl/elfxgate.sc, * scripttempl/elfxtensa.sc, * scripttempl/epiphany_4x4.sc, * scripttempl/ft32.sc, * scripttempl/hppaelf.sc, * scripttempl/ia64vms.sc, * scripttempl/ip2k.sc, * scripttempl/iq2000.sc, * scripttempl/mep.sc, * scripttempl/mmo.sc, * scripttempl/nds32elf.sc, * scripttempl/pru.sc, * scripttempl/sh.sc, * scripttempl/v850.sc, * scripttempl/v850_rh850.sc, * scripttempl/visium.sc, * scripttempl/xstormy16.sc: Condition various parts of scripts on ${RELOCATABLE} in order to prevent ld -r merging sections or defining symbols. Remove MEMORY and VERSION definitions from ld -r scripts too. * testsuite/ld-elf/group2.d, * testsuite/ld-elf/group4.d, * testsuite/ld-elf/group5.d, * testsuite/ld-elf/group6.d, * testsuite/ld-elf/group7.d, * testsuite/ld-elf/group8a.d, * testsuite/ld-elf/group8b.d, * testsuite/ld-elf/group9a.d, * testsuite/ld-elf/group9b.d, * testsuite/ld-elf/pr17550a.d, * testsuite/ld-elf/pr17550b.d, * testsuite/ld-elf/pr17550d.d: Don't xfail cr16 and crx. * testsuite/ld-elf/init-fini-arrays.d, * testsuite/ld-elf/pr22677.d: Likewise, and dont' xfail mep.
2018-10-12 03:36:40 +02:00
${RELOCATING+*(.data.* .gnu.linkonce.d.*)}
New ARC implementation. bfd * archures.c: Remove support for older ARC. Added support for new ARC cpus (ARC600, ARC601, ARC700, ARCV2). * bfd-in2.h: Likewise. * config.bfd: Likewise. * cpu-arc.c: Likewise. * elf32-arc.c: Totally changed file with a refactored inplementation of the ARC port. * libbfd.h: Added ARC specific relocation types. * reloc.c: Likewise. gas * config/tc-arc.c: Revamped file for ARC support. * config/tc-arc.h: Likewise. * doc/as.texinfo: Add new ARC options. * doc/c-arc.texi: Likewise. ld * configure.tgt: Added target arc-*-elf* and arc*-*-linux-uclibc*. * emulparams/arcebelf_prof.sh: New file * emulparams/arcebelf.sh: Likewise. * emulparams/arceblinux_prof.sh: Likewise. * emulparams/arceblinux.sh: Likewise. * emulparams/arcelf_prof.sh: Likewise. * emulparams/arcelf.sh: Likewise. * emulparams/arclinux_prof.sh: Likewise. * emulparams/arclinux.sh: Likewise. * emulparams/arcv2elfx.sh: Likewise. * emulparams/arcv2elf.sh: Likewise. * emultempl/arclinux.em: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise * Makefile.am: Add new ARC emulations. * Makefile.in: Regenerate. * NEWS: Mention the new feature. opcodes * arc-dis.c: Revamped file for ARC support * arc-dis.h: Likewise. * arc-ext.c: Likewise. * arc-ext.h: Likewise. * arc-opc.c: Likewise. * arc-fxi.h: New file. * arc-regs.h: Likewise. * arc-tbl.h: Likewise. binutils * readelf.c (get_machine_name): Remove A5 reference. Add ARCompact and ARCv2. (get_machine_flags): Handle EM_ARCV2 and EM_ARCOMPACT. (guess_is_rela): Likewise. (dump_relocations): Likewise. (is_32bit_abs_reloc): Likewise. (is_16bit_abs_reloc): Likewise. (is_none_reloc): Likewise. * NEWS: Mention the new feature. include * dis-asm.h (arc_get_disassembler): Correct declaration. * arc-reloc.def: Macro file with definition of all relocation types. * arc.h: Changed macros for the newly supported ARC cpus. Altered enum defining the supported relocations. * common.h: Changed EM_ARC_A5 definition to EM_ARC_COMPACT. Added macro for EM_ARC_COMPACT2. * arc-func.h: New file. * arc.h: Likewise.
2015-10-07 15:20:19 +02:00
${CONSTRUCTING+SORT(CONSTRUCTORS)}
} ${RELOCATING+ > ${DATA_MEMORY}}
${GOT}
${RELOCATING+${CTOR}}
${RELOCATING+${DTOR}}
${RELOCATING+${SDATA}}
${RELOCATING+${SDATA2}}
${RELOCATING+${SBSS}}
${RELOCATING+${SBSS2}}
.bss ${RELOCATING-0} :
{
ELF ld -r scripts "ld -r" generally should not combine object file sections with different names. For example, "ld -r" should not combine ".text", ".text.hot" and ".text.cold" into an output ".text" section. An exception needs to be made for linker created sections, for example, branch trampoline sections that might be created even for ld -r. "ld -r" also should not define symbols in linker scripts. Any definitions are likely to conflict with those defined at final link. A MEMORY spec is also not needed for ld -r. * Makefile.am (eelf32btsmip_fbsd.c, eelf32btsmipn32_fbsd.c), (eelf32epiphany.c, eelf32epiphany_4x4.c, eelf32ltsmip_fbsd.c), (eelf32ltsmipn32_fbsd.c, eelf32xc16x.c, eelf32xc16xl.c), (eelf32xc16xs.c, emcorepe.c, enios2elf.c, enios2linux.c), (eelf64btsmip_fbsd.c, eelf64ltsmip_fbsd.c): Correct dependencies. * Makefile.in: Regenerate. * emulparams/aarch64cloudabi.sh, * emulparams/aarch64fbsd.sh, * emulparams/aarch64linux.sh, * emulparams/aarch64linux32.sh, * emulparams/arc-nps.sh, * emulparams/elf32_spu.sh, * emulparams/elf32_tic6x_le.sh, * emulparams/elf32bmip.sh, * emulparams/elf32btsmipn32.sh, * emulparams/elf32lr5900n32.sh, * emulparams/elf32mep.sh, * emulparams/elf32metag.sh, * emulparams/elf64btsmip.sh, * emulparams/shelf_vxworks.sh, * emulparams/shlelf_fd.sh, * scripttempl/DWARF.sc, * scripttempl/alpha.sc, * scripttempl/alphavms.sc, * scripttempl/arclinux.sc, * scripttempl/armbpabi.sc, * scripttempl/avr.sc, * scripttempl/dlx.sc, * scripttempl/elf.sc, * scripttempl/elf32cr16.sc, * scripttempl/elf32cr16c.sc, * scripttempl/elf32crx.sc, * scripttempl/elf32msp430.sc, * scripttempl/elf32msp430_3.sc, * scripttempl/elf32xc16x.sc, * scripttempl/elf32xc16xl.sc, * scripttempl/elf32xc16xs.sc, * scripttempl/elf64hppa.sc, * scripttempl/elf_chaos.sc, * scripttempl/elfarc.sc, * scripttempl/elfarcv2.sc, * scripttempl/elfd10v.sc, * scripttempl/elfd30v.sc, * scripttempl/elfm68hc11.sc, * scripttempl/elfm68hc12.sc, * scripttempl/elfm9s12z.sc, * scripttempl/elfmicroblaze.sc, * scripttempl/elfxgate.sc, * scripttempl/elfxtensa.sc, * scripttempl/epiphany_4x4.sc, * scripttempl/ft32.sc, * scripttempl/hppaelf.sc, * scripttempl/ia64vms.sc, * scripttempl/ip2k.sc, * scripttempl/iq2000.sc, * scripttempl/mep.sc, * scripttempl/mmo.sc, * scripttempl/nds32elf.sc, * scripttempl/pru.sc, * scripttempl/sh.sc, * scripttempl/v850.sc, * scripttempl/v850_rh850.sc, * scripttempl/visium.sc, * scripttempl/xstormy16.sc: Condition various parts of scripts on ${RELOCATABLE} in order to prevent ld -r merging sections or defining symbols. Remove MEMORY and VERSION definitions from ld -r scripts too. * testsuite/ld-elf/group2.d, * testsuite/ld-elf/group4.d, * testsuite/ld-elf/group5.d, * testsuite/ld-elf/group6.d, * testsuite/ld-elf/group7.d, * testsuite/ld-elf/group8a.d, * testsuite/ld-elf/group8b.d, * testsuite/ld-elf/group9a.d, * testsuite/ld-elf/group9b.d, * testsuite/ld-elf/pr17550a.d, * testsuite/ld-elf/pr17550b.d, * testsuite/ld-elf/pr17550d.d: Don't xfail cr16 and crx. * testsuite/ld-elf/init-fini-arrays.d, * testsuite/ld-elf/pr22677.d: Likewise, and dont' xfail mep.
2018-10-12 03:36:40 +02:00
${RELOCATING+*(.dynbss)}
*(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
${RELOCATING+*(COMMON)
/* Align here to ensure that the .bss section occupies space up to
_end. Align after .bss to ensure correct alignment even if the
.bss section disappears because there are no input sections. */
. = ALIGN(${ALIGNMENT});}
New ARC implementation. bfd * archures.c: Remove support for older ARC. Added support for new ARC cpus (ARC600, ARC601, ARC700, ARCV2). * bfd-in2.h: Likewise. * config.bfd: Likewise. * cpu-arc.c: Likewise. * elf32-arc.c: Totally changed file with a refactored inplementation of the ARC port. * libbfd.h: Added ARC specific relocation types. * reloc.c: Likewise. gas * config/tc-arc.c: Revamped file for ARC support. * config/tc-arc.h: Likewise. * doc/as.texinfo: Add new ARC options. * doc/c-arc.texi: Likewise. ld * configure.tgt: Added target arc-*-elf* and arc*-*-linux-uclibc*. * emulparams/arcebelf_prof.sh: New file * emulparams/arcebelf.sh: Likewise. * emulparams/arceblinux_prof.sh: Likewise. * emulparams/arceblinux.sh: Likewise. * emulparams/arcelf_prof.sh: Likewise. * emulparams/arcelf.sh: Likewise. * emulparams/arclinux_prof.sh: Likewise. * emulparams/arclinux.sh: Likewise. * emulparams/arcv2elfx.sh: Likewise. * emulparams/arcv2elf.sh: Likewise. * emultempl/arclinux.em: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise * Makefile.am: Add new ARC emulations. * Makefile.in: Regenerate. * NEWS: Mention the new feature. opcodes * arc-dis.c: Revamped file for ARC support * arc-dis.h: Likewise. * arc-ext.c: Likewise. * arc-ext.h: Likewise. * arc-opc.c: Likewise. * arc-fxi.h: New file. * arc-regs.h: Likewise. * arc-tbl.h: Likewise. binutils * readelf.c (get_machine_name): Remove A5 reference. Add ARCompact and ARCv2. (get_machine_flags): Handle EM_ARCV2 and EM_ARCOMPACT. (guess_is_rela): Likewise. (dump_relocations): Likewise. (is_32bit_abs_reloc): Likewise. (is_16bit_abs_reloc): Likewise. (is_none_reloc): Likewise. * NEWS: Mention the new feature. include * dis-asm.h (arc_get_disassembler): Correct declaration. * arc-reloc.def: Macro file with definition of all relocation types. * arc.h: Changed macros for the newly supported ARC cpus. Altered enum defining the supported relocations. * common.h: Changed EM_ARC_A5 definition to EM_ARC_COMPACT. Added macro for EM_ARC_COMPACT2. * arc-func.h: New file. * arc.h: Likewise.
2015-10-07 15:20:19 +02:00
${RELOCATING+_end = .;}
${RELOCATING+PROVIDE (end = .);}
} ${RELOCATING+ > ${DATA_MEMORY}}
/* Global data not cleared after reset. */
.noinit ${RELOCATING-0}:
{
*(.noinit*)
${RELOCATING+. = ALIGN(${ALIGNMENT});}
${RELOCATING+ PROVIDE (__start_heap = .) ; }
} ${RELOCATING+ > ${DATA_MEMORY}}
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
.stab.excl 0 : { *(.stab.excl) }
.stab.exclstr 0 : { *(.stab.exclstr) }
.stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
.comment 0 : { *(.comment) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
of the section so we begin them at 0. */
/* DWARF 1 */
.debug 0 : { *(.debug) }
.line 0 : { *(.line) }
/* GNU DWARF 1 extensions */
.debug_srcinfo 0 : { *(.debug_srcinfo) }
.debug_sfnames 0 : { *(.debug_sfnames) }
/* DWARF 1.1 and DWARF 2 */
.debug_aranges 0 : { *(.debug_aranges) }
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
ELF ld -r scripts "ld -r" generally should not combine object file sections with different names. For example, "ld -r" should not combine ".text", ".text.hot" and ".text.cold" into an output ".text" section. An exception needs to be made for linker created sections, for example, branch trampoline sections that might be created even for ld -r. "ld -r" also should not define symbols in linker scripts. Any definitions are likely to conflict with those defined at final link. A MEMORY spec is also not needed for ld -r. * Makefile.am (eelf32btsmip_fbsd.c, eelf32btsmipn32_fbsd.c), (eelf32epiphany.c, eelf32epiphany_4x4.c, eelf32ltsmip_fbsd.c), (eelf32ltsmipn32_fbsd.c, eelf32xc16x.c, eelf32xc16xl.c), (eelf32xc16xs.c, emcorepe.c, enios2elf.c, enios2linux.c), (eelf64btsmip_fbsd.c, eelf64ltsmip_fbsd.c): Correct dependencies. * Makefile.in: Regenerate. * emulparams/aarch64cloudabi.sh, * emulparams/aarch64fbsd.sh, * emulparams/aarch64linux.sh, * emulparams/aarch64linux32.sh, * emulparams/arc-nps.sh, * emulparams/elf32_spu.sh, * emulparams/elf32_tic6x_le.sh, * emulparams/elf32bmip.sh, * emulparams/elf32btsmipn32.sh, * emulparams/elf32lr5900n32.sh, * emulparams/elf32mep.sh, * emulparams/elf32metag.sh, * emulparams/elf64btsmip.sh, * emulparams/shelf_vxworks.sh, * emulparams/shlelf_fd.sh, * scripttempl/DWARF.sc, * scripttempl/alpha.sc, * scripttempl/alphavms.sc, * scripttempl/arclinux.sc, * scripttempl/armbpabi.sc, * scripttempl/avr.sc, * scripttempl/dlx.sc, * scripttempl/elf.sc, * scripttempl/elf32cr16.sc, * scripttempl/elf32cr16c.sc, * scripttempl/elf32crx.sc, * scripttempl/elf32msp430.sc, * scripttempl/elf32msp430_3.sc, * scripttempl/elf32xc16x.sc, * scripttempl/elf32xc16xl.sc, * scripttempl/elf32xc16xs.sc, * scripttempl/elf64hppa.sc, * scripttempl/elf_chaos.sc, * scripttempl/elfarc.sc, * scripttempl/elfarcv2.sc, * scripttempl/elfd10v.sc, * scripttempl/elfd30v.sc, * scripttempl/elfm68hc11.sc, * scripttempl/elfm68hc12.sc, * scripttempl/elfm9s12z.sc, * scripttempl/elfmicroblaze.sc, * scripttempl/elfxgate.sc, * scripttempl/elfxtensa.sc, * scripttempl/epiphany_4x4.sc, * scripttempl/ft32.sc, * scripttempl/hppaelf.sc, * scripttempl/ia64vms.sc, * scripttempl/ip2k.sc, * scripttempl/iq2000.sc, * scripttempl/mep.sc, * scripttempl/mmo.sc, * scripttempl/nds32elf.sc, * scripttempl/pru.sc, * scripttempl/sh.sc, * scripttempl/v850.sc, * scripttempl/v850_rh850.sc, * scripttempl/visium.sc, * scripttempl/xstormy16.sc: Condition various parts of scripts on ${RELOCATABLE} in order to prevent ld -r merging sections or defining symbols. Remove MEMORY and VERSION definitions from ld -r scripts too. * testsuite/ld-elf/group2.d, * testsuite/ld-elf/group4.d, * testsuite/ld-elf/group5.d, * testsuite/ld-elf/group6.d, * testsuite/ld-elf/group7.d, * testsuite/ld-elf/group8a.d, * testsuite/ld-elf/group8b.d, * testsuite/ld-elf/group9a.d, * testsuite/ld-elf/group9b.d, * testsuite/ld-elf/pr17550a.d, * testsuite/ld-elf/pr17550b.d, * testsuite/ld-elf/pr17550d.d: Don't xfail cr16 and crx. * testsuite/ld-elf/init-fini-arrays.d, * testsuite/ld-elf/pr22677.d: Likewise, and dont' xfail mep.
2018-10-12 03:36:40 +02:00
.debug_info 0 : { *(.debug_info${RELOCATING+ .gnu.linkonce.wi.*}) }
New ARC implementation. bfd * archures.c: Remove support for older ARC. Added support for new ARC cpus (ARC600, ARC601, ARC700, ARCV2). * bfd-in2.h: Likewise. * config.bfd: Likewise. * cpu-arc.c: Likewise. * elf32-arc.c: Totally changed file with a refactored inplementation of the ARC port. * libbfd.h: Added ARC specific relocation types. * reloc.c: Likewise. gas * config/tc-arc.c: Revamped file for ARC support. * config/tc-arc.h: Likewise. * doc/as.texinfo: Add new ARC options. * doc/c-arc.texi: Likewise. ld * configure.tgt: Added target arc-*-elf* and arc*-*-linux-uclibc*. * emulparams/arcebelf_prof.sh: New file * emulparams/arcebelf.sh: Likewise. * emulparams/arceblinux_prof.sh: Likewise. * emulparams/arceblinux.sh: Likewise. * emulparams/arcelf_prof.sh: Likewise. * emulparams/arcelf.sh: Likewise. * emulparams/arclinux_prof.sh: Likewise. * emulparams/arclinux.sh: Likewise. * emulparams/arcv2elfx.sh: Likewise. * emulparams/arcv2elf.sh: Likewise. * emultempl/arclinux.em: Likewise. * scripttempl/arclinux.sc: Likewise. * scripttempl/elfarc.sc: Likewise. * scripttempl/elfarcv2.sc: Likewise * Makefile.am: Add new ARC emulations. * Makefile.in: Regenerate. * NEWS: Mention the new feature. opcodes * arc-dis.c: Revamped file for ARC support * arc-dis.h: Likewise. * arc-ext.c: Likewise. * arc-ext.h: Likewise. * arc-opc.c: Likewise. * arc-fxi.h: New file. * arc-regs.h: Likewise. * arc-tbl.h: Likewise. binutils * readelf.c (get_machine_name): Remove A5 reference. Add ARCompact and ARCv2. (get_machine_flags): Handle EM_ARCV2 and EM_ARCOMPACT. (guess_is_rela): Likewise. (dump_relocations): Likewise. (is_32bit_abs_reloc): Likewise. (is_16bit_abs_reloc): Likewise. (is_none_reloc): Likewise. * NEWS: Mention the new feature. include * dis-asm.h (arc_get_disassembler): Correct declaration. * arc-reloc.def: Macro file with definition of all relocation types. * arc.h: Changed macros for the newly supported ARC cpus. Altered enum defining the supported relocations. * common.h: Changed EM_ARC_A5 definition to EM_ARC_COMPACT. Added macro for EM_ARC_COMPACT2. * arc-func.h: New file. * arc.h: Likewise.
2015-10-07 15:20:19 +02:00
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
.debug_str 0 : { *(.debug_str) }
.debug_loc 0 : { *(.debug_loc) }
.debug_macinfo 0 : { *(.debug_macinfo) }
/* DWARF 3 */
.debug_pubtypes 0 : { *(.debug_pubtypes) }
.debug_ranges 0 : { *(.debug_ranges) }
/* DWARF Extension. */
.debug_macro 0 : { *(.debug_macro) }
/* ARC Extension Sections */
.arcextmap 0 : { *(.gnu.linkonce.arcextmap.*) }
}
EOF