Do not screw with debugging symbols that have forward references.

Fixes an obscure problem with -O3 and global {con,de}structors with egcs.
This commit is contained in:
mycroft 1998-11-24 17:59:33 +00:00
parent 799ebea61d
commit a9264c7e35

View File

@ -469,8 +469,9 @@ object_headers *headers;
/* JF deal with forward references first... */
for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next(symbolP)) {
if (symbolP->sy_forward && symbolP->sy_forward != symbolP) {
S_SET_SEGMENT(symbolP,
S_GET_SEGMENT(symbolP->sy_forward));
if (!S_IS_DEBUG(symbolP))
S_SET_SEGMENT(symbolP,
S_GET_SEGMENT(symbolP->sy_forward));
S_SET_VALUE(symbolP, S_GET_VALUE(symbolP)
+ S_GET_VALUE(symbolP->sy_forward)
+ symbolP->sy_forward->sy_frag->fr_address);