* ldlang.c (IGNORE_SECTION): Don't ignore SEC_ALLOC && !SEC_LOAD
authorAlan Modra <amodra@gmail.com>
Mon, 12 Jan 2004 13:47:32 +0000 (13:47 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 12 Jan 2004 13:47:32 +0000 (13:47 +0000)
sections.  Do ignore SEC_NEVER_LOAD sections.
(lang_size_sections_1): Remove test made redundant with the above.

ld/ChangeLog
ld/ldlang.c

index e6c03c8fd4bb3bfe4428f505160e7e810c9056df..6372a53463977b723b64cfa6122fcf7fc346c313 100644 (file)
@@ -1,3 +1,9 @@
+2004-01-13  Alan Modra  <amodra@bigpond.net.au>
+
+       * ldlang.c (IGNORE_SECTION): Don't ignore SEC_ALLOC && !SEC_LOAD
+       sections.  Do ignore SEC_NEVER_LOAD sections.
+       (lang_size_sections_1): Remove test made redundant with the above.
+
 2004-01-09  Alan Modra  <amodra@bigpond.net.au>
 
        * emultempl/ppc64elf.em (ppc_before_allocation): Clear cached
index 55714c97667b6ba10c633ec82d51ff2afbdd1c3e..5a832b1ced317ea893fff8e262ca435f01ab7f3b 100644 (file)
@@ -2762,8 +2762,8 @@ size_input_section (lang_statement_union_type **this_ptr,
 }
 
 #define IGNORE_SECTION(bfd, s) \
-  (((bfd_get_section_flags (bfd, s) & (SEC_ALLOC | SEC_LOAD))  \
-    != (SEC_ALLOC | SEC_LOAD))                                 \
+  (((bfd_get_section_flags (bfd, s) & (SEC_ALLOC | SEC_NEVER_LOAD))    \
+    != SEC_ALLOC)                                                      \
    || bfd_section_size (bfd, s) == 0)
 
 /* Check to see if any allocated sections overlap with other allocated
@@ -2930,8 +2930,6 @@ lang_size_sections_1
                       region, and some non default memory regions were
                       defined, issue an error message.  */
                    if (!IGNORE_SECTION (output_bfd, os->bfd_section)
-                       && (bfd_get_section_flags (output_bfd, os->bfd_section)
-                           & SEC_NEVER_LOAD) == 0
                        && ! link_info.relocatable
                        && check_regions
                        && strcmp (os->region->name, DEFAULT_MEMORY_REGION) == 0