summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-08-13 10:56:21 +0000
committerAlan Modra <amodra@gmail.com>2001-08-13 10:56:21 +0000
commit0f33d40bfcd0478feec2b9bd32bd9c0a957bbf83 (patch)
treefd5375e34ddc4023ceb8019a5ca8f2f96705c44d
parentfbad9a25dbf090074a4efa848f7ca097b0382ef9 (diff)
downloadppe42-binutils-0f33d40bfcd0478feec2b9bd32bd9c0a957bbf83.tar.gz
ppe42-binutils-0f33d40bfcd0478feec2b9bd32bd9c0a957bbf83.zip
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Return
`true' for SEC_EXCLUDE sections so that the generic code doesn't needlessly create an output_section_statement. Treat a correctly named output_section_statement with NULL bfd_section as compatible.
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/emultempl/elf32.em11
2 files changed, 13 insertions, 5 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 3b0724f54c..45cb574e3e 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
+2001-08-13 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Return
+ `true' for SEC_EXCLUDE sections so that the generic code doesn't
+ needlessly create an output_section_statement. Treat a correctly
+ named output_section_statement with NULL bfd_section as compatible.
+
2001-08-13 Hans-Peter Nilsson <hp@bitrange.com>
* emultempl/generic.em: Support EXTRA_EM_FILE.
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index fff17f6a62..d6d472928e 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -1079,11 +1079,12 @@ gld${EMULATION_NAME}_place_orphan (file, s)
os = lang_output_section_find (secname);
if (os != NULL
- && os->bfd_section != NULL
- && ((s->flags ^ os->bfd_section->flags)
- & (SEC_LOAD | SEC_ALLOC)) == 0)
+ && (os->bfd_section == NULL
+ || ((s->flags ^ os->bfd_section->flags)
+ & (SEC_LOAD | SEC_ALLOC)) == 0))
{
- /* We have already placed a section with this name. */
+ /* We already have an output section statement with this
+ name, and its bfd section has compatible flags. */
wild_doit (&os->children, s, os, file);
return true;
}
@@ -1112,7 +1113,7 @@ gld${EMULATION_NAME}_place_orphan (file, s)
(hold.os != NULL || (hold.os = lang_output_section_find (name)) != NULL)
if (s->flags & SEC_EXCLUDE)
- return false;
+ return true;
place = NULL;
if ((s->flags & SEC_ALLOC) == 0)
OpenPOWER on IntegriCloud