diff options
author | Alan Modra <amodra@gmail.com> | 2013-03-26 07:02:52 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2013-03-26 07:02:52 +0000 |
commit | ffd65175b8323bbfba7fce227b23f6a22294fdda (patch) | |
tree | fc349b057234c9967a06466b75a7c263b9d6201e /bfd | |
parent | 3a81e8251e18c6266f5b1c5147a9264da30fc5f0 (diff) | |
download | gdb-ffd65175b8323bbfba7fce227b23f6a22294fdda.zip gdb-ffd65175b8323bbfba7fce227b23f6a22294fdda.tar.gz gdb-ffd65175b8323bbfba7fce227b23f6a22294fdda.tar.bz2 |
* elflink.c (_bfd_elf_add_default_symbol): Preserve section
over _bfd_elf_merge_symbol calls.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elflink.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 30e64ba..e6e6c77 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2013-03-26 Alan Modra <amodra@gmail.com> + * elflink.c (_bfd_elf_add_default_symbol): Preserve section + over _bfd_elf_merge_symbol calls. + +2013-03-26 Alan Modra <amodra@gmail.com> + * elflink.c (elf_link_add_object_symbols): Add assertion for common override alignment check code. Formatting. diff --git a/bfd/elflink.c b/bfd/elflink.c index 15909c2..bb98138 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -1600,6 +1600,7 @@ _bfd_elf_add_default_symbol (bfd *abfd, bfd_boolean override; char *p; size_t len, shortlen; + asection *tmp_sec; /* If this symbol has a version, and it is the default version, we create an indirect symbol from the default name to the fully @@ -1626,7 +1627,8 @@ _bfd_elf_add_default_symbol (bfd *abfd, actually going to define an indirect symbol. */ type_change_ok = FALSE; size_change_ok = FALSE; - if (!_bfd_elf_merge_symbol (abfd, info, shortname, sym, &sec, &value, + tmp_sec = sec; + if (!_bfd_elf_merge_symbol (abfd, info, shortname, sym, &tmp_sec, &value, &hi, poldbfd, NULL, NULL, &skip, &override, &type_change_ok, &size_change_ok)) return FALSE; @@ -1734,7 +1736,8 @@ nondefault: /* Once again, merge with any existing symbol. */ type_change_ok = FALSE; size_change_ok = FALSE; - if (!_bfd_elf_merge_symbol (abfd, info, shortname, sym, &sec, &value, + tmp_sec = sec; + if (!_bfd_elf_merge_symbol (abfd, info, shortname, sym, &tmp_sec, &value, &hi, NULL, NULL, NULL, &skip, &override, &type_change_ok, &size_change_ok)) return FALSE; |