From 1d475d825e36133b136f092ddac495cb1ca2eb88 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 5 Jun 2002 14:07:29 +0000 Subject: [PATCH] * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Place SEC_EXCLUDE sections when doing a relocatable link. --- ld/ChangeLog | 5 +++++ ld/emultempl/elf32.em | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index f4fc0994466..993eeb2af22 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2002-06-05 Alan Modra + + * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Place + SEC_EXCLUDE sections when doing a relocatable link. + 2002-06-04 Jason Thorpe * Makefile.am (ALL_EMULATIONS): Add eshelf32_nbsd.o, diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index b1e7dd31643..e854c2a3fbe 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -1107,7 +1107,7 @@ gld${EMULATION_NAME}_place_orphan (file, s) #define HAVE_SECTION(hold, name) \ (hold.os != NULL || (hold.os = lang_output_section_find (name)) != NULL) - if (s->flags & SEC_EXCLUDE) + if ((s->flags & SEC_EXCLUDE) != 0 && !link_info.relocateable) { if (s->output_section == NULL) s->output_section = bfd_abs_section_ptr; -- 2.30.2