aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2004-01-12 13:47:32 +0000
committerAlan Modra <amodra@gmail.com>2004-01-12 13:47:32 +0000
commit8325c4dd4e375f8fbf9db03c2d73953e5b8cbad1 (patch)
tree5b298556688e70fcc9e5e8c89c0b6f0f94775fc9 /ld/ldlang.c
parent5b8c74e64fb62c37f18253dd6e8a896b54d92bab (diff)
downloadgdb-8325c4dd4e375f8fbf9db03c2d73953e5b8cbad1.zip
gdb-8325c4dd4e375f8fbf9db03c2d73953e5b8cbad1.tar.gz
gdb-8325c4dd4e375f8fbf9db03c2d73953e5b8cbad1.tar.bz2
* 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.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 55714c9..5a832b1 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -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