cache_ptr->addend = - coffsym->native->u.syment.n_value; \
else if (ptr && bfd_asymbol_bfd (ptr) == abfd \
&& ptr->section != (asection *) NULL) \
- cache_ptr->addend = - (ptr->section->vma + ptr->value); \
+ cache_ptr->addend = - (ptr->section->vma \
+ + COFF_PE_ADDEND_BIAS (ptr)); \
else \
cache_ptr->addend = 0; \
if (ptr && reloc.r_type < NUM_HOWTOS \
cache_ptr->addend = 0; \
else if (ptr && bfd_asymbol_bfd (ptr) == abfd \
&& ptr->section != (asection *) NULL) \
- cache_ptr->addend = - (ptr->section->vma + ptr->value); \
+ cache_ptr->addend = - (ptr->section->vma \
+ + COFF_PE_ADDEND_BIAS (ptr)); \
else \
cache_ptr->addend = 0; \
if ((reloc).r_type == R_SH_SWITCH8 \
cache_ptr->addend = - coffsym->native->u.syment.n_value; \
else if (ptr && bfd_asymbol_bfd (ptr) == abfd \
&& ptr->section != NULL) \
- cache_ptr->addend = - (ptr->section->vma + ptr->value); \
+ cache_ptr->addend = - (ptr->section->vma \
+ + COFF_PE_ADDEND_BIAS (ptr)); \
else \
cache_ptr->addend = 0; \
if (ptr && reloc.r_type < NUM_HOWTOS \
final-linked object. See @code{CALC_ADDEND}.
*/
+#ifdef COFF_WITH_PE
+#define COFF_PE_ADDEND_BIAS(ptr) 0 /* Symbol value not stored in raw data. */
+#else
+#define COFF_PE_ADDEND_BIAS(ptr) ((ptr)->value)
+#endif
+
#ifndef CALC_ADDEND
#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr) \
{ \
cache_ptr->addend = 0; \
else if (ptr && bfd_asymbol_bfd (ptr) == abfd \
&& ptr->section != NULL) \
- cache_ptr->addend = - (ptr->section->vma + ptr->value); \
+ cache_ptr->addend = - (ptr->section->vma \
+ + COFF_PE_ADDEND_BIAS (ptr)); \
else \
cache_ptr->addend = 0; \
}
0+008 <global_sym\+0x4> e1a00000 nop @ \(mov r0, r0\)
0+00c <global_sym\+0x8> e1a00000 nop @ \(mov r0, r0\)
0+010 <global_sym\+0xc> eafffffb b f+ff8 <global_sym\+0xf+ff4>
- 10: ARM_26D global_sym-0x4
+ 10: ARM_26D global_sym
0+014 <global_sym\+0x10> ebfffffa bl f+ff4 <global_sym\+0xf+ff0>
- 14: ARM_26D global_sym-0x4
+ 14: ARM_26D global_sym
0+018 <global_sym\+0x14> 0afffff9 beq f+ff0 <global_sym\+0xf+fec>
- 18: ARM_26D global_sym-0x4
+ 18: ARM_26D global_sym
0+01c <global_sym\+0x18> eafffff8 b 0+004 <global_sym>
0+020 <global_sym\+0x1c> ebfffff7 bl 0+004 <global_sym>
0+024 <global_sym\+0x20> 0afffff6 beq 0+004 <global_sym>