Index: elf32-arm.h =================================================================== --- elf32-arm.h Fri Jan 23 16:51:48 2004 +++ elf32-arm.h Thu Mar 11 05:21:01 2004 @@ -2431,9 +2431,14 @@ cannot actually cause any incompatibility. Do not short-circuit dynamic objects; their section list may be emptied by - elf_link_add_object_symbols. */ + elf_link_add_object_symbols. + Also check to see if there are no code sections in the input. + In this case there is no need to check for code specific flags. + XXX - do we need to worry about floating-point format compatability + in data sections ? */ if (!(ibfd->flags & DYNAMIC)) { bfd_boolean null_input_bfd = TRUE; + bfd_boolean only_data_sections = TRUE; for (sec = ibfd->sections; sec != NULL; sec = sec->next) @@ -2443,9 +2448,15 @@ && strcmp (sec->name, ".glue_7t")) { + if ((bfd_get_section_flags (ibfd, sec) + & (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) + == (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) + only_data_sections = FALSE; + null_input_bfd = FALSE; - break; } + } - if (null_input_bfd) + + if (null_input_bfd || only_data_sections) return TRUE; }