+ /* 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 (addr) == SYMBOL_REF
+ && CONSTANT_POOL_ADDRESS_P (addr))
+ {
+ bool marked;
+ rtx tmp = get_pool_constant_mark (addr, &marked);
+
+ if (GET_CODE (tmp) == SYMBOL_REF)
+ {
+ addr = tmp;
+ if (CONSTANT_POOL_ADDRESS_P (addr))
+ get_pool_constant_mark (addr, &marked);
+ else
+ marked = true;
+ }
+ else if (GET_CODE (tmp) == LABEL_REF)
+ {
+ addr = tmp;
+ marked = true;
+ }
+
+ /* If all references to the constant pool were optimized
+ out, we just ignore the symbol. */
+ if (!marked)
+ return 0;
+ }
+