diff options
author | Nick Clifton <nickc@redhat.com> | 2004-07-13 18:56:38 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2004-07-13 18:56:38 +0000 |
commit | c99b813881319e6820bb60d837515b5df9837e2c (patch) | |
tree | 3ad39c041fd81aab9c74d942972770362ceee049 /ld/emultempl | |
parent | 0477af35bf6a93d1b215128bc2f7bdd8a90866d9 (diff) | |
download | gdb-c99b813881319e6820bb60d837515b5df9837e2c.zip gdb-c99b813881319e6820bb60d837515b5df9837e2c.tar.gz gdb-c99b813881319e6820bb60d837515b5df9837e2c.tar.bz2 |
(make_import_fixup): Use bfd_get_32 to correct for endian-ness of extracted
addend.
Diffstat (limited to 'ld/emultempl')
-rw-r--r-- | ld/emultempl/pe.em | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em index 4438afd..7c5b2d0 100644 --- a/ld/emultempl/pe.em +++ b/ld/emultempl/pe.em @@ -842,17 +842,17 @@ static int make_import_fixup (arelent *rel, asection *s) { struct bfd_symbol *sym = *rel->sym_ptr_ptr; - int addend = 0; + char addend[4]; if (pe_dll_extra_pe_debug) printf ("arelent: %s@%#lx: add=%li\n", sym->name, (long) rel->address, (long) rel->addend); - if (! bfd_get_section_contents (s->owner, s, &addend, rel->address, sizeof (addend))) + if (! bfd_get_section_contents (s->owner, s, addend, rel->address, sizeof (addend))) einfo (_("%C: Cannot get section contents - auto-import exception\n"), s->owner, s, rel->address); - pe_create_import_fixup (rel, s, addend); + pe_create_import_fixup (rel, s, bfd_get_32 (s->owner, addend)); return 1; } |