aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-05-06 08:54:44 +0000
committerAlan Modra <amodra@gmail.com>2002-05-06 08:54:44 +0000
commitfd984e46b6590664ac6914e31f1dfc66d2efb113 (patch)
tree29be7cffb452604d0e82ac1f33d7bc854418482d /bfd/elflink.h
parenta02d59651805366dd955dde44f419ac3346ef799 (diff)
downloadgdb-fd984e46b6590664ac6914e31f1dfc66d2efb113.zip
gdb-fd984e46b6590664ac6914e31f1dfc66d2efb113.tar.gz
gdb-fd984e46b6590664ac6914e31f1dfc66d2efb113.tar.bz2
* elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
when not relocatable. Fix reloc_emitter call for K&R.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index 06035b3..37b2150 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -6776,7 +6776,7 @@ elf_link_input_bfd (finfo, input_bfd)
irela->r_offset += o->output_offset;
/* Relocs in an executable have to be virtual addresses. */
- if (finfo->info->emitrelocations)
+ if (!finfo->info->relocateable)
irela->r_offset += o->output_section->vma;
r_symndx = ELF_R_SYM (irela->r_info);
@@ -6908,7 +6908,8 @@ elf_link_input_bfd (finfo, input_bfd)
{
internal_relocs += (NUM_SHDR_ENTRIES (input_rel_hdr)
* bed->s->int_rels_per_ext_rel);
- reloc_emitter (output_bfd, o, input_rel_hdr, internal_relocs);
+ (*reloc_emitter) (output_bfd, o, input_rel_hdr,
+ internal_relocs);
}
}