diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2009-03-10 00:48:10 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2009-03-10 00:48:10 +0000 |
commit | 0691f7afbc8ec41ca26f21b5dafc4eeb4ca517eb (patch) | |
tree | d24b507deb24e0af671e2174cec22ba0e31fbf70 /binutils/objcopy.c | |
parent | 47d6e8f1cc45e5a564118078c46cadf4fc78c96d (diff) | |
download | gdb-0691f7afbc8ec41ca26f21b5dafc4eeb4ca517eb.zip gdb-0691f7afbc8ec41ca26f21b5dafc4eeb4ca517eb.tar.gz gdb-0691f7afbc8ec41ca26f21b5dafc4eeb4ca517eb.tar.bz2 |
binutils/
2009-03-09 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/9933
* objcopy.c (filter_symbols): Properly handle common symbols
in relocatable file.
binutils/testsuite/
2009-03-09 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/9933
* binutils-all/copy-4.d: New.
* binutils-all/objcopy.exp: Run copy-4.
Diffstat (limited to 'binutils/objcopy.c')
-rw-r--r-- | binutils/objcopy.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 6523110..07d4f3f 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -1028,7 +1028,8 @@ filter_symbols (bfd *abfd, bfd *obfd, asymbol **osyms, used_in_reloc = TRUE; } else if (relocatable /* Relocatable file. */ - && (flags & (BSF_GLOBAL | BSF_WEAK)) != 0) + && ((flags & (BSF_GLOBAL | BSF_WEAK)) != 0 + || bfd_is_com_section (bfd_get_section (sym)))) keep = TRUE; else if (bfd_decode_symclass (sym) == 'I') /* Global symbols in $idata sections need to be retained |