diff options
author | Alan Modra <amodra@gmail.com> | 2001-08-13 14:28:57 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2001-08-13 14:28:57 +0000 |
commit | 22af9fd35cb3a598f2bb2021c42cc1bd1424270f (patch) | |
tree | 139619d96d09db7f3966e9a878801338080a0187 /ld/emultempl | |
parent | 5d430f8ba5038caa6d1e102fd55651c53ab01747 (diff) | |
download | gdb-22af9fd35cb3a598f2bb2021c42cc1bd1424270f.zip gdb-22af9fd35cb3a598f2bb2021c42cc1bd1424270f.tar.gz gdb-22af9fd35cb3a598f2bb2021c42cc1bd1424270f.tar.bz2 |
* emultempl/elf32.em: For SEC_EXCLUDE sections, ensure that
output_section is set non-NULL.
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/elf32.em | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index d6d4729..ce06310 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -1084,7 +1084,7 @@ gld${EMULATION_NAME}_place_orphan (file, s) & (SEC_LOAD | SEC_ALLOC)) == 0)) { /* We already have an output section statement with this - name, and its bfd section has compatible flags. */ + name, and its bfd section, if any, has compatible flags. */ wild_doit (&os->children, s, os, file); return true; } @@ -1113,7 +1113,11 @@ gld${EMULATION_NAME}_place_orphan (file, s) (hold.os != NULL || (hold.os = lang_output_section_find (name)) != NULL) if (s->flags & SEC_EXCLUDE) - return true; + { + if (s->output_section == NULL) + s->output_section = bfd_abs_section_ptr; + return true; + } place = NULL; if ((s->flags & SEC_ALLOC) == 0) |