diff options
author | Nick Clifton <nickc@cambridge.redhat.com> | 2002-01-08 06:52:57 +0000 |
---|---|---|
committer | Nick Clifton <nickc@gcc.gnu.org> | 2002-01-08 06:52:57 +0000 |
commit | 4b69f385cac1266755ef7ab03a2da68987d7de5c (patch) | |
tree | 9329986d69250335650c6bf2077cfd811fdb26ea /gcc/dbxout.c | |
parent | 57d1019b988976e66d1159f7c52384760ade227e (diff) | |
download | gcc-4b69f385cac1266755ef7ab03a2da68987d7de5c.zip gcc-4b69f385cac1266755ef7ab03a2da68987d7de5c.tar.gz gcc-4b69f385cac1266755ef7ab03a2da68987d7de5c.tar.bz2 |
If a symbol ref is in the constant pool, use the pool's version of the symbol instead.
From-SVN: r48625
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r-- | gcc/dbxout.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 2ee877d..00a1582 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 (); |