aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl/pe.em
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-04-14 01:58:29 +0000
committerAlan Modra <amodra@gmail.com>2000-04-14 01:58:29 +0000
commit01cc8ff856f0530ce7333a7bdac283c51b0e4f5e (patch)
tree5c7ff64ebfc68b057933fd51bdc46028bbacb3b1 /ld/emultempl/pe.em
parent4ab10e93d6f65abac0857f26c8b1431cc5f7f5f9 (diff)
downloadfsf-binutils-gdb-01cc8ff856f0530ce7333a7bdac283c51b0e4f5e.zip
fsf-binutils-gdb-01cc8ff856f0530ce7333a7bdac283c51b0e4f5e.tar.gz
fsf-binutils-gdb-01cc8ff856f0530ce7333a7bdac283c51b0e4f5e.tar.bz2
Zero start address of orphan ~(SEC_LOAD | SEC_ALLOC) sections.
Diffstat (limited to 'ld/emultempl/pe.em')
-rw-r--r--ld/emultempl/pe.em7
1 files changed, 2 insertions, 5 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 02ebd57..0a94f58 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -1100,9 +1100,6 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
const char *secname;
char *dollar = NULL;
- if ((s->flags & SEC_ALLOC) == 0)
- return false;
-
secname = bfd_get_section_name (s->owner, s);
/* Look through the script to see where to place this section. */
@@ -1199,8 +1196,8 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
stat_ptr = &add;
lang_list_init (stat_ptr);
- if (link_info.relocateable)
- address = NULL;
+ if (link_info.relocateable || (s->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
+ address = exp_intop ((bfd_vma) 0);
else
{
/* All sections in an executable must be aligned to a page