projects
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Debug info for function in Windows PE binary on wrong instruction
[binutils-gdb.git]
/
bfd
/
coffgen.c
diff --git
a/bfd/coffgen.c
b/bfd/coffgen.c
index 5474f6c24d8d35d513ebb0fe36912aae236d649a..57f380a64250dc5ecb0d5782b7c195b4b317983e 100644
(file)
--- a/
bfd/coffgen.c
+++ b/
bfd/coffgen.c
@@
-1,5
+1,5
@@
/* Support for the generic parts of COFF, for BFD.
/* Support for the generic parts of COFF, for BFD.
- Copyright (C) 1990-202
1
Free Software Foundation, Inc.
+ Copyright (C) 1990-202
2
Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@
-1092,6
+1092,7
@@
coff_write_alien_symbol (bfd *abfd,
memset (isym, 0, sizeof (*isym));
return true;
}
memset (isym, 0, sizeof (*isym));
return true;
}
+ memset (dummy, 0, sizeof dummy);
native = dummy;
native->is_sym = true;
native[1].is_sym = false;
native = dummy;
native->is_sym = true;
native[1].is_sym = false;
@@
-2130,10
+2131,10
@@
coff_get_symbol_info (bfd *abfd, asymbol *symbol, symbol_info *ret)
if (coffsymbol (symbol)->native != NULL
&& coffsymbol (symbol)->native->fix_value
&& coffsymbol (symbol)->native->is_sym)
if (coffsymbol (symbol)->native != NULL
&& coffsymbol (symbol)->native->fix_value
&& coffsymbol (symbol)->native->is_sym)
- ret->value
=
- ((coffsymbol (symbol)->native->u.syment.n_value -
- (bfd_hostptr_t) obj_raw_syments (abfd))
- / sizeof (combined_entry_type));
+ ret->value
+ = (((bfd_hostptr_t) coffsymbol (symbol)->native->u.syment.n_value
+
-
(bfd_hostptr_t) obj_raw_syments (abfd))
+
/ sizeof (combined_entry_type));
}
/* Print out information about COFF symbol. */
}
/* Print out information about COFF symbol. */
@@
-2181,10
+2182,11
@@
coff_print_symbol (bfd *abfd,
if (! combined->fix_value)
val = (bfd_vma) combined->u.syment.n_value;
else
if (! combined->fix_value)
val = (bfd_vma) combined->u.syment.n_value;
else
- val = ((combined->u.syment.n_value - (bfd_hostptr_t) root)
+ val = (((bfd_hostptr_t) combined->u.syment.n_value
+ - (bfd_hostptr_t) root)
/ sizeof (combined_entry_type));
/ sizeof (combined_entry_type));
- fprintf (file, "(sec %2d)(fl 0x%02x)(ty %
3
x)(scl %3d) (nx %d) 0x",
+ fprintf (file, "(sec %2d)(fl 0x%02x)(ty %
4
x)(scl %3d) (nx %d) 0x",
combined->u.syment.n_scnum,
combined->u.syment.n_flags,
combined->u.syment.n_type,
combined->u.syment.n_scnum,
combined->u.syment.n_flags,
combined->u.syment.n_type,
@@
-2380,7
+2382,7
@@
coff_find_nearest_line_with_names (bfd *abfd,
}
if (sec_data != NULL && sec_data->saved_bias)
}
if (sec_data != NULL && sec_data->saved_bias)
- bias = sec_data->
saved_
bias;
+ bias = sec_data->bias;
else if (symbols)
{
bias = _bfd_dwarf2_find_symbol_bias (symbols,
else if (symbols)
{
bias = _bfd_dwarf2_find_symbol_bias (symbols,