diff options
author | Jakub Jelinek <jakub@redhat.com> | 2002-02-12 14:50:08 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2002-02-12 14:50:08 +0000 |
commit | 2d20f7bf674ff3f0f43842677c70fc2879c5e2c7 (patch) | |
tree | 486a0034e29b96292c8bc2fbcd053045be1878ea /ld/scripttempl | |
parent | d2c1cacb1ee42bfab028bb553f4017ac54725843 (diff) | |
download | gdb-2d20f7bf674ff3f0f43842677c70fc2879c5e2c7.zip gdb-2d20f7bf674ff3f0f43842677c70fc2879c5e2c7.tar.gz gdb-2d20f7bf674ff3f0f43842677c70fc2879c5e2c7.tar.bz2 |
* ldlex.l (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
* ldgram.y (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): New tokens.
(exp): Add DATA_SEGMENT_ALIGN (exp, exp) and DATA_SEGMENT_END (exp).
* ldexp.c (exp_data_seg): New variable.
(exp_print_token): Handle DATA_SEGMENT_ALIGN and DATA_SEGMENT_END.
(fold_binary): Handle DATA_SEGMENT_ALIGN.
(exp_fold_tree): Handle DATA_SEGMENT_END.
Pass allocation_done when recursing instead of hardcoding
lang_allocating_phase_enum.
* ldexp.h (exp_data_seg): New.
* ldlang.c (lang_size_sections_1): Renamed from lang_size_sections.
(lang_size_sections): New.
* ld.texinfo (DATA_SEGMENT_ALIGN, DATA_SEGMENT_END): Document.
* scripttempl/elf.sc: Use DATA_SEGMENT_ALIGN and DATA_SEGMENT_END
if COMMONPAGESIZE is defined.
* emulparams/elf_i386.sh (COMMONPAGESIZE): Set to 4K.
* emulparams/elf32_sparc.sh (COMMONPAGESIZE): Set to 8K.
* emulparams/elf64_sparc.sh (COMMONPAGESIZE): Set to 8K.
* emulparams/elf64alpha.sh (COMMONPAGESIZE): Set to 8K.
* emulparams/elf64_ia64.sh (COMMONPAGESIZE): Set to 16K for shared
libraries only.
Diffstat (limited to 'ld/scripttempl')
-rw-r--r-- | ld/scripttempl/elf.sc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc index fe8e242..be6fc09 100644 --- a/ld/scripttempl/elf.sc +++ b/ld/scripttempl/elf.sc @@ -70,6 +70,10 @@ if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHI test -z "${ELFSIZE}" && ELFSIZE=32 test -z "${ALIGNMENT}" && ALIGNMENT="${ELFSIZE} / 8" test "$LD_FLAG" = "N" && DATA_ADDR=. +DATA_SEGMENT_ALIGN="ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))" +if [ -n "${COMMONPAGESIZE}" ]; then + DATA_SEGMENT_ALIGN="DATA_SEGMENT_ALIGN(${MAXPAGESIZE}, ${COMMONPAGESIZE})" +fi INTERP=".interp ${RELOCATING-0} : { *(.interp) }" PLT=".plt ${RELOCATING-0} : { *(.plt) }" DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }" @@ -269,8 +273,8 @@ cat <<EOF /* Adjust the address for the data segment. We want to adjust up to the same address within the page on the next page up. */ - ${CREATE_SHLIB-${RELOCATING+. = ${DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}} - ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}} + ${CREATE_SHLIB-${RELOCATING+. = ${DATA_ADDR-${DATA_SEGMENT_ALIGN}};}} + ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-${DATA_SEGMENT_ALIGN}};}} .data ${RELOCATING-0} : { @@ -316,6 +320,7 @@ cat <<EOF ${RELOCATING+_end = .;} ${RELOCATING+${OTHER_BSS_END_SYMBOLS}} ${RELOCATING+PROVIDE (end = .);} + ${COMMONPAGESIZE+${RELOCATING+. = DATA_SEGMENT_END (.);}} /* Stabs debugging sections. */ .stab 0 : { *(.stab) } |