From 01cc8ff856f0530ce7333a7bdac283c51b0e4f5e Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 14 Apr 2000 01:58:29 +0000 Subject: Zero start address of orphan ~(SEC_LOAD | SEC_ALLOC) sections. --- ld/emultempl/pe.em | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'ld/emultempl/pe.em') 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 -- cgit v1.1