diff options
author | Alan Modra <amodra@gmail.com> | 2004-04-30 14:26:09 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2004-04-30 14:26:09 +0000 |
commit | d0d6a25bf3db9eea811699671a0f218e75586ca0 (patch) | |
tree | 57170b63f32c81a1cf2629a78dab3d484b061c4f /ld/ldlang.c | |
parent | 72adc230457cc2885fe394ab4647dceab2d9d0aa (diff) | |
download | gdb-d0d6a25bf3db9eea811699671a0f218e75586ca0.zip gdb-d0d6a25bf3db9eea811699671a0f218e75586ca0.tar.gz gdb-d0d6a25bf3db9eea811699671a0f218e75586ca0.tar.bz2 |
* ldlang.c (unique_section_p): Pass section parm, return true on
group sections.
(output_section_callback): Adjust.
* ldlang.h (unique_section_p): Update prototype.
* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index 6460c32..d2b5fed 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -121,10 +121,17 @@ stat_alloc (size_t size) } bfd_boolean -unique_section_p (const char *secnam) +unique_section_p (const asection *sec) { struct unique_sections *unam; + const char *secnam; + if (link_info.relocatable + && sec->owner != NULL + && bfd_is_group_section (sec->owner, sec)) + return TRUE; + + secnam = sec->name; for (unam = unique_section_list; unam; unam = unam->next) if (wildcardp (unam->name) ? fnmatch (unam->name, secnam, 0) == 0 @@ -1262,7 +1269,7 @@ output_section_callback (lang_wild_statement_type *ptr, lang_statement_union_type *before; /* Exclude sections that match UNIQUE_SECTION_LIST. */ - if (unique_section_p (bfd_get_section_name (file->the_bfd, section))) + if (unique_section_p (section)) return; /* If the wild pattern was marked KEEP, the member sections |