summaryrefslogtreecommitdiff
path: root/ld/ldexp.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-06-11 13:23:49 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-06-11 13:23:49 +0000
commitd93cb9f8c6d3493af7cac8f793913fdddea723b9 (patch)
tree3c593b5bef5423acf1d33e58271fcb92ffe055a3 /ld/ldexp.c
parent755dac6db7785ed7ad9c7fad62573792c17f0572 (diff)
downloadbinutils-redhat-d93cb9f8c6d3493af7cac8f793913fdddea723b9.tar.gz
Don't hardcode .got.plt into DATA_SEGMENT_RELRO_END evaluation
ld/ PR ld/14215 * ldexp.c (fold_name <SIZEOF, ALIGNOF>): Allow forward section references. * emulparams/elf32_x86_64.sh (SEPARATE_GOTPLT): Depend on size of .got.plt. * emulparams/elf32mb_linux.sh (SEPARATE_GOTPLT): Likewise. * emulparams/elf32tilegx.sh (SEPARATE_GOTPLT): Likewise. * emulparams/elf32tilepro.sh (SEPARATE_GOTPLT): Likewise. * emulparams/elf64tilegx.sh (SEPARATE_GOTPLT): Likewise. * emulparams/elf_i386.sh (SEPARATE_GOTPLT): Likewise. * emulparams/elf_k1om.sh (SEPARATE_GOTPLT): Likewise. * emulparams/elf_l1om.sh (SEPARATE_GOTPLT): Likewise. * emulparams/elf_x86_64.sh (SEPARATE_GOTPLT): Likewise. ld/testsuite/ PR ld/14215 * ld-i386/i386.exp: Run pr14215. * ld-x86-64/x86-64.exp: Likewise. * ld-i386/pr14215.d: New file. * ld-i386/pr14215.s: Likewise. * ld-x86-64/pr14215.d: Likewise. * ld-x86-64/pr14215.s: Likewise.
Diffstat (limited to 'ld/ldexp.c')
-rw-r--r--ld/ldexp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ld/ldexp.c b/ld/ldexp.c
index 3bddc813e0..d83e274f27 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -681,7 +681,7 @@ fold_name (etree_type *tree)
tree, tree->name.name);
new_number (0);
}
- else if (os->processed_vma)
+ else if (os->bfd_section != NULL)
{
bfd_vma val;
@@ -693,6 +693,8 @@ fold_name (etree_type *tree)
new_number (val);
}
+ else
+ new_number (0);
}
break;