GNU Binutils with patches for OS216
Revision | d9d11c361cc29bdac2d2d6c38bce329d25abf7af (tree) |
---|---|
Time | 2015-07-20 13:59:37 |
Author | Alan Modra <amodra@gmai...> |
Commiter | Alan Modra |
ALIGN change affects cris scripts
More fallout from a2c59f28. This one could have been fixed by simply
using ". = ALIGN (ABSOLUTE (.), 2);" but it's nicer to align the
section.
* emulparams/criself.sh (INIT_ADDR, FINI_ADDR): Define.
(INIT_START, FINI_START): Don't ALIGN.
* scriptempl/elf.sc (.init, .fini): Apply INIT_ADDR/FINI_ADDR.
@@ -1,5 +1,11 @@ | ||
1 | 1 | 2015-07-20 Alan Modra <amodra@gmail.com> |
2 | 2 | |
3 | + * emulparams/criself.sh (INIT_ADDR, FINI_ADDR): Define. | |
4 | + (INIT_START, FINI_START): Don't ALIGN. | |
5 | + * scriptempl/elf.sc (.init, .fini): Apply INIT_ADDR/FINI_ADDR. | |
6 | + | |
7 | +2015-07-20 Alan Modra <amodra@gmail.com> | |
8 | + | |
3 | 9 | * scripttempl/elf.sc (.ldata, .bss): Align absolute value of dot. |
4 | 10 | * ldexp.c (is_align_conditional): Handle binary ALIGN. |
5 | 11 | (exp_fold_tree_1): Move code setting SEC_KEEP for assignments to |
@@ -55,8 +55,9 @@ OTHER_BSS_END_SYMBOLS=' | ||
55 | 55 | ' |
56 | 56 | OTHER_END_SYMBOLS='PROVIDE (__end = .);' |
57 | 57 | |
58 | +INIT_ADDR='ALIGN (2)' | |
59 | + | |
58 | 60 | INIT_START=' |
59 | - . = ALIGN(2); | |
60 | 61 | ___init__start = .; |
61 | 62 | PROVIDE (___do_global_ctors = .); |
62 | 63 | ' |
@@ -66,8 +67,9 @@ INIT_END=' | ||
66 | 67 | PROVIDE (___init__end = .); |
67 | 68 | ' |
68 | 69 | |
70 | +FINI_ADDR='ALIGN (2)' | |
71 | + | |
69 | 72 | FINI_START=' |
70 | - . = ALIGN (2); | |
71 | 73 | ___fini__start = .; |
72 | 74 | PROVIDE (___do_global_dtors = .); |
73 | 75 | ' |
@@ -474,7 +474,7 @@ emit_dyn() | ||
474 | 474 | test -n "${NON_ALLOC_DYN}${SEPARATE_CODE}" || emit_dyn |
475 | 475 | |
476 | 476 | cat <<EOF |
477 | - .init ${RELOCATING-0} : | |
477 | + .init ${RELOCATING-0}${RELOCATING+${INIT_ADDR}} : | |
478 | 478 | { |
479 | 479 | ${RELOCATING+${INIT_START}} |
480 | 480 | KEEP (*(SORT_NONE(.init))) |
@@ -495,7 +495,7 @@ cat <<EOF | ||
495 | 495 | *(.gnu.warning) |
496 | 496 | ${RELOCATING+${OTHER_TEXT_SECTIONS}} |
497 | 497 | } ${FILL} |
498 | - .fini ${RELOCATING-0} : | |
498 | + .fini ${RELOCATING-0}${RELOCATING+${FINI_ADDR}} : | |
499 | 499 | { |
500 | 500 | ${RELOCATING+${FINI_START}} |
501 | 501 | KEEP (*(SORT_NONE(.fini))) |