diff options
author | Jozef Lawrynowicz <jozef.l@somniumtech.com> | 2017-08-29 17:18:43 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2017-08-29 17:18:43 +0100 |
commit | 7ef3addbe195b6283d0baf59e081146dfb211c97 (patch) | |
tree | c201cf7915b7d05e32742dc90d4c0716e62babcf /ld/ld.texinfo | |
parent | 3819af136deb7ba6bc2058d7848cf80b33dbe51c (diff) | |
download | fsf-binutils-gdb-7ef3addbe195b6283d0baf59e081146dfb211c97.zip fsf-binutils-gdb-7ef3addbe195b6283d0baf59e081146dfb211c97.tar.gz fsf-binutils-gdb-7ef3addbe195b6283d0baf59e081146dfb211c97.tar.bz2 |
Improve MSP430 section placement.
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.
Diffstat (limited to 'ld/ld.texinfo')
-rw-r--r-- | ld/ld.texinfo | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/ld/ld.texinfo b/ld/ld.texinfo index bbfa9fd..ba19cd7 100644 --- a/ld/ld.texinfo +++ b/ld/ld.texinfo @@ -7260,6 +7260,29 @@ Denotes a portion of RAM located above @samp{.bss} section. The last two sections are used by gcc. @end table +@table @option +@cindex MSP430 Options +@kindex --code-region +@item --code-region=[either,lower,upper,none] +This will transform .text* sections to [either,lower,upper].text* sections. The +argument passed to GCC for -mcode-region is propagated to the linker +using this option. + +@kindex --data-region +@item --data-region=[either,lower,upper,none] +This will transform .data*, .bss* and .rodata* sections to +[either,lower,upper].[data,bss,rodata]* sections. The argument passed to GCC +for -mdata-region is propagated to the linker using this option. + +@kindex --disable-sec-transformation +@item --disable-sec-transformation +Prevent the transformation of sections as specified by the @code{--code-region} +and @code{--data-region} options. +This is useful if you are compiling and linking using a single call to the GCC +wrapper, and want to compile the source files using -m[code,data]-region but +not transform the sections for prebuilt libraries and objects. +@end table + @ifclear GENERIC @lowersections @end ifclear |