aboutsummaryrefslogtreecommitdiff
path: root/ld/scripttempl
diff options
context:
space:
mode:
Diffstat (limited to 'ld/scripttempl')
-rw-r--r--ld/scripttempl/elf.sc14
1 files changed, 9 insertions, 5 deletions
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index 07b0395..eb3312a 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -203,12 +203,12 @@ if test -z "${NO_SMALL_DATA}"; then
else
NO_SMALL_DATA=" "
fi
-if test -z "${DATA_GOT}"; then
+if test -z "${SDATA_GOT}${DATA_GOT}"; then
if test -n "${NO_SMALL_DATA}"; then
DATA_GOT=" "
fi
fi
-if test -z "${SDATA_GOT}"; then
+if test -z "${SDATA_GOT}${DATA_GOT}"; then
if test -z "${NO_SMALL_DATA}"; then
SDATA_GOT=" "
fi
@@ -574,11 +574,15 @@ cat <<EOF
${OTHER_RELRO_SECTIONS}
${TEXT_DYNAMIC-${DYNAMIC}}
${OTHER_RELRO_SECTIONS_2}
+ ${DATA_GOT+${RELRO_NOW+${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}}}
${DATA_GOT+${RELRO_NOW+${GOT}}}
${DATA_GOT+${RELRO_NOW+${GOTPLT}}}
${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT+${GOT}}}}
${RELOCATING+${DATA_SEGMENT_RELRO_END}}
${INITIAL_READWRITE_SECTIONS}
+ ${DATA_SDATA+${SDATA}}
+ ${DATA_SDATA+${OTHER_SDATA_SECTIONS}}
+ ${DATA_GOT+${RELRO_NOW-${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}}}
${DATA_GOT+${RELRO_NOW-${SEPARATE_GOTPLT-${GOT}}}}
${DATA_GOT+${RELRO_NOW-${GOTPLT}}}
@@ -595,12 +599,12 @@ cat <<EOF
${OTHER_READWRITE_SECTIONS}
${SMALL_DATA_CTOR+${RELOCATING+${CTOR}}}
${SMALL_DATA_DTOR+${RELOCATING+${DTOR}}}
- ${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}
+ ${SDATA_GOT+${DATA_PLT+${PLT_BEFORE_GOT+${PLT}}}}
${SDATA_GOT+${RELOCATING+${OTHER_GOT_SYMBOLS+. = .; ${OTHER_GOT_SYMBOLS}}}}
${SDATA_GOT+${GOT}}
${SDATA_GOT+${OTHER_GOT_SECTIONS}}
- ${SDATA}
- ${OTHER_SDATA_SECTIONS}
+ ${DATA_SDATA-${SDATA}}
+ ${DATA_SDATA-${OTHER_SDATA_SECTIONS}}
${RELOCATING+${DATA_END_SYMBOLS-${USER_LABEL_PREFIX}_edata = .; PROVIDE (${USER_LABEL_PREFIX}edata = .);}}
${RELOCATING+. = .;}
${RELOCATING+${USER_LABEL_PREFIX}__bss_start = .;}