Article View: gnu.gdb.bug
Article #8882bfd/aoutx.h coding errors for Fortran common symbols
From: Paul Eggert
Date: Wed, 15 Jul 1992 21:46
Date: Wed, 15 Jul 1992 21:46
55 lines
2443 bytes
2443 bytes
bfd/aoutx.h (BFD 0.18, which is distributed with GDB 4.6) has some minor
botches when setting common symbol section and flags. Two
`cache_ptr->symbol.flags = 0' assignments are useless because
cache_ptr->symbol.flags is immediately set to some other value. Fortran
common symbols are treated first, as a special case, even though there's
nothing special about them and the extra comparison merely slows things down
for other symbols. Here is a patch.
===================================================================
RCS file: aoutx.h,v
retrieving revision 4.6
diff -c -r4.6 aoutx.h
*** aoutx.h 1992/06/16 14:03:00 4.6
--- aoutx.h 1992/07/15 21:30:30
***************
*** 1090,1105 ****
}
else {
- if (sym_is_fortrancommon (cache_ptr))
- {
- cache_ptr->symbol.flags = 0;
- cache_ptr->symbol.section = &bfd_com_section;
- }
- else {
-
-
- }
-
/* In a.out, the value of a symbol is always relative to the
* start of the file, if this is a data symbol we'll subtract
* the size of the text section to get the section relative
--- 1090,1095 ----
***************
*** 1121,1129 ****
cache_ptr->symbol.value -= obj_bsssec(abfd)->vma;
}
else if (sym_is_undefined (cache_ptr)) {
- cache_ptr->symbol.flags = 0;
cache_ptr->symbol.section = &bfd_und_section;
}
else if (sym_is_absolute(cache_ptr))
{
cache_ptr->symbol.section = &bfd_abs_section;
--- 1111,1120 ----
cache_ptr->symbol.value -= obj_bsssec(abfd)->vma;
}
else if (sym_is_undefined (cache_ptr)) {
cache_ptr->symbol.section = &bfd_und_section;
}
+ else if (sym_is_fortrancommon (cache_ptr))
+ cache_ptr->symbol.section = &bfd_com_section;
else if (sym_is_absolute(cache_ptr))
{
cache_ptr->symbol.section = &bfd_abs_section;
Technical Details
Message-ID:
<9207152146.AA20686@farside.twinsun.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!twinsun.COM!eggertShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5053,fd77d6db829a0e56,start X-Google-Attributes: gidf5053,public X-Google-ArrivalTime: 1992-07-15 16:59:08 PST Newsgroups: gnu.gdb.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!twinsun.COM!eggert From: eggert@twinsun.COM (Paul Eggert) Subject: bfd/aoutx.h coding errors for Fortran common symbols Message-ID: <9207152146.AA20686@farside.twinsun.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Wed, 15 Jul 1992 21:46:31 GMT Approved: bug-gdb@prep.ai.mit.edu Lines: 56