aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/coffgen.c')
-rw-r--r--bfd/coffgen.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index f2410d9..47e5baa 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -608,8 +608,11 @@ fixup_symbol_value (abfd, coff_symbol_ptr, syment)
syment->n_value = (coff_symbol_ptr->symbol.value
+ coff_symbol_ptr->symbol.section->output_offset);
if (! obj_pe (abfd))
- syment->n_value +=
- coff_symbol_ptr->symbol.section->output_section->vma;
+ {
+ syment->n_value += (syment->n_sclass == C_STATLAB)
+ ? coff_symbol_ptr->symbol.section->output_section->lma
+ : coff_symbol_ptr->symbol.section->output_section->vma;
+ }
}
else
{