diff options
author | Steve Chamberlain <steve@cygnus> | 1991-04-17 23:19:27 +0000 |
---|---|---|
committer | Steve Chamberlain <steve@cygnus> | 1991-04-17 23:19:27 +0000 |
commit | 301dfc71d4d0d371cd747d11b81ea3b002e48876 (patch) | |
tree | a95ce306d383293bfb4e76b860dce6d23e3e875b /bfd/coff-code.h | |
parent | 8ab76aa732704e27060b9ddd1645e06e8face7c6 (diff) | |
download | gdb-301dfc71d4d0d371cd747d11b81ea3b002e48876.zip gdb-301dfc71d4d0d371cd747d11b81ea3b002e48876.tar.gz gdb-301dfc71d4d0d371cd747d11b81ea3b002e48876.tar.bz2 |
Stuff
Diffstat (limited to 'bfd/coff-code.h')
-rwxr-xr-x | bfd/coff-code.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/bfd/coff-code.h b/bfd/coff-code.h index 97ca572..cf340c2 100755 --- a/bfd/coff-code.h +++ b/bfd/coff-code.h @@ -2332,15 +2332,20 @@ coff_slurp_reloc_table(abfd, asect, symbols) ptr = *(cache_ptr->sym_ptr_ptr); cache_ptr->address = src->r_vaddr; /* - The symbols definitions that we have read in have been - relocated as if their sections started at 0. But the offsets - refering to the symbols in the raw data have not been - modified, so we have to have a negative addend to compensate. - */ + The symbols definitions that we have read in have been + relocated as if their sections started at 0. But the offsets + refering to the symbols in the raw data have not been + modified, so we have to have a negative addend to compensate. + + Note that symbols which used to be common must be left alone + */ - if (ptr->the_bfd == abfd && ptr->section != (asection *) NULL) { - cache_ptr->addend = -(ptr->section->vma + ptr->value); - } + if (ptr->the_bfd == abfd + && ptr->section != (asection *) NULL + && ((ptr->flags & BSF_OLD_COMMON)== 0)) + { + cache_ptr->addend = -(ptr->section->vma + ptr->value); + } else { cache_ptr->addend = 0; } |