mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-10 01:15:10 +08:00
Major rewrite of how ld is configured. The major idea
is to use shell scripts to generate everything. * generic.em replaces ldtemplate. * Other *.em files replace various *.c files. A *.em file is a shell script that generates the corresponding ld__*.c file that implements an emulation. This is usually a straight 'cat' of a here-document, possibly with substitutions. * Script files (*.sc) are places by *.sc-sh scripts. Again, these are simple shell scripts that 'cat' here-documents, usually with some substitutions. The output a *.sc-sh is a script file.
This commit is contained in:
41
ld/m88kbcs.sc-sh
Executable file
41
ld/m88kbcs.sc-sh
Executable file
@ -0,0 +1,41 @@
|
||||
cat <<EOF
|
||||
TARGET(m88kbcs)
|
||||
OUTPUT_FORMAT(m88kbcs)
|
||||
OUTPUT_ARCH(${arch})
|
||||
ENTRY(__start)
|
||||
${RELOCATING+${LIB_SEARCH_DIRS}}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
.text ${RELOCATING+ 0x10000 + SIZEOF_HEADERS} :
|
||||
{
|
||||
CREATE_OBJECT_SYMBOLS
|
||||
${RELOCATING+ __.text.start = .}
|
||||
${RELOCATING+ __.init.start = .}
|
||||
${RELOCATING+ LONG(0xf400c001)}
|
||||
${RELOCATING+ __.init.end = .}
|
||||
*(.text)
|
||||
${RELOCATING+ __.tdesc_start = .}
|
||||
${RELOCATING+ *(.tdesc)}
|
||||
${RELOCATING+ __.text_end = .}
|
||||
${RELOCATING+ __.initp.start = .}
|
||||
${RELOCATING+ __.initp.end =.}
|
||||
|
||||
${RELOCATING+_etext =.}
|
||||
}
|
||||
.data ${RELOCATING+ SIZEOF(.text) + ADDR(.text) + 0x400000} :
|
||||
{
|
||||
*(.data)
|
||||
${CONSTRUCTING+CONSTRUCTORS}
|
||||
*(.comment)
|
||||
${RELOCATING+_edata = .}
|
||||
}
|
||||
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
|
||||
{
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
${RELOCATING+ _end = .}
|
||||
${RELOCATING+ __end = .}
|
||||
}
|
||||
}
|
||||
EOF
|
Reference in New Issue
Block a user