diff options
author | Ian Lance Taylor <ian@airs.com> | 1994-01-24 23:56:56 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1994-01-24 23:56:56 +0000 |
commit | a20bdb43f00dc9c85ce502b129acace410dbc22d (patch) | |
tree | eb4a03b184f49681ddaf7b6f529568e015ea0da6 /bfd/linker.c | |
parent | d4fb8fced1fb770654c7ed860cc194eddab9f83e (diff) | |
download | gdb-a20bdb43f00dc9c85ce502b129acace410dbc22d.zip gdb-a20bdb43f00dc9c85ce502b129acace410dbc22d.tar.gz gdb-a20bdb43f00dc9c85ce502b129acace410dbc22d.tar.bz2 |
* linker.c (generic_link_check_achive_element): Set SEC_ALLOC flag
for a created common section.
(_bfd_generic_link_add_one_symbol): Likewise.
Diffstat (limited to 'bfd/linker.c')
-rw-r--r-- | bfd/linker.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bfd/linker.c b/bfd/linker.c index e5f614d..2f3ac82 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -975,6 +975,7 @@ generic_link_check_archive_element (abfd, info, pneeded) else h->u.c.section = bfd_make_section_old_way (symbfd, p->section->name); + h->u.c.section->flags = SEC_ALLOC; } else { @@ -1287,9 +1288,15 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value, h->type = bfd_link_hash_common; h->u.c.size = value; if (section == &bfd_com_section) - h->u.c.section = bfd_make_section_old_way (abfd, "COMMON"); + { + h->u.c.section = bfd_make_section_old_way (abfd, "COMMON"); + h->u.c.section->flags = SEC_ALLOC; + } else if (section->owner != abfd) - h->u.c.section = bfd_make_section_old_way (abfd, section->name); + { + h->u.c.section = bfd_make_section_old_way (abfd, section->name); + h->u.c.section->flags = SEC_ALLOC; + } else h->u.c.section = section; break; |