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.
This commit is contained in:
Alan Modra 2015-07-20 14:29:37 +09:30
parent e474ab13ec
commit d9d11c361c
3 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2015-07-20 Alan Modra <amodra@gmail.com>
* 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.
2015-07-20 Alan Modra <amodra@gmail.com>
* scripttempl/elf.sc (.ldata, .bss): Align absolute value of dot.

View File

@ -55,8 +55,9 @@ OTHER_BSS_END_SYMBOLS='
'
OTHER_END_SYMBOLS='PROVIDE (__end = .);'
INIT_ADDR='ALIGN (2)'
INIT_START='
. = ALIGN(2);
___init__start = .;
PROVIDE (___do_global_ctors = .);
'
@ -66,8 +67,9 @@ INIT_END='
PROVIDE (___init__end = .);
'
FINI_ADDR='ALIGN (2)'
FINI_START='
. = ALIGN (2);
___fini__start = .;
PROVIDE (___do_global_dtors = .);
'

View File

@ -474,7 +474,7 @@ emit_dyn()
test -n "${NON_ALLOC_DYN}${SEPARATE_CODE}" || emit_dyn
cat <<EOF
.init ${RELOCATING-0} :
.init ${RELOCATING-0}${RELOCATING+${INIT_ADDR}} :
{
${RELOCATING+${INIT_START}}
KEEP (*(SORT_NONE(.init)))
@ -495,7 +495,7 @@ cat <<EOF
*(.gnu.warning)
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} ${FILL}
.fini ${RELOCATING-0} :
.fini ${RELOCATING-0}${RELOCATING+${FINI_ADDR}} :
{
${RELOCATING+${FINI_START}}
KEEP (*(SORT_NONE(.fini)))