diff options
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elflink.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 63813e47..7c58a86 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2017-08-06 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/21903: + * elflink.c (elf_link_add_object_symbols): Treat common symbol + as undefined for --no-define-common. + 2017-08-05 Alan Modra <amodra@gmail.com> * elf32-hppa.c (elf32_hppa_set_gp): Don't require an diff --git a/bfd/elflink.c b/bfd/elflink.c index eff53ac..0cc5f87 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -4250,6 +4250,11 @@ error_free_dyn: override = FALSE; + /* Treat common symbol as undefined for --no-define-common. */ + if (isym->st_shndx == SHN_COMMON + && info->inhibit_common_definition) + isym->st_shndx = SHN_UNDEF; + flags = BSF_NO_FLAGS; sec = NULL; value = isym->st_value; |