diff options
author | Alan Modra <amodra@gmail.com> | 2002-07-20 13:41:11 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2002-07-20 13:41:11 +0000 |
commit | 25844aaec2671c9975e2cbad8637bec980d9ecee (patch) | |
tree | 8a2a57b59c3229f4c219a4f5fd01306a06f7bdc8 /ld/emultempl/mmo.em | |
parent | c0647bfc65ff9823ce5a75489a64027cb429caa4 (diff) | |
download | gdb-25844aaec2671c9975e2cbad8637bec980d9ecee.zip gdb-25844aaec2671c9975e2cbad8637bec980d9ecee.tar.gz gdb-25844aaec2671c9975e2cbad8637bec980d9ecee.tar.bz2 |
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Don't
bomb on /DISCARD/ input section.
* emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
* emultempl/mmo.em (mmo_place_orphan): Likewise.
Diffstat (limited to 'ld/emultempl/mmo.em')
-rw-r--r-- | ld/emultempl/mmo.em | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ld/emultempl/mmo.em b/ld/emultempl/mmo.em index 23bab16..8b17dcc 100644 --- a/ld/emultempl/mmo.em +++ b/ld/emultempl/mmo.em @@ -152,6 +152,11 @@ mmo_place_orphan (file, s) /* Restore the global list pointer. */ stat_ptr = old; + snew = os->bfd_section; + if (snew == NULL) + /* /DISCARD/ section. */ + return true; + /* We need an output section for .text as a root, so if there was none (might happen with a peculiar linker script such as in "map addresses", map-address.exp), we grab the output section created @@ -163,7 +168,6 @@ mmo_place_orphan (file, s) hold_text.os = os; } - snew = os->bfd_section; bfd_section = place->os->bfd_section; if (place->section == NULL && bfd_section == NULL) bfd_section = output_prev_sec_find (place->os); |