7ef3addbe1
ld * emultempl/msp430.em (change_output_section): New function. (move_prefixed_section): New function. (add_region_prefix): New function. (msp430_elf_after_open): New function. (gld${EMULATION_NAME}_add_options): Implement. (gld${EMULATION_NAME}_list_options): Implement. (gld${EMULATION_NAME}_handle_option): Implement. * ld.texinfo: Document new options. * testsuite/ld-msp430-elf/main-bss-lower.d: New. * testsuite/ld-msp430-elf/main-bss-upper.d: New. * testsuite/ld-msp430-elf/main-const-lower.d: New. * testsuite/ld-msp430-elf/main-const-upper.d: New. * testsuite/ld-msp430-elf/main-text-lower.d: New. * testsuite/ld-msp430-elf/main-text-upper.d: New. * testsuite/ld-msp430-elf/main-var-lower.d: New. * testsuite/ld-msp430-elf/main-var-upper.d: New. * testsuite/ld-msp430-elf/main-with-data-bss-unique-sec.s: New. * testsuite/ld-msp430-elf/main-with-data-bss.s: New. * testsuite/ld-msp430-elf/main-with-text-rodata-unique-sec.s: New. * testsuite/ld-msp430-elf/main-with-text-rodata.s: New. * testsuite/ld-msp430-elf/msp430-elf.exp: New. * testsuite/ld-msp430-elf/msp430-no-lower.ld: New. * testsuite/ld-msp430-elf/msp430.ld: New. * emultempl/msp430.em (data_statement_size): New. (eval_upper_either_sections): New. (eval_lower_either_sections): New. (intermediate_relax_sections): New. (msp430_elf_after_allocation): New. * emultempl/msp430.em (gld${EMULATION_NAME}_place_orphan): Always place sections in the lower region. gas * config/tc-msp430.c (md_parse_option): Define high data and high bss symbols if -mdata-region is passed. Define -mdata-region open. * doc/c-msp430.texi: Document -mdata-region. * testsuite/gas/msp430/high-data-bss-sym.d: New test. * testsuite/gas/msp430/high-data-bss-sym.s: New. * testsuite/gas/msp430/msp430.exp: Add -mdata-region tests.
79 lines
966 B
Plaintext
79 lines
966 B
Plaintext
/* Script for ld testsuite */
|
|
OUTPUT_ARCH(msp430)
|
|
ENTRY(_start)
|
|
|
|
SECTIONS
|
|
{
|
|
.lower.data :
|
|
{
|
|
. = ALIGN(2);
|
|
*(.lower.data .lower.data.*)
|
|
}
|
|
|
|
.lower.bss :
|
|
{
|
|
. = ALIGN(2);
|
|
*(.lower.bss .lower.bss.*)
|
|
}
|
|
|
|
.lower.text :
|
|
{
|
|
PROVIDE (_start = .);
|
|
. = ALIGN(2);
|
|
*(.lower.text.* .lower.text)
|
|
}
|
|
|
|
.lower.rodata :
|
|
{
|
|
. = ALIGN(2);
|
|
*(.lower.rodata .lower.rodata.*)
|
|
}
|
|
|
|
.text :
|
|
{
|
|
. = ALIGN(2);
|
|
*(.text .stub .text.* .gnu.linkonce.t.* .text:*)
|
|
}
|
|
|
|
.rodata :
|
|
{
|
|
*(.rodata.* .rodata)
|
|
}
|
|
|
|
.data :
|
|
{
|
|
. = ALIGN(2);
|
|
*(.data.* .data)
|
|
}
|
|
|
|
.bss :
|
|
{
|
|
. = ALIGN(2);
|
|
*(.bss.* .bss)
|
|
}
|
|
|
|
.upper.text :
|
|
{
|
|
. = ALIGN(2);
|
|
*(.upper.text.* .upper.text)
|
|
}
|
|
|
|
.upper.rodata :
|
|
{
|
|
. = ALIGN(2);
|
|
*(.upper.rodata .upper.rodata.*)
|
|
}
|
|
|
|
.upper.data :
|
|
{
|
|
. = ALIGN(2);
|
|
*(.upper.data .upper.data.*)
|
|
}
|
|
|
|
.upper.bss :
|
|
{
|
|
. = ALIGN(2);
|
|
*(.upper.bss .upper.bss.*)
|
|
}
|
|
}
|