From: nickc Date: Tue, 8 Jan 2002 06:52:57 +0000 (+0000) Subject: If a symbol ref is in the constant pool, use the pool's version of the symbol instead. X-Git-Url: http://git.sourceforge.jp/view?a=commitdiff_plain;h=58f036fc598ca03d884b8f4ef059899c83c54310;p=pf3gnuchains%2Fgcc-fork.git If a symbol ref is in the constant pool, use the pool's version of the symbol instead. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48625 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cfff16965f0..ad31debc0f0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-01-08 Nick Clifton + + * dbxout.c (dbxout_symbol_location): If a symbol ref is in the + constant pool, use the pool's version of the symbol instead. + 2002-01-07 Richard Henderson * regrename.c (find_oldest_value_reg): Ignore the value chain if diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 2ee877d3fb6..00a15820ef7 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -2164,6 +2164,20 @@ dbxout_symbol_location (decl, type, suffix, home) current_sym_code = DBX_STATIC_CONST_VAR_CODE; else { + /* Some ports can transform a symbol ref into a label ref, + because the symbol ref is too far away and has to be + dumped into a constant pool. Alternatively, the symbol + in the constant pool might be referenced by a different + symbol. */ + if (GET_CODE (current_sym_addr) == SYMBOL_REF + && CONSTANT_POOL_ADDRESS_P (current_sym_addr)) + { + rtx tmp = get_pool_constant (current_sym_addr); + + if (GET_CODE (tmp) == SYMBOL_REF) + current_sym_addr = tmp; + } + /* Ultrix `as' seems to need this. */ #ifdef DBX_STATIC_STAB_DATA_SECTION data_section ();