diff options
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r-- | bfd/coffcode.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h index e3f4afd..2792703 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -5192,6 +5192,12 @@ SUBSUBSECTION 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) \ { \ @@ -5208,7 +5214,8 @@ SUBSUBSECTION 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; \ } |