+2004-07-23 Nick Clifton <nickc@redhat.com>
+
+ * emultempl/elf32.em (_place_orphan): Use an already existing
+ section name if that section does not have any flags set.
+
2004-07-21 H.J. Lu <hongjiu.lu@intel.com>
* ldlang.c (already_linked_hash_entry): Removed.
lang_statement_union_type **os_tail;
etree_type *load_base;
int isdyn = 0;
+ asection *sec;
secname = bfd_get_section_name (s->owner, s);
+
if (! link_info.relocatable
&& link_info.combreloc
&& (s->flags & SEC_ALLOC)
/* Choose a unique name for the section. This will be needed if the
same section name appears in the input file with different
- loadable or allocatable characteristics. */
- if (bfd_get_section_by_name (output_bfd, secname) != NULL)
+ loadable or allocatable characteristics. But if the section
+ already exists but does not have any flags set, then it has been
+ been created by the linker, probably as a result of a --section-start
+ command line switch. */
+ if ((sec = bfd_get_section_by_name (output_bfd, secname)) != NULL
+ && bfd_get_section_flags (output_bfd, sec) != 0)
{
secname = bfd_get_unique_section_name (output_bfd, secname, &count);
if (secname == NULL)
for (u = lang_output_section_statement.head; u != NULL; u = lookup->next)
{
lookup = &u->output_section_statement;
+
if (strcmp (name, lookup->name) == 0
&& lookup->constraint != -1
&& (constraint == 0 || constraint == lookup->constraint))