(make_import_fixup): Use bfd_get_32 to correct for endian-ness of extracted
addend.
This commit is contained in:
parent
0477af35bf
commit
c99b813881
|
@ -1,3 +1,8 @@
|
||||||
|
2004-07-13 Christof Petig <christof@petig-baender.de>
|
||||||
|
|
||||||
|
* emultempl/pe.em (make_import_fixup): Use bfd_get_32 to correct
|
||||||
|
for endian-ness of extracted addend.
|
||||||
|
|
||||||
2004-07-13 Danny Smith <dannysmith@usesr.sourceforge.net>
|
2004-07-13 Danny Smith <dannysmith@usesr.sourceforge.net>
|
||||||
|
|
||||||
* pe-dll.c (auto_export): Filter on just the import prefix,
|
* pe-dll.c (auto_export): Filter on just the import prefix,
|
||||||
|
|
|
@ -842,17 +842,17 @@ static int
|
||||||
make_import_fixup (arelent *rel, asection *s)
|
make_import_fixup (arelent *rel, asection *s)
|
||||||
{
|
{
|
||||||
struct bfd_symbol *sym = *rel->sym_ptr_ptr;
|
struct bfd_symbol *sym = *rel->sym_ptr_ptr;
|
||||||
int addend = 0;
|
char addend[4];
|
||||||
|
|
||||||
if (pe_dll_extra_pe_debug)
|
if (pe_dll_extra_pe_debug)
|
||||||
printf ("arelent: %s@%#lx: add=%li\n", sym->name,
|
printf ("arelent: %s@%#lx: add=%li\n", sym->name,
|
||||||
(long) rel->address, (long) rel->addend);
|
(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"),
|
einfo (_("%C: Cannot get section contents - auto-import exception\n"),
|
||||||
s->owner, s, rel->address);
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue